Add OpenSSL linking exemption to GPL license.
[radsecproxy.git] / radmsg.h
1 /* Copyright (c) 2006-2009, Stig Venaas, UNINETT AS.
2  * Copyright (c) 2010, UNINETT AS, NORDUnet A/S.
3  * Copyright (c) 2010-2012, NORDUnet A/S. */
4 /* See LICENSE for licensing information. */
5
6 #define RAD_Access_Request 1
7 #define RAD_Access_Accept 2
8 #define RAD_Access_Reject 3
9 #define RAD_Accounting_Request 4
10 #define RAD_Accounting_Response 5
11 #define RAD_Access_Challenge 11
12 #define RAD_Status_Server 12
13 #define RAD_Status_Client 13
14
15 #define RAD_Attr_User_Name 1
16 #define RAD_Attr_User_Password 2
17 #define RAD_Attr_Reply_Message 18
18 #define RAD_Attr_Vendor_Specific 26
19 #define RAD_Attr_Calling_Station_Id 31
20 #define RAD_Attr_Tunnel_Password 69
21 #define RAD_Attr_Message_Authenticator 80
22
23 #define RAD_VS_ATTR_MS_MPPE_Send_Key 16
24 #define RAD_VS_ATTR_MS_MPPE_Recv_Key 17
25
26 struct radmsg {
27     uint8_t code;
28     uint8_t id;
29     uint8_t auth[20];
30     struct list *attrs;
31 };
32
33 void radmsg_free(struct radmsg *);
34 struct radmsg *radmsg_init(uint8_t, uint8_t, uint8_t *);
35 int radmsg_add(struct radmsg *, struct tlv *);
36 struct tlv *radmsg_gettype(struct radmsg *, uint8_t);
37 uint8_t *radmsg2buf(struct radmsg *msg, uint8_t *);
38 struct radmsg *buf2radmsg(uint8_t *, uint8_t *, uint8_t *);
39
40 /* Local Variables: */
41 /* c-file-style: "stroustrup" */
42 /* End: */