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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
#
# Test vectors for WiMAX attributes.
#
encode WiMAX-Release = "1.0"
data 1a 0e 00 00 60 b5 01 08 00 01 05 31 2e 30
decode -
data WiMAX-Release = "1.0"
decode 1a 08 00 00 60 b5 01 02
data Attr-26 = 0x000060b50102
decode 1a 0a 00 00 60 b5 01 04 00 01
data Attr-26.24757.1 = 0x01
encode WiMAX-Accounting-Capabilities = 1
data 1a 0c 00 00 60 b5 01 06 00 02 03 01
decode -
data WiMAX-Accounting-Capabilities = IP-Session-Based
encode WiMAX-Release = "1.0", WiMAX-Accounting-Capabilities = 1
data 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 03 01
decode -
data WiMAX-Release = "1.0", WiMAX-Accounting-Capabilities = IP-Session-Based
encode -
data 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 03 01
encode WiMAX-PFDv2-Classifier-Direction = 1
data 1a 0e 00 00 60 b5 54 08 00 09 05 04 03 01
encode WiMAX-PFDv2-Classifier-Direction = 1, WiMAX-PFDv2-Src-Port = 6809
data 1a 14 00 00 60 b5 54 0e 00 09 0b 04 03 01 05 06 04 04 1a 99
decode -
data WiMAX-PFDv2-Classifier-Direction = 1, WiMAX-PFDv2-Src-Port = 6809
decode 1a 11 00 00 60 b5 54 0b 00 09 08 05 06 04 04 1a 99
data WiMAX-PFDv2-Src-Port = 6809
# 26.24757.89.9.4 has the correct length.
# 26.24757.89.9.5 has the correct length.
# 26.24757.89.9.5.4 has the wrong length.
decode 1a 14 00 00 60 b5 54 0e 00 09 0b 04 03 01 05 06 04 05 1a 99
data WiMAX-PFDv2-Classifier-Direction = 1, Attr-26.24757.84.9.5 = 0x04051a99
# The 26.24757.1 has the wrong length
decode 1a 11 00 00 60 b5 01 0a 00 01 05 31 2e 30 02 03 01
data Attr-26 = 0x000060b5010a000105312e30020301
encode -
data 1a 11 00 00 60 b5 01 0a 00 01 05 31 2e 30 02 03 01
decode 1a 11 00 00 60 b5 01 0c 00 01 05 31 2e 30 02 03 01
data Attr-26 = 0x000060b5010c000105312e30020301
encode -
data 1a 11 00 00 60 b5 01 0c 00 01 05 31 2e 30 02 03 01
# 26.24757.1.1 has the wrong length
decode 1a 11 00 00 60 b5 01 0b 00 01 04 31 2e 30 02 03 01
data Attr-26.24757.1 = 0x0104312e30020301
decode 1a 11 00 00 60 b5 01 0b 00 01 06 31 2e 30 02 03 01
data Attr-26.24757.1 = 0x0106312e30020301
encode -
data 1a 11 00 00 60 b5 01 0b 00 01 06 31 2e 30 02 03 01
# 26.24757.1.2 has the wrong length
decode 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 02 01
data Attr-26.24757.1 = 0x0105312e30020201
encode -
data 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 02 01
# 26.24757.1.1 has the correct length
# 26.24757.1.2 has the wrong length
# This means that 26.24757.1 is invalid, and we create a raw attribute.
decode 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 04 01
data Attr-26.24757.1 = 0x0105312e30020401
encode -
data 1a 11 00 00 60 b5 01 0b 00 01 05 31 2e 30 02 04 01
encode WiMAX-PFDv2-Eth-Priority-Range-Low = 55
data 1a 12 00 00 60 b5 54 0c 00 09 09 09 07 03 05 01 03 37
encode WiMAX-PFDv2-Eth-Priority-Range-Low = 55, WiMAX-PFDv2-Eth-Priority-Range-High = 84
data 1a 15 00 00 60 b5 54 0f 00 09 0c 09 0a 03 08 01 03 37 02 03 54
decode -
data WiMAX-PFDv2-Eth-Priority-Range-Low = 55, WiMAX-PFDv2-Eth-Priority-Range-High = 84
# A less efficient encoding of the above data
decode 1a 17 00 00 60 b5 54 11 00 09 0e 09 0c 03 05 01 03 37 03 05 02 03 54
data WiMAX-PFDv2-Eth-Priority-Range-Low = 55, WiMAX-PFDv2-Eth-Priority-Range-High = 84
# 26.24757.84.9.9.3.1 has the wrong length
decode 1a 15 00 00 60 b5 54 0f 00 09 0c 09 0a 03 08 01 04 37 02 03 54
data Attr-26.24757.84.9.9.3 = 0x010437020354
# 26.24757.84.9.9.3.2 has the wrong length
decode 1a 15 00 00 60 b5 54 0f 00 09 0c 09 0a 03 08 01 03 37 02 04 54
data Attr-26.24757.84.9.9.3 = 0x010337020454
# 26.24757.84.9.9.3.2 has the wrong length
# This means that the SECOND 26.24757.84.9.9.3 is invalid.
decode 1a 17 00 00 60 b5 54 11 00 09 0e 09 0c 03 05 01 03 37 03 05 02 04 54
data WiMAX-PFDv2-Eth-Priority-Range-Low = 55, Attr-26.24757.84.9.9.3 = 0x020454
# 26.24757.84.9.9.3.1 has the wrong length
# This means that 26.24757.84.9.9.3 is invalid.
decode 1a 17 00 00 60 b5 54 11 00 09 0e 09 0c 03 05 01 02 37 03 05 02 03 54
data Attr-26.24757.84.9.9.3 = 0x010237, WiMAX-PFDv2-Eth-Priority-Range-High = 84
#
# Simple test for continued attributes
#
decode 1a 0e 00 00 60 b5 01 08 80 01 05 31 2e 30 1a 0c 00 00 60 b5 01 06 00 02 03 00
data WiMAX-Release = "1.0", WiMAX-Accounting-Capabilities = No-Accounting
#
# See if encoding multiple attributes works
#
encode WiMAX-Packet-Data-Flow-Id := 32, WiMAX-Service-Data-Flow-ID := 32, WiMAX-Service-Profile-ID := 32
data 1a 17 00 00 60 b5 1c 11 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20
encode WiMAX-Packet-Data-Flow-Id := 33, WiMAX-Service-Data-Flow-ID := 33, WiMAX-Service-Profile-ID := 33
data 1a 17 00 00 60 b5 1c 11 00 01 04 00 21 02 04 00 21 03 06 00 00 00 21
encode WiMAX-Packet-Data-Flow-Id := 32, WiMAX-Service-Data-Flow-ID := 32, WiMAX-Service-Profile-ID := 32, WiMAX-Packet-Data-Flow-Id := 33, WiMAX-Service-Data-Flow-ID := 33, WiMAX-Service-Profile-ID := 33
data 1a 25 00 00 60 b5 1c 1f 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 01 04 00 21 02 04 00 21 03 06 00 00 00 21
encode WiMAX-Packet-Data-Flow-Id := 32, WiMAX-Service-Data-Flow-ID := 32, WiMAX-Service-Profile-ID := 32, WiMAX-Packet-Data-Flow-Id := 33, WiMAX-Service-Data-Flow-ID := 33, WiMAX-Service-Profile-ID := 33, Session-Timeout := 7200
data 1a 25 00 00 60 b5 1c 1f 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 01 04 00 21 02 04 00 21 03 06 00 00 00 21 1b 06 00 00 1c 20
encode Acct-Interim-Interval := 3600, WiMAX-Packet-Data-Flow-Id := 32, WiMAX-Service-Data-Flow-ID := 32, WiMAX-Service-Profile-ID := 32, WiMAX-Packet-Data-Flow-Id := 33, WiMAX-Service-Data-Flow-ID := 33, WiMAX-Service-Profile-ID := 33, Session-Timeout := 7200
data 55 06 00 00 0e 10 1a 25 00 00 60 b5 1c 1f 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 01 04 00 21 02 04 00 21 03 06 00 00 00 21 1b 06 00 00 1c 20
encode WiMAX-Packet-Data-Flow-Id := 32, WiMAX-Service-Data-Flow-ID := 32, WiMAX-Service-Profile-ID := 32, Session-Timeout := 7200, WiMAX-Packet-Data-Flow-Id := 33, WiMAX-Service-Data-Flow-ID := 33, WiMAX-Service-Profile-ID := 33
data 1a 17 00 00 60 b5 1c 11 00 01 04 00 20 02 04 00 20 03 06 00 00 00 20 1b 06 00 00 1c 20 1a 17 00 00 60 b5 1c 11 00 01 04 00 21 02 04 00 21 03 06 00 00 00 21
encode WiMAX-Capability = 0x01ff45454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545040301
data 1a ff 00 00 60 b5 01 f9 80 01 ff 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 1a 15 00 00 60 b5 01 0f 00 45 45 45 45 45 45 45 45 45 04 03 01
decode -
data WiMAX-Release = "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE", WiMAX-Idle-Mode-Notification-Cap = Supported
#
# Continuation is set, but there's no continued data.
decode 1a 0b 00 00 60 b5 31 05 80 00 00
data Attr-26 = 0x000060b53105800000
encode WiMAX-GMT-Timezone-offset = -1
data 1a 0d 00 00 60 b5 03 07 00 ff ff ff ff
decode -
data WiMAX-GMT-Timezone-offset = -1
#
# It's like a disease which keeps spreading.
#
encode Telrad-Reference-QOS-Profile-Name = "garbage"
data 1a 14 00 00 14 cb 01 0e 00 03 0b 04 09 67 61 72 62 61 67 65
decode -
data Telrad-Reference-QOS-Profile-Name = "garbage"
|