blob: b55bab20580fedb550e70a450b3b0eb119cedbfd (
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
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
|
#
# PRE: update
#
update reply {
Filter-Id := "filter"
}
update request {
Tmp-String-0 := '9870'
Tmp-Octets-0 := 0x39383731
Tmp-IP-Address-0 := 57.56.55.50
Tmp-Date-0 := 959985459
Tmp-Integer-0 := 959985460
Tmp-Cast-Abinary := 'ip out forward srcip 57.56.55.53/32 udp dstport = 1812'
Tmp-Cast-IfId := '0000:0000:3938:3737'
Tmp-Cast-IPv6Addr := '::3938:3738'
Tmp-Cast-IPv6Prefix := '::3938:3739/128'
Tmp-Cast-Byte := 58
Tmp-Cast-Short := 14139
Tmp-Cast-Ethernet := 00:00:39:38:37:3c
Tmp-Cast-Integer64 := 1152921505566832445
Tmp-Cast-IPv4Prefix := 57.56.55.62/32
}
update request {
Tmp-String-0 := "%{hex:Tmp-String-0}"
Tmp-String-1 := "%{hex:Tmp-Octets-0}"
Tmp-String-2 := "%{hex:Tmp-IP-Address-0}"
Tmp-String-3 := "%{hex:Tmp-Date-0}"
Tmp-String-4 := "%{hex:Tmp-Integer-0}"
Tmp-String-5 := "%{hex:Tmp-Cast-Abinary}"
Tmp-String-6 := "%{hex:Tmp-Cast-Ifid}"
Tmp-String-7 := "%{hex:Tmp-Cast-IPv6Addr}"
Tmp-String-8 := "%{hex:Tmp-Cast-IPv6Prefix}"
Tmp-String-9 := "%{hex:Tmp-Cast-Byte}"
}
# String
if (Tmp-String-0 != '39383730') {
update reply {
Filter-Id += 'fail 1'
}
}
# Octets
if (Tmp-String-1 != '39383731') {
update reply {
Filter-Id += 'fail 2'
}
}
# IP Address
if (Tmp-String-2 != '39383732') {
update reply {
Filter-Id += 'fail 3'
}
}
# Date
if (Tmp-String-3 != '39383733') {
update reply {
Filter-Id += 'fail 4'
}
}
# Integer
if (Tmp-String-4 != '39383734') {
update reply {
Filter-Id += 'fail 5'
}
}
# Abinary
if (Tmp-String-5 != '0101000039383735000000002000110000000714000200000000000000000000') {
update reply {
Filter-Id += 'fail 6'
}
}
# ifid
if (Tmp-String-6 != '0000000039383737') {
update reply {
Filter-Id += 'fail 7'
}
}
# ipv6addr
if (Tmp-String-7 != '00000000000000000000000039383738') {
update reply {
Filter-ID += 'fail 8'
}
}
# ipv6addrprefix
if (Tmp-String-8 != '008000000000000000000000000039383739') {
update reply {
Filter-ID += 'fail 9'
}
}
# byte
if (Tmp-String-9 != '3a') {
update reply {
Filter-ID += "fail 10 - expected 3a got %{Tmp-String-9}"
}
}
update request {
Tmp-String-0 := "%{hex:Tmp-Cast-Short}"
Tmp-String-1 := "%{hex:Tmp-Cast-Ethernet}"
Tmp-String-2 := "%{hex:Tmp-Cast-Integer64}"
Tmp-String-3 := "%{hex:Tmp-Cast-IPv4Prefix}"
}
# short
if (Tmp-String-0 != '373b') {
update reply {
Filter-ID += 'fail 11'
}
}
# ethernet
if (Tmp-String-1 != '00003938373c') {
update reply {
Filter-Id += 'fail 12'
}
}
# integer64
if (Tmp-String-2 != '100000003938373d') {
update reply {
Filter-Id += 'fail 13'
}
}
# ipv4prefix
if (Tmp-String-3 != '00203938373e') {
update reply {
Filter-Id += 'fail 14 expected 00203938373e got %{Tmp-String-3}'
}
}
|