-
Notifications
You must be signed in to change notification settings - Fork 2
/
attribute.go
82 lines (73 loc) · 2.4 KB
/
attribute.go
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
package radius
// RFC required
const (
User_Name uint8 = 1
User_Password = 2
CHAP_Password = 3
NAS_IP_Address = 4
NAS_Port = 5
Service_Type = 6
Framed_Protocol = 7
Framed_IP_Address = 8
Framed_IP_Netmask = 9
Framed_Routing = 10
Filter_Id = 11
Framed_MTU = 12
Framed_Compression = 13
Login_IP_Host = 14
Login_Service = 15
Login_TCP_Port = 16
Reply_Message = 18
Callback_Number = 19
Callback_Id = 20
Framed_Route = 22
Framed_IPX_Network = 23
State = 24
Class = 25
Vendor_Specific = 26
Session_Timeout = 27
Idle_Timeout = 28
Termination_Action = 29
Called_Station_Id = 30
Calling_Station_Id = 31
NAS_Identifier = 32
Proxy_State = 33
Login_LAT_Service = 34
Login_LAT_Node = 35
Login_LAT_Group = 36
Framed_AppleTalk_Link = 37
Framed_AppleTalk_Network = 38
Framed_AppleTalk_Zone = 39
CHAP_Challenge = 60
NAS_Port_Type = 61
Port_Limit = 62
Login_LAT_Port = 63
)
// Value constants used to represent the attribute's Value type
const (
//1-253 octets containing UTF-8 encoded 10646 [7]
//characters. Text of length zero (0) MUST NOT be sent;
//omit the entire attribute instead.
Text byte = iota
//1-253 octets containing binary data (values 0 through
//255 decimal, inclusive). Strings of length zero (0)
//MUST NOT be sent; omit the entire attribute instead.
String
// 32 bit value, most significant octet first.
Address
//32 bit unsigned value, most significant octet first.
Integer
//32 bit unsigned value, most significant octet first --
//seconds since 00:00:00 UTC, January 1, 1970. The
//standard Attributes do not use this data type but it is
//presented here for possible use in future attributes.
Time
)
type Attribute struct {
VendorId uint16
TypeId uint8
Value byte
Name string
}
func (a *Attribute) Len() byte {
}