How to set an entry in module_config[]

Jonathan Anthony jonathan.anthony at siliconsafe.com
Thu Nov 30 19:26:18 CET 2017


Hi,

I have the following structure:
typedef struct rlm_snap_t {
	uint32_t	keyid;
	uint32_t	port;
	uint8_t		encrkey[16];
	uint8_t		signingkey[16];
	char const	*ipaddr;
	uint8_t		cipher;
} rlm_snap_t;

What PW types do I need for encrkey and signingkey. The arrays can contain 0s so I can not use strings
static const CONF_PARSER module_config[] = {
	{ "ipaddr", FR_CONF_OFFSET(PW_TYPE_STRING | PW_TYPE_REQUIRED, rlm_snap_t, ipaddr ), NULL },
	{ "port", FR_CONF_OFFSET(PW_TYPE_INTEGER | PW_TYPE_REQUIRED, rlm_snap_t, port), "0"},
	{ "keyid", FR_CONF_OFFSET(PW_TYPE_INTEGER | PW_TYPE_REQUIRED, rlm_snap_t, keyid ), "1000" },
	{ " encrkey ", FR_CONF_OFFSET(?????????????????, rlm_snap_t, encrkey ), NULL },
	{ "cipher",  FR_CONF_OFFSET(PW_TYPE_BYTE | PW_TYPE_REQUIRED, rlm_snap_t, cipher ), "10" },
	CONF_PARSER_TERMINATOR
};

Many thanks




More information about the Freeradius-Devel mailing list