File: ipv6relge

package info (click to toggle)
tcng 10b-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,636 kB
  • ctags: 2,515
  • sloc: ansic: 19,040; pascal: 4,640; yacc: 2,619; sh: 1,914; perl: 1,546; lex: 772; makefile: 756
file content (195 lines) | stat: -rw-r--r-- 7,144 bytes parent folder | download | duplicates (5)
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# build_le_bit: < unum --------------------------------------------------------
tcc -xif:err 2>&1 | grep 'match .* action'
prio {
    drop if raw[0] < 5;
}
EOF
match 0:0:6=0x00 action 1
match 0:0:5=0x00 0:6:2=0x0 action 1
# build_le_bit: != small u128 -------------------------------------------------
tcc -xif:err 2>&1 | grep 'match .* action'
prio {
    drop if raw[0] > ::5;
}
EOF
match 0:0:1=0x1 action 1
match 0:1:1=0x1 action 1
match 0:2:1=0x1 action 1
match 0:3:1=0x1 action 1
match 0:4:1=0x1 action 1
match 0:5:2=0x3 action 1
# build_le_bit: <= large u128 -------------------------------------------------
tcc -xif:err -One 2>&1 | grep 'match .* action'
prio {
    drop if raw[0].ipv6 <= 8000::1;
}
EOF
match 0:0:1=0x0 action 1
match 0:1:126=0x00000000000000000000000000000000 action 1
# build_le_bit: > value exceeding mask ----------------------------------------
tcc -xif:err -One 2>&1 | grep match
prio {
    drop if raw[0] > 256;
}
EOF
match action 0
# build_le_bit: (... & 0) <= 0xff ---------------------------------------------
tcc -xif:err -One 2>&1 | grep match 
prio {
    drop if (raw[0] & 0) <= 0xff;
}
EOF
match action 0
# build_lt_prefix: >= unum ----------------------------------------------------
tcc -xif:err -Oprefix 2>&1 | grep 'match .* action'
prio {
    drop if raw[0] >= 5;
}
EOF
match 0:0:8=0x05 action 1
match 0:0:7=0x03 action 1
match 0:0:5=0x01 action 1
match 0:0:4=0x1 action 1
match 0:0:3=0x1 action 1
match 0:0:2=0x1 action 1
match 0:0:1=0x1 action 1
# build_lt_prefix: <= small u128 ----------------------------------------------
tcc -xif:err -Oprefix 2>&1 | grep 'match .* action'
prio {
    drop if raw[0] <= ::5;
}
EOF
match 0:0:7=0x02 action 1
match 0:0:6=0x00 action 1
# build_le_prefix: != large u128 ----------------------------------------------
tcc -xif:err -Oprefix 2>&1 | grep 'match .* action'
prio {
    drop if raw[0].ipv6 > 8000::1;
}
EOF
match 0:0:127=0x40000000000000000000000000000001 action 1
match 0:0:126=0x20000000000000000000000000000001 action 1
match 0:0:125=0x10000000000000000000000000000001 action 1
match 0:0:124=0x8000000000000000000000000000001 action 1
match 0:0:123=0x4000000000000000000000000000001 action 1
match 0:0:122=0x2000000000000000000000000000001 action 1
match 0:0:121=0x1000000000000000000000000000001 action 1
match 0:0:120=0x800000000000000000000000000001 action 1
match 0:0:119=0x400000000000000000000000000001 action 1
match 0:0:118=0x200000000000000000000000000001 action 1
match 0:0:117=0x100000000000000000000000000001 action 1
match 0:0:116=0x80000000000000000000000000001 action 1
match 0:0:115=0x40000000000000000000000000001 action 1
match 0:0:114=0x20000000000000000000000000001 action 1
match 0:0:113=0x10000000000000000000000000001 action 1
match 0:0:112=0x8000000000000000000000000001 action 1
match 0:0:111=0x4000000000000000000000000001 action 1
match 0:0:110=0x2000000000000000000000000001 action 1
match 0:0:109=0x1000000000000000000000000001 action 1
match 0:0:108=0x800000000000000000000000001 action 1
match 0:0:107=0x400000000000000000000000001 action 1
match 0:0:106=0x200000000000000000000000001 action 1
match 0:0:105=0x100000000000000000000000001 action 1
match 0:0:104=0x80000000000000000000000001 action 1
match 0:0:103=0x40000000000000000000000001 action 1
match 0:0:102=0x20000000000000000000000001 action 1
match 0:0:101=0x10000000000000000000000001 action 1
match 0:0:100=0x8000000000000000000000001 action 1
match 0:0:99=0x4000000000000000000000001 action 1
match 0:0:98=0x2000000000000000000000001 action 1
match 0:0:97=0x1000000000000000000000001 action 1
match 0:0:96=0x800000000000000000000001 action 1
match 0:0:95=0x400000000000000000000001 action 1
match 0:0:94=0x200000000000000000000001 action 1
match 0:0:93=0x100000000000000000000001 action 1
match 0:0:92=0x80000000000000000000001 action 1
match 0:0:91=0x40000000000000000000001 action 1
match 0:0:90=0x20000000000000000000001 action 1
match 0:0:89=0x10000000000000000000001 action 1
match 0:0:88=0x8000000000000000000001 action 1
match 0:0:87=0x4000000000000000000001 action 1
match 0:0:86=0x2000000000000000000001 action 1
match 0:0:85=0x1000000000000000000001 action 1
match 0:0:84=0x800000000000000000001 action 1
match 0:0:83=0x400000000000000000001 action 1
match 0:0:82=0x200000000000000000001 action 1
match 0:0:81=0x100000000000000000001 action 1
match 0:0:80=0x80000000000000000001 action 1
match 0:0:79=0x40000000000000000001 action 1
match 0:0:78=0x20000000000000000001 action 1
match 0:0:77=0x10000000000000000001 action 1
match 0:0:76=0x8000000000000000001 action 1
match 0:0:75=0x4000000000000000001 action 1
match 0:0:74=0x2000000000000000001 action 1
match 0:0:73=0x1000000000000000001 action 1
match 0:0:72=0x800000000000000001 action 1
match 0:0:71=0x400000000000000001 action 1
match 0:0:70=0x200000000000000001 action 1
match 0:0:69=0x100000000000000001 action 1
match 0:0:68=0x80000000000000001 action 1
match 0:0:67=0x40000000000000001 action 1
match 0:0:66=0x20000000000000001 action 1
match 0:0:65=0x10000000000000001 action 1
match 0:0:64=0x8000000000000001 action 1
match 0:0:63=0x4000000000000001 action 1
match 0:0:62=0x2000000000000001 action 1
match 0:0:61=0x1000000000000001 action 1
match 0:0:60=0x800000000000001 action 1
match 0:0:59=0x400000000000001 action 1
match 0:0:58=0x200000000000001 action 1
match 0:0:57=0x100000000000001 action 1
match 0:0:56=0x80000000000001 action 1
match 0:0:55=0x40000000000001 action 1
match 0:0:54=0x20000000000001 action 1
match 0:0:53=0x10000000000001 action 1
match 0:0:52=0x8000000000001 action 1
match 0:0:51=0x4000000000001 action 1
match 0:0:50=0x2000000000001 action 1
match 0:0:49=0x1000000000001 action 1
match 0:0:48=0x800000000001 action 1
match 0:0:47=0x400000000001 action 1
match 0:0:46=0x200000000001 action 1
match 0:0:45=0x100000000001 action 1
match 0:0:44=0x80000000001 action 1
match 0:0:43=0x40000000001 action 1
match 0:0:42=0x20000000001 action 1
match 0:0:41=0x10000000001 action 1
match 0:0:40=0x8000000001 action 1
match 0:0:39=0x4000000001 action 1
match 0:0:38=0x2000000001 action 1
match 0:0:37=0x1000000001 action 1
match 0:0:36=0x800000001 action 1
match 0:0:35=0x400000001 action 1
match 0:0:34=0x200000001 action 1
match 0:0:33=0x100000001 action 1
match 0:0:32=0x80000001 action 1
match 0:0:31=0x40000001 action 1
match 0:0:30=0x20000001 action 1
match 0:0:29=0x10000001 action 1
match 0:0:28=0x8000001 action 1
match 0:0:27=0x4000001 action 1
match 0:0:26=0x2000001 action 1
match 0:0:25=0x1000001 action 1
match 0:0:24=0x800001 action 1
match 0:0:23=0x400001 action 1
match 0:0:22=0x200001 action 1
match 0:0:21=0x100001 action 1
match 0:0:20=0x80001 action 1
match 0:0:19=0x40001 action 1
match 0:0:18=0x20001 action 1
match 0:0:17=0x10001 action 1
match 0:0:16=0x8001 action 1
match 0:0:15=0x4001 action 1
match 0:0:14=0x2001 action 1
match 0:0:13=0x1001 action 1
match 0:0:12=0x801 action 1
match 0:0:11=0x401 action 1
match 0:0:10=0x201 action 1
match 0:0:9=0x101 action 1
match 0:0:8=0x81 action 1
match 0:0:7=0x41 action 1
match 0:0:6=0x21 action 1
match 0:0:5=0x11 action 1
match 0:0:4=0x9 action 1
match 0:0:3=0x5 action 1
match 0:0:2=0x3 action 1