touched up t-003.c

This commit is contained in:
hyung-hwan 2021-08-13 04:44:13 +00:00
parent 0e85526d95
commit ff0e0d8c46
2 changed files with 10 additions and 0 deletions

View File

@ -31,6 +31,12 @@
#include <sys/time.h> #include <sys/time.h>
#include <stdlib.h> #include <stdlib.h>
/* TODO: tlv and various value encoding.
radius dictionary support
change hio_rad_walk_attributes() to hio_rad_walk_attrs() with enhancement
finish long attribute insertion in hio_rad_insert_attr... break long data to multiple attrs
*/
void hio_rad_initialize (hio_rad_hdr_t* hdr, hio_rad_code_t code, hio_uint8_t id) void hio_rad_initialize (hio_rad_hdr_t* hdr, hio_rad_code_t code, hio_uint8_t id)
{ {
HIO_MEMSET (hdr, 0, HIO_SIZEOF(*hdr)); HIO_MEMSET (hdr, 0, HIO_SIZEOF(*hdr));

View File

@ -31,6 +31,8 @@ int main ()
{ 0, 10415, 8, "imsi-mcc-mnc", 12 }, { 0, 10415, 8, "imsi-mcc-mnc", 12 },
{ 0, 4329, 5, "ssid", 4 }, { 0, 4329, 5, "ssid", 4 },
{ 0, 0, HIO_RAD_ATTR_NAS_IDENTIFIER, "nas identifier", 14 }, { 0, 0, HIO_RAD_ATTR_NAS_IDENTIFIER, "nas identifier", 14 },
{ 0, 0, HIO_RAD_ATTR_USER_PASSWORD, "password", 8 },
{ 0, 0, HIO_RAD_ATTR_USER_NAME, "username", 8 },
{ 1, 10415, 8, "imsi-mcc-mnc-2", 14 }, { 1, 10415, 8, "imsi-mcc-mnc-2", 14 },
/* Frag-Status 241.1 integer. */ /* Frag-Status 241.1 integer. */
@ -220,6 +222,8 @@ int main ()
} }
} }
hio_rad_fill_authenticator (hdr);
hio_rad_set_user_password (hdr, HIO_SIZEOF(buf), "real_password", "testing123");
#if 1 #if 1
{ {