diff options
author | venaas <venaas> | 2008-09-11 10:38:51 +0000 |
---|---|---|
committer | venaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf> | 2008-09-11 10:38:51 +0000 |
commit | faf8717dcbc9c2e3ed1892402133b6c9663a5e7d (patch) | |
tree | 3085f5bd29b9c68d8ae94892b91d78586cd89a95 /radmsg.h | |
parent | a98c9b737c943e062efa1a4fc7b31d539e1a2f11 (diff) |
lots of changes to radsrv/reply and use of new radmsg stuff
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@373 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radmsg.h')
-rw-r--r-- | radmsg.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/radmsg.h b/radmsg.h new file mode 100644 index 0000000..d6df94f --- /dev/null +++ b/radmsg.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2006-2008 Stig Venaas <venaas@uninett.no> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + */ + +#define RAD_Access_Request 1 +#define RAD_Access_Accept 2 +#define RAD_Access_Reject 3 +#define RAD_Accounting_Request 4 +#define RAD_Accounting_Response 5 +#define RAD_Access_Challenge 11 +#define RAD_Status_Server 12 +#define RAD_Status_Client 13 + +#define RAD_Attr_User_Name 1 +#define RAD_Attr_User_Password 2 +#define RAD_Attr_Reply_Message 18 +#define RAD_Attr_Vendor_Specific 26 +#define RAD_Attr_Calling_Station_Id 31 +#define RAD_Attr_Tunnel_Password 69 +#define RAD_Attr_Message_Authenticator 80 + +#define RAD_VS_ATTR_MS_MPPE_Send_Key 16 +#define RAD_VS_ATTR_MS_MPPE_Recv_Key 17 + +struct radmsg { + uint8_t code; + uint8_t id; + uint8_t auth[20]; + struct list *attrs; +}; + +void radmsg_free(struct radmsg *); +struct radmsg *radmsg_init(uint8_t, uint8_t, uint8_t *); +int radmsg_add(struct radmsg *, struct tlv *); +struct tlv *radmsg_gettype(struct radmsg *, uint8_t); +uint8_t *radmsg2buf(struct radmsg *msg); +struct radmsg *buf2radmsg(uint8_t *, uint8_t *, uint8_t *); |