blob: d8f9d3c96f29e0eae424040c8403b573c7ec5c1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/* RADIUS support for tcpdump, Thomas Ptacek <tqbf@enteract.com> */
/* ------------------------------------------------------------ */
/* RADIUS attribute encoding types */
#define RD_INT 1
#define RD_DATE 2
#define RD_ADDRESS 3
#define RD_STRING 4
#define RD_HEX 5
/* ------------------------------------------------------------ */
/* RADIUS packet opcodes */
#define RADIUS_CODE_ACCESS_REQUEST 1
#define RADIUS_CODE_ACCESS_ACCEPT 2
#define RADIUS_CODE_ACCESS_REJECT 3
#define RADIUS_CODE_ACCOUNT_REQUEST 4
#define RADIUS_CODE_ACCOUNT_RESPONSE 5
#define RADIUS_CODE_ACCOUNT_STATUS 6
#define RADIUS_CODE_PASSCHG_REQUEST 7
#define RADIUS_CODE_PASSCHG_ACCEPT 8
#define RADIUS_CODE_PASSCHG_REJECT 9
#define RADIUS_CODE_ACCOUNT_MESSAGE 10
#define RADIUS_CODE_ACCESS_CHALLENGE 11
/* ------------------------------------------------------------ */
/* slew o' attributes */
#define RADIUS_ATT_USER_NAME 1
#define RADIUS_ATT_PASSWORD 2
#define RADIUS_ATT_CHAP_PASS 3
#define RADIUS_ATT_NAS_IP 4
#define RADIUS_ATT_NAS_PORT 5
#define RADIUS_ATT_USER_SERVICE 6
#define RADIUS_ATT_PROTOCOL 7
#define RADIUS_ATT_FRAMED_ADDRESS 8
#define RADIUS_ATT_NETMASK 9
#define RADIUS_ATT_ROUTING 10
#define RADIUS_ATT_FILTER 11
#define RADIUS_ATT_MTU 12
#define RADIUS_ATT_COMPRESSION 13
#define RADIUS_ATT_LOGIN_HOST 14
#define RADIUS_ATT_LOGIN_SERVICE 15
#define RADIUS_ATT_LOGIN_TCP_PORT 16
#define RADIUS_ATT_OLD_PASSWORD 17
#define RADIUS_ATT_PORT_MESSAGE 18
#define RADIUS_ATT_DIALBACK_NO 19
#define RADIUS_ATT_DIALBACK_NAME 20
#define RADIUS_ATT_EXPIRATION 21
#define RADIUS_ATT_FRAMED_ROUTE 22
#define RADIUS_ATT_FRAMED_IPX 23
#define RADIUS_ATT_CHALLENGE_STATE 24
#define RADIUS_ATT_CLASS 25
#define RADIUS_ATT_VENDOR_SPECIFIC 26
#define RADIUS_ATT_SESSION_TIMEOUT 27
#define RADIUS_ATT_IDLE_TIMEOUT 28
#define RADIUS_ATT_TERMINATE_ACTION 29
#define RADIUS_ATT_CALLED_ID 30
#define RADIUS_ATT_CALLER_ID 31
#define RADIUS_ATT_STATUS_TYPE 40
/* the accounting attributes change way too much
* for me to want to hardcode them in.
*/
/* ------------------------------------------------------------ */
/* RADIUS packet header */
#define RADFIXEDSZ 20
struct radius_header {
u_char code;
u_char id;
u_short len;
u_char auth[16];
};
/* ------------------------------------------------------------ */
|