]> git.proxmox.com Git - mirror_ovs.git/blame - tests/ofp-print.at
ofp-actions: Allow meter actions in ofpacts_verify().
[mirror_ovs.git] / tests / ofp-print.at
CommitLineData
fec00620
BP
1AT_BANNER([ofp-print])
2
3AT_SETUP([empty])
4AT_KEYWORDS([ofp-print])
5AT_CHECK([ovs-ofctl ofp-print ''], [0], [OpenFlow message is empty
6])
7AT_CLEANUP
8
9AT_SETUP([too short])
10AT_KEYWORDS([ofp-print])
11AT_CHECK([ovs-ofctl ofp-print aabb], [0], [dnl
12OpenFlow packet too short (only 2 bytes):
1300000000 aa bb |.. |
14])
15AT_CLEANUP
16
17AT_SETUP([wrong OpenFlow version])
18AT_KEYWORDS([ofp-print])
90bf1e07
BP
19AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print 00bb0008eeff0011],
20 [0], [dnl
21***decode error: OFPBRC_BAD_TYPE***
2200000000 00 bb 00 08 ee ff 00 11- |........ |
982697a4 23], [ofp_msgs|WARN|unknown OpenFlow message (version 0, type 187)
fec00620
BP
24])
25AT_CLEANUP
26
27AT_SETUP([truncated message])
28AT_KEYWORDS([ofp-print])
f25b4a81 29AT_CHECK([ovs-ofctl ofp-print 0110ccddeeff0011], [0], [dnl
fec00620 30(***truncated to 8 bytes from 52445***)
f25b4a81 3100000000 01 10 cc dd ee ff 00 11- |........ |
fec00620
BP
32])
33AT_CLEANUP
34
35AT_SETUP([message only uses part of buffer])
36AT_KEYWORDS([ofp-print])
f25b4a81 37AT_CHECK([ovs-ofctl ofp-print 01100009eeff00112233], [0], [dnl
fec00620 38(***only uses 9 bytes out of 10***)
f25b4a81 3900000000 01 10 00 09 ee ff 00 11-22 33 |........"3 |
fec00620
BP
40])
41# "
42AT_CLEANUP
43
44AT_SETUP([OFPT_HELLO - ordinary])
45AT_KEYWORDS([ofp-print])
46AT_CHECK([ovs-ofctl ofp-print 0100000800000000], [0], [dnl
47OFPT_HELLO (xid=0x0):
de6c85b0 48 version bitmap: 0x01
fec00620
BP
49])
50AT_CLEANUP
51
52AT_SETUP([OFPT_HELLO with extra data])
53AT_KEYWORDS([ofp-print])
54AT_CHECK([ovs-ofctl ofp-print 0100001300000000657874726120646174610a], [0],
55[dnl
56OFPT_HELLO (xid=0x0):
de6c85b0
SH
57 version bitmap: 0x01
58 unknown data in hello:
5900000000 01 00 00 13 00 00 00 00-65 78 74 72 61 20 64 61 |........extra da|
6000000010 74 61 0a |ta. |
61])
62AT_CLEANUP
63
64AT_SETUP([OFPT_HELLO with version bitmap])
65AT_KEYWORDS([ofp-print])
66AT_CHECK([ovs-ofctl ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 f0"], [0],
67[dnl
68OFPT_HELLO (xid=0x0):
69 version bitmap: 0x04, 0x05, 0x06, 0x07
70])
71AT_CLEANUP
72
73AT_SETUP([OFPT_HELLO with version bitmap and extra data])
74AT_KEYWORDS([ofp-print])
75AT_CHECK([ovs-ofctl ofp-print "\
7601 00 00 1b 00 00 00 00 ff ff 00 06 01 02 00 00 \
7700 01 00 08 00 00 00 f0 61 62 63"], [0],
78[dnl
79OFPT_HELLO (xid=0x0):
80 version bitmap: 0x04, 0x05, 0x06, 0x07
81 unknown data in hello:
8200000000 01 00 00 1b 00 00 00 00-ff ff 00 06 01 02 00 00 |................|
8300000010 00 01 00 08 00 00 00 f0-61 62 63 |........abc |
fec00620
BP
84])
85AT_CLEANUP
86
681ea7a0
BP
87AT_SETUP([OFPT_HELLO with higher than supported version])
88AT_KEYWORDS([ofp-print])
89AT_CHECK([ovs-ofctl ofp-print "0f 00 00 08 00 00 00 00"], [0],
90[dnl
91OFPT_HELLO (OF 0x0f) (xid=0x0):
92 version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
93])
94AT_CHECK([ovs-ofctl ofp-print "40 00 00 08 00 00 00 00"], [0],
95[dnl
96OFPT_HELLO (OF 0x40) (xid=0x0):
97 version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
98])
99AT_CHECK([ovs-ofctl ofp-print "3f 00 00 18 00 00 00 00 00 01 00 0c aa aa aa aa aa aa aa aa 00 00 00 00"], [0],
100[dnl
101OFPT_HELLO (OF 0x3f) (xid=0x0):
102 version bitmap: 0x01, 0x03, 0x05, 0x07, 0x09, 0x0b, 0x0d, 0x0f, 0x11, 0x13, 0x15, 0x17, 0x19, 0x1b, 0x1d, 0x1f
103])
104AT_CLEANUP
105
106AT_SETUP([OFPT_HELLO with contradictory version bitmaps])
107AT_KEYWORDS([ofp-print])
108dnl Bitmap claims support for no versions at all.
109AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 00"], [0],
110[OFPT_HELLO (xid=0x0):
111 version bitmap: 0x01
112 unknown data in hello:
11300000000 01 00 00 10 00 00 00 00-00 01 00 08 00 00 00 00 |................|
114], [dnl
115ofp_util|WARN|peer does not support any OpenFlow version (between 0x01 and 0x1f)
116])
117dnl Bitmap claims support for only versions above 0x1f.
118AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "3f 00 00 18 00 00 00 00 00 01 00 0c 00 00 00 00 aa aa aa aa 00 00 00 00"], [0],
119[OFPT_HELLO (OF 0x3f) (xid=0x0):
120 version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
121 unknown data in hello:
12200000000 3f 00 00 18 00 00 00 00-00 01 00 0c 00 00 00 00 |?...............|
12300000010 aa aa aa aa 00 00 00 00- |........ |
124], [dnl
125ofp_util|WARN|peer does not support any OpenFlow version (between 0x01 and 0x1f)
126])
127dnl Bitmap claims support for nonexistent version 0x00.
128AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 f1"], [0], [dnl
129OFPT_HELLO (xid=0x0):
130 version bitmap: 0x04, 0x05, 0x06, 0x07
131], [dnl
132ofp_util|WARN|peer claims to support invalid OpenFlow version 0x00
133])
134dnl Bitmap claims support for only nonexistent version 0x00.
135AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 01"], [0], [dnl
136OFPT_HELLO (xid=0x0):
137 version bitmap: 0x01
138 unknown data in hello:
13900000000 01 00 00 10 00 00 00 00-00 01 00 08 00 00 00 01 |................|
140], [dnl
141ofp_util|WARN|peer claims to support invalid OpenFlow version 0x00
142ofp_util|WARN|peer does not support any OpenFlow version (between 0x01 and 0x1f)
143])
144AT_CLEANUP
145
2e0525bc 146dnl OFPT_ERROR tests are in ofp-errors.at.
90bf1e07 147
fec00620
BP
148AT_SETUP([OFPT_ECHO_REQUEST, empty payload])
149AT_KEYWORDS([ofp-print])
150AT_CHECK([ovs-ofctl ofp-print '01 02 00 08 00 00 00 01'], [0], [dnl
151OFPT_ECHO_REQUEST (xid=0x1): 0 bytes of payload
152])
153AT_CLEANUP
154
155AT_SETUP([OFPT_ECHO_REQUEST, 5-byte payload])
156AT_KEYWORDS([ofp-print])
157AT_CHECK([ovs-ofctl ofp-print '0102000d00000001 25 53 54 1a 9d'], [0], [dnl
158OFPT_ECHO_REQUEST (xid=0x1): 5 bytes of payload
15900000000 25 53 54 1a 9d |%ST.. |
160])
161AT_CLEANUP
162
163AT_SETUP([OFPT_ECHO_REPLY, empty payload])
164AT_KEYWORDS([ofp-print])
165AT_CHECK([ovs-ofctl ofp-print '01 03 00 08 00 00 00 01'], [0], [dnl
166OFPT_ECHO_REPLY (xid=0x1): 0 bytes of payload
167])
168AT_CLEANUP
169
170AT_SETUP([OFPT_ECHO_REPLY, 5-byte payload])
171AT_KEYWORDS([ofp-print])
172AT_CHECK([ovs-ofctl ofp-print '0103000d0000000ba330efaf9e'], [0], [dnl
173OFPT_ECHO_REPLY (xid=0xb): 5 bytes of payload
17400000000 a3 30 ef af 9e |.0... |
175])
176AT_CLEANUP
177
178AT_SETUP([OFPT_FEATURES_REQUEST])
179AT_KEYWORDS([ofp-print])
180AT_CHECK([ovs-ofctl ofp-print '0105000800000001'], [0], [dnl
181OFPT_FEATURES_REQUEST (xid=0x1):
182])
183AT_CLEANUP
184
9e1fd49b 185AT_SETUP([OFPT_FEATURES_REPLY - OF1.0])
fec00620
BP
186AT_KEYWORDS([ofp-print])
187AT_CHECK([ovs-ofctl ofp-print "\
18801 06 00 e0 00 00 00 01 00 00 50 54 00 00 00 01 \
18900 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
190ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
19100 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
19200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
19300 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
19400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
19500 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
19600 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
19700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
19800 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
19900 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
20000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
20100 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
202"], [0], [dnl
9e1fd49b 203OFPT_FEATURES_REPLY (xid=0x1): dpid:0000505400000001
fec00620 204n_tables:2, n_buffers:256
9e1fd49b
BP
205capabilities: FLOW_STATS TABLE_STATS PORT_STATS ARP_MATCH_IP
206actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE
0ab14c8e
BP
207 1(eth1): addr:50:54:00:00:00:02
208 config: 0
209 state: 0
210 current: 100MB-FD AUTO_NEG
211 advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
212 supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
9e1fd49b 213 speed: 100 Mbps now, 100 Mbps max
0ab14c8e
BP
214 2(eth2): addr:50:54:00:00:00:03
215 config: 0
216 state: 0
217 current: 100MB-FD AUTO_NEG
218 advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
219 supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
9e1fd49b 220 speed: 100 Mbps now, 100 Mbps max
0ab14c8e
BP
221 3(eth0): addr:50:54:00:00:00:01
222 config: 0
223 state: 0
224 current: 100MB-FD AUTO_NEG
225 advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
226 supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
9e1fd49b 227 speed: 100 Mbps now, 100 Mbps max
0ab14c8e
BP
228 LOCAL(br0): addr:50:54:00:00:00:01
229 config: PORT_DOWN
230 state: LINK_DOWN
d02a5f8e 231 speed: 0 Mbps now, 0 Mbps max
fec00620
BP
232])
233AT_CLEANUP
234
9e1fd49b 235AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.0])
fec00620
BP
236AT_KEYWORDS([ofp-print])
237AT_CHECK([ovs-ofctl ofp-print "\
23801 06 00 dc 00 00 00 01 00 00 50 54 00 00 00 01 \
23900 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
240ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
24100 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
24200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
24300 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
24400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
24500 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
24600 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
24700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
24800 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
24900 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
25000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
25100 00 02 08 00 00 02 8f 00 00 02 8f \
252"], [0], [dnl
90bf1e07 253***decode error: OFPBRC_BAD_LEN***
fec00620
BP
25400000000 01 06 00 dc 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
25500000010 00 00 01 00 02 00 00 00-00 00 00 87 00 00 0f ff |................|
25600000020 ff fe 50 54 00 00 00 01-62 72 30 00 00 00 00 00 |..PT....br0.....|
25700000030 00 00 00 00 00 00 00 00-00 00 00 01 00 00 00 01 |................|
25800000040 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
25900000050 00 03 50 54 00 00 00 01-65 74 68 30 00 00 00 00 |..PT....eth0....|
26000000060 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
26100000070 00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
26200000080 00 02 50 54 00 00 00 03-65 74 68 32 00 00 00 00 |..PT....eth2....|
26300000090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
264000000a0 00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
265000000b0 00 01 50 54 00 00 00 02-65 74 68 31 00 00 00 00 |..PT....eth1....|
266000000c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
267000000d0 00 00 02 08 00 00 02 8f-00 00 02 8f |............ |
268], [stderr])
269AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
5a020ef3 270received OFPT_FEATURES_REPLY with incorrect length 220 (must be exactly 32 bytes or longer by an integer multiple of 48 bytes)
fec00620
BP
271])
272AT_CLEANUP
273
9e1fd49b
BP
274AT_SETUP([OFPT_FEATURES_REPLY - OF1.1])
275AT_KEYWORDS([ofp-print])
276AT_CHECK([ovs-ofctl ofp-print "\
27702 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
2e1ae200 27800 00 01 00 02 00 00 00 00 00 00 87 00 00 00 00 \
9e1fd49b
BP
279ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
28062 72 30 00 00 00 00 00 00 00 00 00 00 00 00 00 \
28100 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
28200 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
28300 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
28465 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
28500 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
28600 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
287"], [0], [dnl
288OFPT_FEATURES_REPLY (OF1.1) (xid=0x1): dpid:0000505400000001
289n_tables:2, n_buffers:256
290capabilities: FLOW_STATS TABLE_STATS PORT_STATS ARP_MATCH_IP
9e1fd49b
BP
291 3(eth0): addr:50:54:00:00:00:01
292 config: 0
293 state: 0
294 current: 100MB-FD AUTO_NEG
295 advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
296 supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
297 speed: 100 Mbps now, 100 Mbps max
298 LOCAL(br0): addr:50:54:00:00:00:01
299 config: PORT_DOWN
300 state: LINK_DOWN
301 speed: 100 Mbps now, 100 Mbps max
302])
303AT_CLEANUP
304
305AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.1])
306AT_KEYWORDS([ofp-print])
307AT_CHECK([ovs-ofctl ofp-print "\
30802 06 00 90 00 00 00 01 00 00 50 54 00 00 00 01 \
2e1ae200 30900 00 01 00 02 00 00 00 00 00 00 87 00 00 00 00 \
9e1fd49b
BP
310ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
31162 72 30 00 00 00 00 00 00 00 00 00 00 00 00 00 \
31200 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
31300 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
31400 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
31565 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
31600 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
317"], [0], [dnl
318***decode error: OFPBRC_BAD_LEN***
31900000000 02 06 00 90 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
2e1ae200 32000000010 00 00 01 00 02 00 00 00-00 00 00 87 00 00 00 00 |................|
9e1fd49b
BP
32100000020 ff ff ff fe 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
32200000030 62 72 30 00 00 00 00 00-00 00 00 00 00 00 00 00 |br0.............|
32300000040 00 00 00 01 00 00 00 01-00 00 00 00 00 00 00 00 |................|
32400000050 00 00 00 00 00 00 00 00-00 01 86 a0 00 01 86 a0 |................|
32500000060 00 00 00 03 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
32600000070 65 74 68 30 00 00 00 00-00 00 00 00 00 00 00 00 |eth0............|
32700000080 00 00 00 00 00 00 00 00-00 00 20 08 00 00 28 0f |.......... ...@{:@.|
328], [stderr])
329AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
330received OFPT_FEATURES_REPLY with incorrect length 144 (must be exactly 32 bytes or longer by an integer multiple of 64 bytes)
331])
332AT_CLEANUP
333
60202987
SH
334AT_SETUP([OFPT_FEATURES_REPLY - OF1.2])
335AT_KEYWORDS([ofp-print])
336AT_CHECK([ovs-ofctl ofp-print "\
33703 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
2e1ae200 33800 00 01 00 ff 00 00 00 00 00 01 77 00 00 00 00 \
60202987
SH
339ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
34062 72 30 0a 00 00 00 00 00 00 00 00 00 00 00 00 \
34100 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
34200 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
34300 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
34465 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
34500 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
34600 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
347"], [0], [dnl
348OFPT_FEATURES_REPLY (OF1.2) (xid=0x1): dpid:0000505400000001
349n_tables:255, n_buffers:256
350capabilities: FLOW_STATS TABLE_STATS PORT_STATS IP_REASM QUEUE_STATS PORT_BLOCKED
351 3(eth0): addr:50:54:00:00:00:01
352 config: 0
353 state: 0
354 current: 100MB-FD AUTO_NEG
355 advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
356 supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
357 speed: 100 Mbps now, 100 Mbps max
358 LOCAL(br0): addr:50:54:00:00:00:01
359 config: PORT_DOWN
360 state: LINK_DOWN
361 speed: 100 Mbps now, 100 Mbps max
362])
363AT_CLEANUP
364
365AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.2])
366AT_KEYWORDS([ofp-print])
367AT_CHECK([ovs-ofctl ofp-print "\
36803 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
2e1ae200 36900 00 01 00 ff 00 00 00 00 00 01 77 00 00 00 00 \
60202987
SH
370ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
37162 72 30 0a 00 00 00 00 00 00 00 00 00 00 00 00 \
37200 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
37300 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
37400 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
37565 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
37600 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
377"], [0], [dnl
378OFPT_FEATURES_REPLY (OF1.2) (xid=0x1):
379(***truncated to 144 bytes from 160***)
38000000000 03 06 00 a0 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
2e1ae200 38100000010 00 00 01 00 ff 00 00 00-00 00 01 77 00 00 00 00 |...........w....|
60202987
SH
38200000020 ff ff ff fe 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
38300000030 62 72 30 0a 00 00 00 00-00 00 00 00 00 00 00 00 |br0.............|
38400000040 00 00 00 01 00 00 00 01-00 00 00 00 00 00 00 00 |................|
38500000050 00 00 00 00 00 00 00 00-00 01 86 a0 00 01 86 a0 |................|
38600000060 00 00 00 03 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
38700000070 65 74 68 30 00 00 00 00-00 00 00 00 00 00 00 00 |eth0............|
38800000080 00 00 00 00 00 00 00 00-00 00 20 08 00 00 28 0f |.......... ...@{:@.|
389], [stderr])
390AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
391])
392AT_CLEANUP
393
2e1ae200
JR
394AT_SETUP([OFPT_FEATURES_REPLY - OF1.3])
395AT_KEYWORDS([ofp-print])
396AT_CHECK([ovs-ofctl ofp-print "\
39704 06 00 20 00 00 00 01 00 00 50 54 00 00 00 01 \
39800 00 01 00 ff 00 00 00 00 00 01 77 00 00 00 00 \
399"], [0], [dnl
400OFPT_FEATURES_REPLY (OF1.3) (xid=0x1): dpid:0000505400000001
401n_tables:255, n_buffers:256
402capabilities: FLOW_STATS TABLE_STATS PORT_STATS IP_REASM QUEUE_STATS PORT_BLOCKED
403])
404AT_CLEANUP
405
406AT_SETUP([OFPT_FEATURES_REPLY - with auxiliary_id - OF1.3])
407AT_KEYWORDS([ofp-print])
408AT_CHECK([ovs-ofctl ofp-print "\
40904 06 00 20 00 00 00 01 00 00 50 54 00 00 00 01 \
41000 00 01 00 ff 01 00 00 00 00 01 77 00 00 00 00 \
411"], [0], [dnl
412OFPT_FEATURES_REPLY (OF1.3) (xid=0x1): dpid:0000505400000001
413n_tables:255, n_buffers:256, auxiliary_id:1
414capabilities: FLOW_STATS TABLE_STATS PORT_STATS IP_REASM QUEUE_STATS PORT_BLOCKED
415])
416AT_CLEANUP
417
fec00620
BP
418AT_SETUP([OFPT_GET_CONFIG_REQUEST])
419AT_KEYWORDS([ofp-print])
420AT_CHECK([ovs-ofctl ofp-print '0107000800000001'], [0], [dnl
421OFPT_GET_CONFIG_REQUEST (xid=0x1):
422])
423AT_CLEANUP
424
425AT_SETUP([OFPT_GET_CONFIG_REPLY, most common form])
426AT_KEYWORDS([ofp-print])
427AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 00 00 00'], [0], [dnl
428OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
429])
430AT_CLEANUP
431
432
433AT_SETUP([OFPT_GET_CONFIG_REPLY, frags and miss_send_len])
434AT_KEYWORDS([ofp-print])
435AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 02 00 ff'], [0], [dnl
436OFPT_GET_CONFIG_REPLY (xid=0x3): frags=reassemble miss_send_len=255
437])
438AT_CLEANUP
439
7cfb9651 440AT_SETUP([OFPT_PACKET_IN - OF1.0])
fec00620 441AT_KEYWORDS([ofp-print])
fec00620
BP
442AT_CHECK([ovs-ofctl ofp-print "\
44301 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
44400 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
44545 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
446c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
dc235f7f 44750 02 02 00 26 e8 00 00 00 00 00 00 00 00 \
897a8e07 448"], [0], [dnl
f0fd1a17 449OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
dc235f7f 450tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=10031,tp_dst=0,tcp_flags=0x002 tcp_csum:26e8
fec00620
BP
451])
452AT_CLEANUP
453
b4ccee75
SH
454AT_SETUP([OFPT_PACKET_IN - OF1.0, with hex output of packet data)])
455AT_KEYWORDS([ofp-print])
456AT_CHECK([ovs-ofctl ofp-print "\
45701 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
45800 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
45945 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
460c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
dc235f7f 46150 10 02 00 26 e8 00 00 00 00 00 00 00 00 \
b4ccee75
SH
462" 3], [0], [dnl
463OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
dc235f7f 464tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=10031,tp_dst=0,tcp_flags=0x010 tcp_csum:26e8
b4ccee75
SH
46500000000 50 54 00 00 00 06 50 54-00 00 00 05 08 00 45 00
46600000010 00 28 bd 12 00 00 40 06-3c 6a c0 a8 00 01 c0 a8
dc235f7f 46700000020 00 02 27 2f 00 00 78 50-cc 5b 57 af 42 1e 50 10
b4ccee75
SH
46800000030 02 00 26 e8 00 00 00 00-00 00 00 00
469])
470AT_CLEANUP
471
7cfb9651
SH
472AT_SETUP([OFPT_PACKET_IN - OF1.2])
473AT_KEYWORDS([ofp-print])
474AT_CHECK([ovs-ofctl ofp-print "\
47503 0a 00 4c 00 00 00 00 ff ff ff 00 00 2a 00 00 \
47600 01 00 0c 80 00 00 04 ff ff ff fe 00 00 00 00 \
47700 00 ff ff ff ff ff ff 00 23 20 83 c1 5f 80 35 \
eb19e5f0 47800 01 08 00 06 04 00 01 00 23 20 83 c1 5f 00 00 \
7cfb9651
SH
47900 00 00 23 20 83 c1 5f 00 00 00 00 \
480"], [0], [dnl
481OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
eb19e5f0 482rarp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=1,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
7cfb9651
SH
483])
484AT_CLEANUP
485
b4ccee75
SH
486AT_SETUP([OFPT_PACKET_IN - OF1.2, with hex output of packet data])
487AT_KEYWORDS([ofp-print])
488AT_CHECK([ovs-ofctl ofp-print "\
48903 0a 00 4c 00 00 00 00 ff ff ff 00 00 2a 00 00 \
49000 01 00 0c 80 00 00 04 ff ff ff fe 00 00 00 00 \
49100 00 ff ff ff ff ff ff 00 23 20 83 c1 5f 80 35 \
49200 01 08 00 06 04 00 03 00 23 20 83 c1 5f 00 00 \
49300 00 00 23 20 83 c1 5f 00 00 00 00 \
494" 3], [0], [dnl
495OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
496rarp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=3,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
49700000000 ff ff ff ff ff ff 00 23-20 83 c1 5f 80 35 00 01
49800000010 08 00 06 04 00 03 00 23-20 83 c1 5f 00 00 00 00
49900000020 00 23 20 83 c1 5f 00 00-00 00
500])
501AT_CLEANUP
502
2e1ae200
JR
503AT_SETUP([OFPT_PACKET_IN - OF1.3])
504AT_KEYWORDS([ofp-print])
505AT_CHECK([ovs-ofctl ofp-print "\
50604 0a 00 54 00 00 00 00 ff ff ff 00 00 2a 00 00 \
50701 02 03 04 05 06 07 08 00 01 00 0c 80 00 00 04 \
508ff ff ff fe 00 00 00 00 00 00 ff ff ff ff ff ff \
50900 23 20 83 c1 5f 80 35 00 01 08 00 06 04 00 03 \
51000 23 20 83 c1 5f 00 00 00 00 00 23 20 83 c1 5f \
51100 00 00 00 \
512"], [0], [dnl
513OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x102030405060708 total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
3f78c3cc 514rarp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=3,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
2e1ae200
JR
515])
516AT_CLEANUP
517
b4ccee75
SH
518AT_SETUP([OFPT_PACKET_IN - OF1.3, with hex output of packet data])
519AT_KEYWORDS([ofp-print])
520AT_CHECK([ovs-ofctl ofp-print "\
52104 0a 00 54 00 00 00 00 ff ff ff 00 00 2a 00 00 \
52201 02 03 04 05 06 07 08 00 01 00 0c 80 00 00 04 \
523ff ff ff fe 00 00 00 00 00 00 ff ff ff ff ff ff \
52400 23 20 83 c1 5f 80 35 00 01 08 00 06 04 00 03 \
52500 23 20 83 c1 5f 00 00 00 00 00 23 20 83 c1 5f \
52600 00 00 00 \
527" 3], [0], [dnl
528OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x102030405060708 total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
529rarp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=3,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
53000000000 ff ff ff ff ff ff 00 23-20 83 c1 5f 80 35 00 01
53100000010 08 00 06 04 00 03 00 23-20 83 c1 5f 00 00 00 00
53200000020 00 23 20 83 c1 5f 00 00-00 00
533])
534AT_CLEANUP
535
eefbf181 536AT_SETUP([OFPT_FLOW_REMOVED - OF1.0])
fec00620
BP
537AT_KEYWORDS([ofp-print])
538AT_CHECK([ovs-ofctl ofp-print "\
53901 0b 00 58 00 00 00 00 00 00 00 00 00 03 50 54 \
54000 00 00 05 50 54 00 00 00 06 ff ff 00 00 08 06 \
54100 02 00 00 c0 a8 00 01 c0 a8 00 02 00 00 00 00 \
54200 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 05 \
54330 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \
54400 00 00 00 00 00 00 3c \
545"], [0], [dnl
666d0863 546OFPT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 reason=idle duration5.82s idle5 pkts1 bytes60
fec00620
BP
547])
548AT_CLEANUP
549
eefbf181
SH
550AT_SETUP([OFPT_FLOW_REMOVED - OF1.2])
551AT_KEYWORDS([ofp-print])
552AT_CHECK([ovs-ofctl ofp-print "\
55303 0b 00 40 00 00 00 00 fe dc ba 98 76 54 32 10 \
55480 00 01 05 00 00 00 01 00 98 96 80 00 3c 00 78 \
55500 00 00 00 00 12 d6 87 00 00 00 00 6f 68 ba 66 \
55600 01 00 0a 80 00 0c 02 10 09 00 00 00 00 00 00"], [0], [dnl
95216219 557OFPT_FLOW_REMOVED (OF1.2) (xid=0x0): dl_vlan=9 reason=hard table_id=5 cookie:0xfedcba9876543210 duration1.01s idle60 hard120 pkts1234567 bytes1869134438
eefbf181
SH
558])
559AT_CLEANUP
560
2e1ae200
JR
561AT_SETUP([OFPT_FLOW_REMOVED - OF1.3])
562AT_KEYWORDS([ofp-print])
563AT_CHECK([ovs-ofctl ofp-print "\
56404 0b 00 40 00 00 00 00 fe dc ba 98 76 54 32 10 \
56580 00 01 05 00 00 00 01 00 98 96 80 00 3c 00 78 \
56600 00 00 00 00 12 d6 87 00 00 00 00 6f 68 ba 66 \
56700 01 00 0a 80 00 0c 02 10 09 00 00 00 00 00 00"], [0], [dnl
568OFPT_FLOW_REMOVED (OF1.3) (xid=0x0): dl_vlan=9 reason=hard table_id=5 cookie:0xfedcba9876543210 duration1.01s idle60 hard120 pkts1234567 bytes1869134438
569])
570AT_CLEANUP
571
9e1fd49b 572AT_SETUP([OFPT_PORT_STATUS - OF1.0])
fec00620
BP
573AT_KEYWORDS([ofp-print])
574AT_CHECK([ovs-ofctl ofp-print "\
57501 0c 00 40 00 00 00 00 02 00 00 00 00 00 00 00 \
57600 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
57700 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
57800 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
579"], [0], [dnl
0ab14c8e
BP
580OFPT_PORT_STATUS (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
581 config: PORT_DOWN
582 state: LINK_DOWN
583 current: 100MB-FD AUTO_NEG
584 advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
585 supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
9e1fd49b
BP
586 speed: 100 Mbps now, 100 Mbps max
587])
588AT_CLEANUP
589
590AT_SETUP([OFPT_PORT_STATUS - OF1.1])
591AT_KEYWORDS([ofp-print])
592AT_CHECK([ovs-ofctl ofp-print "\
59302 0c 00 50 00 00 00 00 02 00 00 00 00 00 00 00 \
59400 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
59565 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
59600 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
59700 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
598"], [0], [dnl
599OFPT_PORT_STATUS (OF1.1) (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
600 config: 0
601 state: 0
602 current: 100MB-FD AUTO_NEG
603 advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
604 supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
605 speed: 100 Mbps now, 100 Mbps max
fec00620
BP
606])
607AT_CLEANUP
608
eb5ee596 609AT_SETUP([OFPT_PACKET_OUT - OF1.0])
fec00620
BP
610AT_KEYWORDS([ofp-print])
611AT_CHECK([ovs-ofctl ofp-print "\
61201 0d 00 54 00 00 00 00 00 00 01 14 00 01 00 08 \
61300 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
61400 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
615b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
61600 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
61700 00 00 00 \
618"], [0], [dnl
c6a93eb7 619OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 buffer=0x00000114
fec00620
BP
620])
621AT_CLEANUP
622
4b2d9d11
SH
623AT_SETUP([OFPT_PACKET_OUT - OF1.0, with packet])
624AT_KEYWORDS([ofp-print])
625AT_CHECK([ovs-ofctl ofp-print "\
62601 0d 00 54 00 00 00 00 ff ff ff ff 00 01 00 08 \
62700 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
62800 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
629b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
63000 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
63100 00 00 00 \
632"], [0], [dnl
633OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 data_len=60
dc235f7f 634tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=11104,tcp_flags=0x014 tcp_csum:6d75
4b2d9d11
SH
635])
636AT_CLEANUP
637
b4ccee75
SH
638AT_SETUP([OFPT_PACKET_OUT - OF1.0, with hex output of packet data])
639AT_KEYWORDS([ofp-print])
640AT_CHECK([ovs-ofctl ofp-print "\
64101 0d 00 54 00 00 00 00 ff ff ff ff 00 01 00 08 \
64200 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
64300 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
644b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
64500 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
64600 00 00 00 \
647" 3], [0], [dnl
648OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 data_len=60
dc235f7f 649tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=11104,tcp_flags=0x014 tcp_csum:6d75
b4ccee75
SH
65000000000 50 54 00 00 00 05 50 54-00 00 00 06 08 00 45 00
65100000010 00 28 00 00 40 00 40 06-b9 7c c0 a8 00 02 c0 a8
65200000020 00 01 00 00 2b 60 00 00-00 00 6a 4f 2b 58 50 14
65300000030 00 00 6d 75 00 00 00 00-00 00 00 00
654])
655AT_CLEANUP
656
eb5ee596
SH
657AT_SETUP([OFPT_PACKET_OUT - OF1.1])
658AT_KEYWORDS([ofp-print])
659AT_CHECK([ovs-ofctl ofp-print "\
66003 0d 00 28 88 58 df c5 ff ff ff 00 ff ff ff fe \
66100 10 00 00 00 00 00 00 00 00 00 10 ff ff ff fb \
66205 dc 00 00 00 00 00 00 \
663"], [0], [dnl
664OFPT_PACKET_OUT (OF1.2) (xid=0x8858dfc5): in_port=LOCAL actions=FLOOD buffer=0xffffff00
665])
666AT_CLEANUP
667
4b2d9d11
SH
668AT_SETUP([OFPT_PACKET_OUT - OF1.1, with packet])
669AT_KEYWORDS([ofp-print])
670AT_CHECK([ovs-ofctl ofp-print "\
67103 0d 00 64 88 58 df c5 ff ff ff ff ff ff ff fe \
67200 10 00 00 00 00 00 00 00 00 00 10 ff ff ff fb \
67305 dc 00 00 00 00 00 00 50 54 00 00 00 05 50 54 \
67400 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
675b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
67600 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
67700 00 00 00 \
678"], [0], [dnl
679OFPT_PACKET_OUT (OF1.2) (xid=0x8858dfc5): in_port=LOCAL actions=FLOOD data_len=60
dc235f7f 680tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=11104,tcp_flags=0x014 tcp_csum:6d75
4b2d9d11
SH
681])
682AT_CLEANUP
683
fec00620 684# The flow is formatted with cls_rule_format() for the low-verbosity case.
1bf6eeb0 685AT_SETUP([OFPT_FLOW_MOD - OF1.0 - low verbosity])
fec00620 686AT_KEYWORDS([ofp-print])
1c0b7503 687AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
fec00620
BP
68801 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
68900 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
69000 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
69100 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
69200 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
693" 2], [0], [dnl
666d0863 694OFPT_FLOW_MOD (xid=0x0): ADD priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 idle:5 buf:0x10e out_port:0 actions=output:3
1c0b7503
BP
695], [dnl
696ofp_util|INFO|normalization changed ofp_match, details:
666d0863
MM
697ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0
698ofp_util|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2
fec00620
BP
699])
700AT_CLEANUP
701
75fa58f8
BP
702# The flow is formatted with cls_rule_format() for the low-verbosity case.
703AT_SETUP([OFPT_FLOW_MOD - OF1.1 - low verbosity])
704AT_KEYWORDS([ofp-print])
705AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
706020e 0090 01020304 \
707da1aa3e035d87158 ffffffffffffffff \
70802 01 003c 0078 9c40 ffffffff ffffffff ffffffff 0003 \
7090000 \
710\
7110000 0058 00000000 000003f7 \
712000000000000ffffffffffff 000000000000ffffffffffff \
7130000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 \
71400000000 00 000000 0000000000000000ffffffffffffffff \
715\
7160001 0008 03 000000 \
717" 2], [0], [dnl
718OFPT_FLOW_MOD (OF1.1) (xid=0x1020304): MOD table:2 priority=40000,arp,arp_spa=192.168.128.0/24 cookie:0xda1aa3e035d87158/0xffffffffffffffff idle:60 hard:120 send_flow_rem check_overlap actions=goto_table:3
719])
720AT_CLEANUP
721
1bf6eeb0
SH
722# The flow is formatted with cls_rule_format() for the low-verbosity case.
723AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
724AT_KEYWORDS([ofp-print])
725AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
72603 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
0e197060 72700 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
1bf6eeb0
SH
728ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
72900 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
73050 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
73180 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
73200 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
73300 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
73400 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
735" 2], [0], [dnl
0e197060 736OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:1 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3
1bf6eeb0
SH
737], [dnl
738])
739AT_CLEANUP
740
eec25dc1
BP
741# The flow is formatted with ofp10_match_to_string() for the
742# high-verbosity case.
1bf6eeb0 743AT_SETUP([OFPT_FLOW_MOD - OF1.0 - high verbosity])
fec00620 744AT_KEYWORDS([ofp-print])
1c0b7503 745AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
fec00620
BP
74601 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
74700 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
74800 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
74900 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
75000 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
751" 3], [0], [dnl
de0f16bc 752OFPT_FLOW_MOD (xid=0x0): ADD arp,in_port=1,dl_vlan=65535,dl_vlan_pcp=0,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 idle:5 pri:65535 buf:0x10e out_port:0 actions=output:3
1c0b7503
BP
753], [dnl
754ofp_util|INFO|normalization changed ofp_match, details:
666d0863
MM
755ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0
756ofp_util|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2
fec00620
BP
757])
758AT_CLEANUP
759
1bf6eeb0
SH
760# The flow is formatted with cls_rule_format() for the low-verbosity case.
761AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
762AT_KEYWORDS([ofp-print])
763AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
76403 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
0e197060 76500 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
1bf6eeb0
SH
766ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
76700 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
76850 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
76980 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
77000 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
77100 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
77200 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
773" 2], [0], [dnl
0e197060 774OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:1 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3
1bf6eeb0
SH
775], [dnl
776])
777AT_CLEANUP
778
2e1ae200
JR
779# The flow is formatted with cls_rule_format() for the low-verbosity case.
780AT_SETUP([OFPT_FLOW_MOD - OF1.3 - flags - low verbosity])
781AT_KEYWORDS([ofp-print])
782AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
78304 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
0e197060 78400 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
2e1ae200
JR
785ff ff ff ff ff ff ff ff ff ff ff ff 00 1f 00 00 \
78600 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
78750 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
78880 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
78900 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
79000 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
79100 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
792" 2], [0], [dnl
0e197060 793OFPT_FLOW_MOD (OF1.3) (xid=0x2): ADD table:1 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 send_flow_rem check_overlap reset_counts no_packet_counts no_byte_counts actions=output:3
2e1ae200
JR
794], [dnl
795])
796AT_CLEANUP
797
d55b18c8
IY
798AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field ip_src])
799AT_KEYWORDS([ofp-print])
800AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
80103 0e 00 58 52 33 45 02 00 00 00 00 00 00 00 00 \
80200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
803ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
80400 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
80500 04 00 18 00 00 00 00 00 19 00 10 80 00 16 04 \
806c0 a8 03 5c 00 00 00 00 \
807" 2], [0], [dnl
808OFPT_FLOW_MOD (OF1.2) (xid=0x52334502): ADD priority=255,ip actions=set_field:192.168.3.92->ip_src
809], [dnl
810])
811AT_CLEANUP
812
813AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field ip_dst])
814AT_KEYWORDS([ofp-print])
815AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
81603 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
81700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
818ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
81900 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
82000 04 00 18 00 00 00 00 00 19 00 10 80 00 18 04 \
821c0 a8 4a 7a 00 00 00 00 \
822" 2], [0], [dnl
823OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,ip actions=set_field:192.168.74.122->ip_dst
824], [dnl
825])
826AT_CLEANUP
827
0d56eaf2
JS
828AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field sctp_src])
829AT_KEYWORDS([ofp-print])
830AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
83103 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
83200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
833ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
83400 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
83500 04 00 18 00 00 00 00 00 19 00 10 80 00 22 02 \
8360d 06 00 00 00 00 00 00 \
837" 2], [0], [dnl
838OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,sctp actions=set_field:3334->sctp_src
839], [dnl
840])
841AT_CLEANUP
842
843AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field sctp_dst])
844AT_KEYWORDS([ofp-print])
845AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
84603 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
84700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
848ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
84900 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
85000 04 00 18 00 00 00 00 00 19 00 10 80 00 24 02 \
85111 5d 00 00 00 00 00 00 \
852" 2], [0], [dnl
853OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,sctp actions=set_field:4445->sctp_dst
854], [dnl
855])
856AT_CLEANUP
857
b2a27ddc
BP
858dnl This triggered a buggy "instructions out of order" message earlier.
859AT_SETUP([OFPT_FLOW_MOD - OF1.3 - meter])
860AT_KEYWORDS([ofp-print])
861AT_CHECK([ovs-ofctl ofp-print "\
86204 0e 00 40 cf fe 6b 86 00 00 00 00 00 00 00 00 \
86300 00 00 00 00 00 00 00 00 00 00 00 00 00 03 e8 \
864ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
86500 01 00 04 00 00 00 00 00 06 00 08 00 00 00 01"], [0], [dnl
866OFPT_FLOW_MOD (OF1.3) (xid=0xcffe6b86): ADD priority=1000 actions=meter:1
867])
868AT_CLEANUP
869
d55b18c8
IY
870AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field ip_src])
871AT_KEYWORDS([ofp-print])
872AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
87303 13 00 68 52 33 45 04 00 01 00 00 00 00 00 00 \
87400 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
87500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
87600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
87700 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
87800 04 00 18 00 00 00 00 00 19 00 10 80 00 16 04 \
879c0 a8 03 5c 00 00 00 00 \
880" 2], [0], [dnl
881OFPST_FLOW reply (OF1.2) (xid=0x52334504):
882 cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,ip actions=set_field:192.168.3.92->ip_src
883], [dnl
884])
885AT_CLEANUP
886
887AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field ip_dst])
888AT_KEYWORDS([ofp-print])
889AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
89003 13 00 68 52 33 45 09 00 01 00 00 00 00 00 00 \
89100 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
89200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
89300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
89400 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
89500 04 00 18 00 00 00 00 00 19 00 10 80 00 18 04 \
896c0 a8 4a 7a 00 00 00 00 \
897" 2], [0], [dnl
898OFPST_FLOW reply (OF1.2) (xid=0x52334509):
899 cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,ip actions=set_field:192.168.74.122->ip_dst
900], [dnl
901])
902AT_CLEANUP
903
0d56eaf2
JS
904AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field sctp_src])
905AT_KEYWORDS([ofp-print])
906AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
90703 13 00 68 52 33 45 04 00 01 00 00 00 00 00 00 \
90800 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
90900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
91000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
91100 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
91200 04 00 18 00 00 00 00 00 19 00 10 80 00 22 02 \
9130d 06 00 00 00 00 00 00 \
914" 2], [0], [dnl
915OFPST_FLOW reply (OF1.2) (xid=0x52334504):
916 cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,sctp actions=set_field:3334->sctp_src
917], [dnl
918])
919AT_CLEANUP
920
921AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field sctp_dst])
922AT_KEYWORDS([ofp-print])
923AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
92403 13 00 68 52 33 45 09 00 01 00 00 00 00 00 00 \
92500 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
92600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
92700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
92800 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
92900 04 00 18 00 00 00 00 00 19 00 10 80 00 24 02 \
93011 5d 00 00 00 00 00 00 \
931" 2], [0], [dnl
932OFPST_FLOW reply (OF1.2) (xid=0x52334509):
933 cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,sctp actions=set_field:4445->sctp_dst
934], [dnl
935])
936AT_CLEANUP
937
9e1fd49b 938AT_SETUP([OFPT_PORT_MOD - OF1.0])
fec00620
BP
939AT_KEYWORDS([ofp-print])
940AT_CHECK([ovs-ofctl ofp-print "\
94101 0f 00 20 00 00 00 03 00 03 50 54 00 00 00 01 \
94200 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
943" 3], [0], [dnl
9e1fd49b
BP
944OFPT_PORT_MOD (xid=0x3):port: 3: addr:50:54:00:00:00:01
945 config: PORT_DOWN
946 mask: PORT_DOWN
947 advertise: UNCHANGED
948])
949AT_CLEANUP
950
951AT_SETUP([OFPT_PORT_MOD - OF1.1])
952AT_KEYWORDS([ofp-print])
953AT_CHECK([ovs-ofctl ofp-print "\
95402 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
95550 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
95600 00 00 00 00 00 00 00 \
957" 3], [0], [dnl
958OFPT_PORT_MOD (OF1.1) (xid=0x3):port: 3: addr:50:54:00:00:00:01
959 config: PORT_DOWN
960 mask: PORT_DOWN
fec00620
BP
961 advertise: UNCHANGED
962])
963AT_CLEANUP
964
bb2bc3c1
SH
965AT_SETUP([OFPT_PORT_MOD - OF1.2])
966AT_KEYWORDS([ofp-print])
967AT_CHECK([ovs-ofctl ofp-print "\
96803 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
96950 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
97000 00 00 00 00 00 00 00 \
971" 3], [0], [dnl
972OFPT_PORT_MOD (OF1.2) (xid=0x3):port: 3: addr:50:54:00:00:00:01
973 config: PORT_DOWN
974 mask: PORT_DOWN
975 advertise: UNCHANGED
976])
977AT_CLEANUP
978
2e1ae200
JR
979AT_SETUP([OFPT_PORT_MOD - OF1.3])
980AT_KEYWORDS([ofp-print])
981AT_CHECK([ovs-ofctl ofp-print "\
98204 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
98350 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
98400 00 00 00 00 00 00 00 \
985" 3], [0], [dnl
986OFPT_PORT_MOD (OF1.3) (xid=0x3):port: 3: addr:50:54:00:00:00:01
987 config: PORT_DOWN
988 mask: PORT_DOWN
989 advertise: UNCHANGED
990])
991AT_CLEANUP
992
918f2b82
AZ
993AT_SETUP([OFPT_TABLE_MOD - OF1.1])
994AT_KEYWORDS([ofp-print])
995AT_CHECK([ovs-ofctl ofp-print "\
99602 11 00 10 00 00 00 02 02 00 00 00 00 00 00 02 \
997" 3], [0], [dnl
998OFPT_TABLE_MOD (OF1.1) (xid=0x2): table_id=2, flow_miss_config=drop
999])
1000AT_CLEANUP
1001
1002AT_SETUP([OFPT_TABLE_MOD - OF1.2])
1003AT_KEYWORDS([ofp-print])
1004AT_CHECK([ovs-ofctl ofp-print "\
100503 11 00 10 00 00 00 02 02 00 00 00 00 00 00 01 \
1006" 3], [0], [dnl
1007OFPT_TABLE_MOD (OF1.2) (xid=0x2): table_id=2, flow_miss_config=continue
1008])
1009AT_CLEANUP
1010
307873b7 1011# ofp_table_mod.config is actually "reserved for future use" in OF1.3.
918f2b82
AZ
1012AT_SETUP([OFPT_TABLE_MOD - OF1.3])
1013AT_KEYWORDS([ofp-print])
1014AT_CHECK([ovs-ofctl ofp-print "\
101504 11 00 10 00 00 00 02 02 00 00 00 00 00 00 00 \
1016" 3], [0], [dnl
1017OFPT_TABLE_MOD (OF1.3) (xid=0x2): table_id=2, flow_miss_config=controller
1018])
1019AT_CLEANUP
1020
fec00620
BP
1021AT_SETUP([OFPST_DESC request])
1022AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1023AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100000000"], [0], [dnl
1024OFPST_DESC request (xid=0x1):
1025])
1026AT_CLEANUP
1027
1028AT_SETUP([OFPST_DESC reply])
1029AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1030AT_CHECK([ovs-ofctl ofp-print "\
103101 11 04 2c 00 00 00 01 00 00 00 00 4e 69 63 69 \
e0edde6f
RS
103272 61 2c 20 49 6e 63 2e 00 00 00 00 00 00 00 00 \
103300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
fec00620
BP
103400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
103500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
103600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
103700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
103800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
103900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
104000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
104100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
104200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
104300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
104400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
104500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
104600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
104700 00 00 00 00 00 00 00 00 00 00 00 4f 70 65 6e \
104820 76 53 77 69 74 63 68 00 00 00 00 00 00 00 00 \
104900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
105000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
105100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
105200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
105300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
105400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
105500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
105600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
105700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
105800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
105900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
106000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
106100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
106200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
106300 00 00 00 00 00 00 00 00 00 00 00 31 2e 31 2e \
106430 70 72 65 32 00 00 00 00 00 00 00 00 00 00 00 \
106500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
106600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
106700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
106800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
106900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
107000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
107100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
107200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
107300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
107400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
107500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
107600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
107700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
107800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
107900 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
108000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
108100 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
108200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
108300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
108400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
108500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
108600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
108700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
108800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
108900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
109000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
109100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
109200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
109300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
109400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
109500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
109600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
109700 00 00 00 00 00 00 00 00 00 00 00 \
1098"], [0], [dnl
1099OFPST_DESC reply (xid=0x1):
e0edde6f 1100Manufacturer: Nicira, Inc.
fec00620
BP
1101Hardware: Open vSwitch
1102Software: 1.1.0pre2
1103Serial Num: None
1104DP Description: None
1105])
1106AT_CLEANUP
1107
0157ad3a 1108AT_SETUP([OFPST_FLOW request - OF1.0])
fec00620
BP
1109AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1110AT_CHECK([ovs-ofctl ofp-print "\
111101 10 00 38 00 00 00 04 00 01 00 00 00 38 20 ff \
1112ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
111300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
111400 00 00 00 ff 00 ff ff \
1115"], [0], [dnl
54ae6fa8 1116OFPST_FLOW request (xid=0x4): @&t@
fec00620
BP
1117])
1118AT_CLEANUP
1119
0157ad3a
SH
1120AT_SETUP([OFPST_FLOW request - OF1.2])
1121AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1122AT_CHECK([ovs-ofctl ofp-print "\
112303 12 00 38 00 00 00 02 00 01 00 00 00 00 00 00 \
1124ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
112500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
112600 01 00 04 00 00 00 00 \
1127"], [0], [dnl
1128OFPST_FLOW request (OF1.2) (xid=0x2): @&t@
1129])
1130AT_CLEANUP
1131
2e1ae200
JR
1132AT_SETUP([OFPST_FLOW request - OF1.3])
1133AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1134AT_CHECK([ovs-ofctl ofp-print "\
113504 12 00 38 00 00 00 02 00 01 00 00 00 00 00 00 \
1136ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
113700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
113800 01 00 04 00 00 00 00 \
1139"], [0], [dnl
1140OFPST_FLOW request (OF1.3) (xid=0x2): @&t@
1141])
1142AT_CLEANUP
1143
6ec5f0c5 1144AT_SETUP([OFPST_FLOW reply - OF1.0])
fec00620
BP
1145AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1146AT_CHECK([ovs-ofctl ofp-print "\
05b8f1c2 114701 11 01 e4 00 00 00 04 00 01 00 00 00 60 00 00 \
fec00620
BP
114800 00 00 00 00 03 50 54 00 00 00 05 50 54 00 00 \
114900 06 ff ff 00 00 08 06 00 02 00 00 c0 a8 00 01 \
1150c0 a8 00 02 00 00 00 00 00 00 00 04 0b eb c2 00 \
1151ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
115200 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
115300 00 00 3c 00 00 00 08 00 01 00 00 00 60 00 00 \
115400 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
115500 05 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 02 \
1156c0 a8 00 01 00 00 00 00 00 00 00 08 35 a4 e9 00 \
1157ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
115800 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
115900 00 04 fa 00 00 00 08 00 03 00 00 00 60 00 00 \
116000 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
116100 05 ff ff 00 00 08 06 00 01 00 00 c0 a8 00 02 \
1162c0 a8 00 01 00 00 00 00 00 00 00 04 10 b0 76 00 \
1163ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
116400 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
116500 00 00 3c 00 00 00 08 00 03 00 00 00 60 00 00 \
fbc7ed06 116600 00 00 01 00 03 50 54 00 00 00 05 50 54 00 00 \
fec00620
BP
116700 06 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 01 \
1168c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \
fbc7ed06 116980 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
fec00620
BP
117000 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
117100 00 04 fa 00 00 00 08 00 01 00 00 \
05b8f1c2
BP
117200 58 02 00 00 3f ff ff 00 00 00 00 00 00 00 00 \
117300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
117400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
117500 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 \
117600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
117700 00 00 00 00 00 00 00 \
fec00620
BP
1178"], [0], [dnl
1179OFPST_FLOW reply (xid=0x4):
666d0863 1180 cookie=0x0, duration=4.2s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 actions=output:1
b9718b7b 1181 cookie=0x0, duration=8.9s, table=0, n_packets=13, n_bytes=1274, idle_timeout=5, priority=65535,icmp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,icmp_type=0,icmp_code=0 actions=output:3
666d0863 1182 cookie=0x0, duration=4.28s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=1,nw_tos=0,tp_src=0,tp_dst=0 actions=output:3
b9718b7b 1183 cookie=0x0, duration=9.096s, table=0, n_packets=13, n_bytes=1274, idle_timeout=5, icmp,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,icmp_type=8,icmp_code=0 actions=output:1
05b8f1c2 1184 cookie=0x0, duration=0s, table=2, n_packets=0, n_bytes=0, actions=drop
fec00620
BP
1185])
1186AT_CLEANUP
1187
6ec5f0c5
SH
1188AT_SETUP([OFPST_FLOW reply - OF1.2])
1189AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1190AT_CHECK([ovs-ofctl ofp-print "\
119103 13 01 78 00 00 00 02 00 01 00 00 00 00 00 00 \
119200 78 00 00 00 00 00 03 01 5e f3 c0 80 00 00 00 \
119300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
119400 00 00 00 00 00 00 01 00 00 00 00 00 00 00 62 \
119500 01 00 2d 80 00 00 04 00 00 00 02 80 00 06 06 \
1196ca da ad d6 0d 37 80 00 0a 02 08 00 80 00 10 01 \
119700 80 00 04 08 00 00 00 00 00 00 00 00 00 00 00 \
119800 04 00 18 00 00 00 00 00 00 00 10 00 00 00 02 \
119905 dc 00 00 00 00 00 00 00 78 00 00 00 00 00 04 \
120020 7c 0a 40 80 00 00 00 00 00 00 00 00 00 00 00 \
120100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 \
120200 00 00 00 00 00 00 8c 00 01 00 2d 80 00 00 04 \
120300 00 00 02 80 00 06 06 52 54 00 c3 00 89 80 00 \
12040a 02 08 00 80 00 10 01 00 80 00 04 08 00 00 00 \
120500 00 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
120600 00 00 10 00 00 00 02 05 dc 00 00 00 00 00 00 \
120700 78 00 00 00 00 00 04 20 a9 d1 00 80 00 00 00 \
120800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
120900 00 00 00 00 00 00 01 00 00 00 00 00 00 00 2a \
121000 01 00 2d 80 00 00 04 00 00 00 02 80 00 06 06 \
121152 54 00 97 00 69 80 00 0a 02 08 00 80 00 10 01 \
121200 80 00 04 08 00 00 00 00 00 00 00 00 00 00 00 \
121300 04 00 18 00 00 00 00 00 00 00 10 00 00 00 02 \
121405 dc 00 00 00 00 00 00 \
1215"], [0], [dnl
1216OFPST_FLOW reply (OF1.2) (xid=0x2):
1217 cookie=0x0, duration=3.023s, table=0, n_packets=1, n_bytes=98, ip,metadata=0,in_port=2,dl_dst=ca:da:ad:d6:0d:37,nw_tos=0 actions=output:2
1218 cookie=0x0, duration=4.545s, table=0, n_packets=2, n_bytes=140, ip,metadata=0,in_port=2,dl_dst=52:54:00:c3:00:89,nw_tos=0 actions=output:2
1219 cookie=0x0, duration=4.548s, table=0, n_packets=1, n_bytes=42, ip,metadata=0,in_port=2,dl_dst=52:54:00:97:00:69,nw_tos=0 actions=output:2
1220])
1221AT_CLEANUP
1222
617da9cd 1223AT_SETUP([OFPST_AGGREGATE request - OF1.0])
fec00620
BP
1224AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1225AT_CHECK([ovs-ofctl ofp-print "\
122601 10 00 38 00 00 00 04 00 02 00 00 00 38 20 ff \
1227ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
122800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
122900 00 00 00 ff 00 ff ff \
1230"], [0], [dnl
54ae6fa8 1231OFPST_AGGREGATE request (xid=0x4): @&t@
fec00620
BP
1232])
1233AT_CLEANUP
1234
617da9cd
SH
1235AT_SETUP([OFPST_AGGREGATE request - OF1.2])
1236AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1237AT_CHECK([ovs-ofctl ofp-print "\
123803 12 00 38 00 00 00 02 00 02 00 00 00 00 00 00 \
1239ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
124000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
124100 01 00 04 00 00 00 00 \
1242"], [0], [dnl
1243OFPST_AGGREGATE request (OF1.2) (xid=0x2): @&t@
1244])
1245AT_CLEANUP
1246
2e1ae200
JR
1247AT_SETUP([OFPST_AGGREGATE request - OF1.3])
1248AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1249AT_CHECK([ovs-ofctl ofp-print "\
125004 12 00 38 00 00 00 02 00 02 00 00 00 00 00 00 \
1251ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
125200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
125300 01 00 04 00 00 00 00 \
1254"], [0], [dnl
1255OFPST_AGGREGATE request (OF1.3) (xid=0x2): @&t@
1256])
1257AT_CLEANUP
1258
617da9cd 1259AT_SETUP([OFPST_AGGREGATE reply - OF1.0])
fec00620
BP
1260AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1261AT_CHECK([ovs-ofctl ofp-print "\
126201 11 00 24 00 00 00 04 00 02 00 00 00 00 00 00 \
126300 00 01 82 00 00 00 00 00 00 93 78 00 00 00 04 \
126400 00 00 00 \
1265"], [0], [dnl
1266OFPST_AGGREGATE reply (xid=0x4): packet_count=386 byte_count=37752 flow_count=4
1267])
1268AT_CLEANUP
1269
617da9cd
SH
1270AT_SETUP([OFPST_AGGREGATE reply - OF1.2])
1271AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1272AT_CHECK([ovs-ofctl ofp-print "\
127303 13 00 28 00 00 00 02 00 02 00 00 00 00 00 00 \
127400 00 00 00 00 00 00 79 00 00 00 00 00 00 4b 4f \
127500 00 00 03 00 00 00 00 \
1276"], [0], [dnl
1277OFPST_AGGREGATE reply (OF1.2) (xid=0x2): packet_count=121 byte_count=19279 flow_count=3
1278])
1279AT_CLEANUP
1280
2e1ae200
JR
1281AT_SETUP([OFPST_AGGREGATE reply - OF1.3])
1282AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1283AT_CHECK([ovs-ofctl ofp-print "\
128404 13 00 28 00 00 00 02 00 02 00 00 00 00 00 00 \
128500 00 00 00 00 00 00 79 00 00 00 00 00 00 4b 4f \
128600 00 00 03 00 00 00 00 \
1287"], [0], [dnl
1288OFPST_AGGREGATE reply (OF1.3) (xid=0x2): packet_count=121 byte_count=19279 flow_count=3
1289])
1290AT_CLEANUP
1291
307975da 1292AT_SETUP([OFPST_TABLE request - OF1.0])
fec00620
BP
1293AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1294AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100030000"], [0], [dnl
1295OFPST_TABLE request (xid=0x1):
1296])
1297AT_CLEANUP
1298
307975da
SH
1299AT_SETUP([OFPST_TABLE request - OF1.1])
1300AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1301AT_CHECK([ovs-ofctl ofp-print "02120010000000020003000000000000"], [0], [dnl
1302OFPST_TABLE request (OF1.1) (xid=0x2):
1303])
1304AT_CLEANUP
1305
1306AT_SETUP([OFPST_TABLE request - OF1.2])
1307AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1308AT_CHECK([ovs-ofctl ofp-print "03120010000000020003000000000000"], [0], [dnl
1309OFPST_TABLE request (OF1.2) (xid=0x2):
1310])
1311AT_CLEANUP
1312
2e1ae200
JR
1313AT_SETUP([OFPST_TABLE request - OF1.3])
1314AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1315AT_CHECK([ovs-ofctl ofp-print "04120010000000020003000000000000"], [0], [dnl
1316OFPST_TABLE request (OF1.3) (xid=0x2):
1317])
1318AT_CLEANUP
1319
26df8b3e 1320AT_SETUP([OFPST_TABLE reply - OF1.0])
fec00620
BP
1321AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1322AT_CHECK([ovs-ofctl ofp-print "\
132301 11 00 4c 00 00 00 01 00 03 00 00 00 00 00 00 \
132463 6c 61 73 73 69 66 69 65 72 00 00 00 00 00 00 \
132500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
132600 3f ff ff 00 10 00 00 00 00 00 0b 00 00 00 00 \
132700 00 00 00 00 00 00 00 00 00 00 00 \
1328"], [0], [dnl
1329OFPST_TABLE reply (xid=0x1): 1 tables
1330 0: classifier: wild=0x3fffff, max=1048576, active=11
1331 lookup=0, matched=0
1332])
1333AT_CLEANUP
1334
26df8b3e
SH
1335AT_SETUP([OFPST_TABLE reply - OF1.2])
1336AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1337(mid="wild=0xfffffffff, max=1000000,"
1338 tail="
1339 match=0xfffffffff, instructions=0x00000007, config=0x00000000
1340 write_actions=0x00000000, apply_actions=0x00000000
1341 write_setfields=0x0000000fffffffff
1342 apply_setfields=0x0000000fffffffff
1343 metadata_match=0x0000000000000000
1344 metadata_write=0x0000000000000000"
1345 echo "OFPST_TABLE reply (OF1.2) (xid=0x2): 255 tables
1346 0: classifier: $mid active=1
1347 lookup=74614, matched=106024$tail"
1348 x=1
1349 while test $x -lt 254; do
1350 printf " %d: %-8s: $mid active=0
1351 lookup=0, matched=0$tail
1352" $x table$x
1353 x=`expr $x + 1`
1354 done
1355 echo " 254: table254: $mid active=2
1356 lookup=0, matched=0$tail") > expout
1357
1358(pad32="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
1359 pad7="00 00 00 00 00 00 00 "
1360 mid="00 00 00 0f ff ff ff ff \
136100 00 00 0f ff ff ff ff 00 00 00 00 00 00 00 00 \
136200 00 00 0f ff ff ff ff 00 00 00 0f ff ff ff ff \
136300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
136400 00 00 07 00 00 00 00 00 0f 42 40 "
1365 tail="00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
1366
1367 echo -n "03 13 7f 90 00 00 00 02 00 03 00 00 00 00 00 00 "
1368
1369 x=0
1370 printf "%02x $pad7" $x
1371 printf "%s$pad32" "classifier" | od -A n -t x1 -v -N 32 | tr '\n' ' '
1372 echo -n "$mid 00 00 00 01 "
1373 echo -n "00 00 00 00 00 01 23 76 00 00 00 00 00 01 9e 28 "
1374
1375 x=1
1376 while test $x -lt 254; do
1377 printf "%02x $pad7" $x
1378 printf "%s$pad32" "table$x" | od -A n -t x1 -v -N 32 | tr '\n' ' '
1379 echo -n "$mid 00 00 00 00 $tail "
1380 x=`expr $x + 1`
1381 done
1382
1383 x=254
1384 printf "%02x $pad7" $x
1385 printf "%s$pad32" "table$x" | od -A n -t x1 -v -N 32 | tr '\n' ' '
1386 echo -n "$mid 00 00 00 02 $tail") > in
1387AT_CHECK([ovs-ofctl ofp-print "$(cat in)"], [0], [expout])
1388AT_CLEANUP
1389
2e1ae200
JR
1390AT_SETUP([OFPST_TABLE reply - OF1.3])
1391AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1392AT_CHECK([ovs-ofctl ofp-print "\
139304 13 00 40 00 00 00 01 00 03 00 00 00 00 00 00 \
139400 00 00 00 00 00 00 0b 00 00 00 00 00 00 02 00 \
139500 00 00 00 00 00 01 00 01 00 00 00 00 00 00 0c \
139600 00 00 00 00 00 02 01 00 00 00 00 00 00 01 01 \
1397"], [0], [dnl
1398OFPST_TABLE reply (OF1.3) (xid=0x1): 2 tables
1399 0: active=11, lookup=512, matched=256
1400 1: active=12, lookup=513, matched=257
1401])
1402AT_CLEANUP
1403
f8e4867e 1404AT_SETUP([OFPST_PORT request - 1.0])
fec00620
BP
1405AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1406AT_CHECK([ovs-ofctl ofp-print "\
140701 10 00 14 00 00 00 01 00 04 00 00 ff ff 00 00 \
140800 00 00 00 \
1409"], [0], [dnl
e1db42d6 1410OFPST_PORT request (xid=0x1): port_no=ANY
fec00620
BP
1411])
1412AT_CLEANUP
1413
f8e4867e
SH
1414AT_SETUP([OFPST_PORT request - 1.1])
1415AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1416AT_CHECK([ovs-ofctl ofp-print "\
141702 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
1418ff ff ff ff 00 00 00 00 \
1419"], [0], [dnl
e1db42d6 1420OFPST_PORT request (OF1.1) (xid=0x2): port_no=ANY
f8e4867e
SH
1421])
1422AT_CLEANUP
1423
1424AT_SETUP([OFPST_PORT request - 1.2])
1425AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1426AT_CHECK([ovs-ofctl ofp-print "\
142703 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
1428ff ff ff ff 00 00 00 00 \
1429"], [0], [dnl
e1db42d6 1430OFPST_PORT request (OF1.2) (xid=0x2): port_no=ANY
f8e4867e
SH
1431])
1432AT_CLEANUP
1433
2e1ae200
JR
1434AT_SETUP([OFPST_PORT request - 1.3])
1435AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1436AT_CHECK([ovs-ofctl ofp-print "\
143704 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
1438ff ff ff ff 00 00 00 00 \
1439"], [0], [dnl
e1db42d6 1440OFPST_PORT request (OF1.3) (xid=0x2): port_no=ANY
2e1ae200
JR
1441])
1442AT_CLEANUP
1443
f8e4867e 1444AT_SETUP([OFPST_PORT reply - OF1.0])
fec00620
BP
1445AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1446AT_CHECK([ovs-ofctl ofp-print "\
144701 11 01 ac 00 00 00 01 00 04 00 00 00 03 00 00 \
144800 00 00 00 00 00 00 00 00 00 4d 20 00 00 00 00 \
144900 00 14 32 00 00 00 00 00 0f 60 4e 00 00 00 00 \
145000 05 71 bc 00 00 00 00 00 00 00 00 00 00 00 00 \
145100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
145200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
145300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
145400 00 00 00 ff fe 00 00 00 00 00 00 00 00 00 00 \
145500 00 02 ac 00 00 00 00 00 00 01 f5 00 00 00 00 \
145600 01 0c 8c 00 00 00 00 00 00 db 1c 00 00 00 00 \
145700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
145800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
145900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
146000 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
146100 00 00 00 00 00 00 00 00 00 06 be 00 00 00 00 \
146200 00 05 84 00 00 00 00 00 02 34 b4 00 00 00 00 \
146300 02 23 d4 00 00 00 00 00 00 00 00 00 00 00 00 \
146400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
146500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
146600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
146700 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 \
146800 00 14 12 00 00 00 00 00 00 14 66 00 00 00 00 \
146900 04 a2 54 00 00 00 00 00 05 8a 1e 00 00 00 00 \
147000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
147100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
147200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
147300 00 00 00 00 00 00 00 00 00 00 00 \
1474"], [0], [dnl
1475OFPST_PORT reply (xid=0x1): 4 ports
1476 port 3: rx pkts=19744, bytes=1007694, drop=0, errs=0, frame=0, over=0, crc=0
1477 tx pkts=5170, bytes=356796, drop=0, errs=0, coll=0
e1db42d6 1478 port LOCAL: rx pkts=684, bytes=68748, drop=0, errs=0, frame=0, over=0, crc=0
fec00620
BP
1479 tx pkts=501, bytes=56092, drop=0, errs=0, coll=0
1480 port 2: rx pkts=1726, bytes=144564, drop=0, errs=0, frame=0, over=0, crc=0
1481 tx pkts=1412, bytes=140244, drop=0, errs=0, coll=0
1482 port 1: rx pkts=5138, bytes=303700, drop=0, errs=0, frame=0, over=0, crc=0
1483 tx pkts=5222, bytes=363038, drop=0, errs=0, coll=0
1484])
1485AT_CLEANUP
1486
f8e4867e
SH
1487AT_SETUP([OFPST_PORT reply - OF1.2])
1488AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1489AT_CHECK([ovs-ofctl ofp-print "\
149003 13 01 48 00 00 00 02 00 04 00 00 00 00 00 00 \
149100 00 00 02 00 00 00 00 00 00 00 00 00 01 95 56 \
149200 00 00 00 00 00 00 88 00 00 00 00 02 5d 08 98 \
149300 00 00 00 00 00 2c f8 00 00 00 00 00 00 00 00 \
149400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
149500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
149600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
149700 00 00 00 00 00 00 00 ff ff ff fe 00 00 00 00 \
149800 00 00 00 00 00 00 44 00 00 00 00 00 00 9d 2c \
149900 00 00 00 00 00 16 7c 00 00 00 00 01 1e 36 44 \
150000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
150100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
150200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
150300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
150400 00 00 01 00 00 00 00 00 00 00 00 00 00 00 44 \
150500 00 00 00 00 00 9d 2c 00 00 00 00 00 00 16 7c \
150600 00 00 00 01 1e 36 44 00 00 00 00 00 00 00 00 \
150700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
150800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
150900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
151000 00 00 00 00 00 00 00 \
1511"], [0], [dnl
1512OFPST_PORT reply (OF1.2) (xid=0x2): 3 ports
1513 port 2: rx pkts=103766, bytes=39651480, drop=0, errs=0, frame=0, over=0, crc=0
1514 tx pkts=136, bytes=11512, drop=0, errs=0, coll=0
e1db42d6 1515 port LOCAL: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
f8e4867e
SH
1516 tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1517 port 1: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1518 tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1519])
1520AT_CLEANUP
1521
65e0be10
BP
1522AT_SETUP([OFPST_PORT reply - OF1.3])
1523AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1524AT_CHECK([ovs-ofctl ofp-print "\
152504 13 01 60 00 00 00 02 00 04 00 00 00 00 00 00 \
152600 00 00 02 00 00 00 00 00 00 00 00 00 01 95 56 \
152700 00 00 00 00 00 00 88 00 00 00 00 02 5d 08 98 \
152800 00 00 00 00 00 2c f8 00 00 00 00 00 00 00 00 \
152900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
153000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
153100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
153200 00 00 00 00 00 00 00 00 00 00 01 00 0f 42 40 \
1533ff ff ff fe 00 00 00 00 \
153400 00 00 00 00 00 00 44 00 00 00 00 00 00 9d 2c \
153500 00 00 00 00 00 16 7c 00 00 00 00 01 1e 36 44 \
153600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
153700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
153800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
153900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1540ff ff ff ff ff ff ff ff \
154100 00 00 01 00 00 00 00 00 00 00 00 00 00 00 44 \
154200 00 00 00 00 00 9d 2c 00 00 00 00 00 00 16 7c \
154300 00 00 00 01 1e 36 44 00 00 00 00 00 00 00 00 \
154400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
154500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
154600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
154700 00 00 00 00 00 00 00 00 00 00 00 07 54 d4 c0 \
1548"], [0], [dnl
1549OFPST_PORT reply (OF1.3) (xid=0x2): 3 ports
1550 port 2: rx pkts=103766, bytes=39651480, drop=0, errs=0, frame=0, over=0, crc=0
1551 tx pkts=136, bytes=11512, drop=0, errs=0, coll=0
1552 duration=1.001s
1553 port LOCAL: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1554 tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1555 port 1: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1556 tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1557 duration=0.123s
1558])
1559AT_CLEANUP
1560
64626975 1561AT_SETUP([OFPST_QUEUE request - OF1.0])
fec00620
BP
1562AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1563AT_CHECK([ovs-ofctl ofp-print "\
156401 10 00 14 00 00 00 01 00 05 00 00 ff fc 00 00 \
1565ff ff ff ff \
1566"], [0], [dnl
7f05e7ab 1567OFPST_QUEUE request (xid=0x1):port=ANY queue=ALL
fec00620
BP
1568])
1569AT_CLEANUP
1570
64626975
SH
1571AT_SETUP([OFPST_QUEUE request - OF1.1])
1572AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1573AT_CHECK([ovs-ofctl ofp-print "\
157402 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
7f05e7ab 1575ff ff ff ff ff ff ff ff \
64626975 1576"], [0], [dnl
7f05e7ab 1577OFPST_QUEUE request (OF1.1) (xid=0x2):port=ANY queue=ALL
64626975
SH
1578])
1579AT_CLEANUP
1580
1581AT_SETUP([OFPST_QUEUE request - OF1.2])
1582AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1583AT_CHECK([ovs-ofctl ofp-print "\
158403 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
7f05e7ab 1585ff ff ff ff ff ff ff ff \
64626975 1586"], [0], [dnl
7f05e7ab 1587OFPST_QUEUE request (OF1.2) (xid=0x2):port=ANY queue=ALL
64626975
SH
1588])
1589AT_CLEANUP
1590
2e1ae200
JR
1591AT_SETUP([OFPST_QUEUE request - OF1.3])
1592AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1593AT_CHECK([ovs-ofctl ofp-print "\
159404 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
1595ff ff ff ff ff ff ff ff \
1596"], [0], [dnl
1597OFPST_QUEUE request (OF1.3) (xid=0x2):port=ANY queue=ALL
1598])
1599AT_CLEANUP
1600
64626975 1601AT_SETUP([OFPST_QUEUE reply - OF1.0])
fec00620
BP
1602AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1603AT_CHECK([ovs-ofctl ofp-print "\
160401 11 00 cc 00 00 00 01 00 05 00 00 00 03 00 00 \
160500 00 00 01 00 00 00 00 00 00 01 2e 00 00 00 00 \
160600 00 00 01 00 00 00 00 00 00 00 00 00 03 00 00 \
160700 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
160800 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
160900 00 00 01 00 00 00 00 00 00 08 34 00 00 00 00 \
161000 00 00 14 00 00 00 00 00 00 00 00 00 02 00 00 \
161100 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
161200 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
161300 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 \
161400 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
161500 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
161600 00 00 00 00 00 00 00 00 00 00 00 \
1617"], [0], [dnl
1618OFPST_QUEUE reply (xid=0x1): 6 queues
6dc34a0d
BP
1619 port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
1620 port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
1621 port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
1622 port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
1623 port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
1624 port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
fec00620
BP
1625])
1626AT_CLEANUP
1627
64626975
SH
1628AT_SETUP([OFPST_QUEUE reply - OF1.1])
1629AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1630AT_CHECK([ovs-ofctl ofp-print "\
163102 13 00 d0 00 00 00 01 00 05 00 00 00 00 00 00 \
163200 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
163300 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
163400 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
163500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
163600 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
163700 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
163800 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
163900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
164000 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
164100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
164200 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
164300 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1644"], [0], [dnl
1645OFPST_QUEUE reply (OF1.1) (xid=0x1): 6 queues
6dc34a0d
BP
1646 port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
1647 port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
1648 port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
1649 port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
1650 port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
1651 port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
64626975
SH
1652])
1653AT_CLEANUP
1654
1655AT_SETUP([OFPST_QUEUE reply - OF1.2])
1656AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1657AT_CHECK([ovs-ofctl ofp-print "\
165803 13 00 d0 00 00 00 01 00 05 00 00 00 00 00 00 \
165900 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
166000 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
166100 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
166200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
166300 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
166400 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
166500 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
166600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
166700 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
166800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
166900 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
167000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1671"], [0], [dnl
1672OFPST_QUEUE reply (OF1.2) (xid=0x1): 6 queues
6dc34a0d
BP
1673 port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
1674 port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
1675 port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
1676 port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
1677 port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
1678 port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
1679])
1680AT_CLEANUP
be0c30df
BP
1681
1682AT_SETUP([OFPST_QUEUE reply - OF1.3])
1683AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1684AT_CHECK([ovs-ofctl ofp-print "\
168504 13 01 00 00 00 00 01 00 05 00 00 00 00 00 00 \
168600 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
168700 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
168800 00 00 64 1d cd 65 00 \
168900 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
169000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
169100 00 00 64 1d cd 65 00 \
169200 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
169300 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
169400 00 00 64 1d cd 65 00 \
169500 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
169600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
169700 00 00 64 1d cd 65 00 \
169800 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
169900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
170000 00 00 64 1d cd 65 00 \
170100 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
170200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1703ff ff ff ff ff ff ff ff \
1704"], [0], [dnl
1705OFPST_QUEUE reply (OF1.3) (xid=0x1): 6 queues
6dc34a0d
BP
1706 port 3 queue 1: bytes=302, pkts=1, errors=0, duration=100.5s
1707 port 3 queue 2: bytes=0, pkts=0, errors=0, duration=100.5s
1708 port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=100.5s
1709 port 2 queue 2: bytes=0, pkts=0, errors=0, duration=100.5s
1710 port 1 queue 1: bytes=0, pkts=0, errors=0, duration=100.5s
1711 port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
64626975
SH
1712])
1713AT_CLEANUP
1714
7395c052
NZ
1715AT_SETUP([OFPST_GROUP request])
1716AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1717AT_CHECK([ovs-ofctl ofp-print "\
171802 12 00 18 00 00 00 02 00 06 00 00 00 00 00 00 \
1719ff ff ff ff 00 00 00 00 \
1720"], [0], [OFPST_GROUP request (OF1.1) (xid=0x2): group_id=ANY
1721])
1722AT_CLEANUP
1723
1724AT_SETUP([OFPST_GROUP reply - OF1.1])
1725AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1726AT_CHECK([ovs-ofctl ofp-print "\
172702 13 00 a0 00 00 00 02 00 06 00 00 00 00 00 00 \
172800 50 00 00 87 65 43 21 00 00 00 04 00 00 00 00 \
172900 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
173000 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
173100 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
173200 00 00 00 00 00 66 66 00 00 00 00 00 33 33 33 \
173300 40 00 00 00 00 00 05 00 00 00 02 00 00 00 00 \
173400 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
173500 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
173600 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1737"], [0], [dnl
1738OFPST_GROUP reply (OF1.1) (xid=0x2):
1739 group_id=2271560481,ref_count=4,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962,bucket2:packet_count=26214,byte_count=3355443
1740 group_id=5,ref_count=2,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962
1741])
1742AT_CLEANUP
1743
1744AT_SETUP([OFPST_GROUP reply - OF1.3])
1745AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1746AT_CHECK([ovs-ofctl ofp-print "\
174704 13 00 b0 00 00 00 02 00 06 00 00 00 00 00 00 \
174800 58 00 00 87 65 43 21 00 00 00 04 00 00 00 00 \
174900 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
175000 00 00 12 1d cd 65 00 \
175100 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
175200 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
175300 00 00 00 00 00 66 66 00 00 00 00 00 33 33 33 \
175400 48 00 00 00 00 00 05 00 00 00 02 00 00 00 00 \
175500 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
175600 00 00 10 1d cd 65 00 \
175700 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
175800 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1759"], [0], [dnl
1760OFPST_GROUP reply (OF1.3) (xid=0x2):
1761 group_id=2271560481,duration=18.5s,ref_count=4,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962,bucket2:packet_count=26214,byte_count=3355443
1762 group_id=5,duration=16.5s,ref_count=2,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962
1763])
1764AT_CLEANUP
1765
1766AT_SETUP([OFPST_GROUP_DESC request])
1767AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1768AT_CHECK([ovs-ofctl ofp-print "\
176902 12 00 10 00 00 00 02 00 07 00 00 00 00 00 00 \
1770"], [0], [OFPST_GROUP_DESC request (OF1.1) (xid=0x2):
1771])
1772AT_CLEANUP
1773
1774AT_SETUP([OFPST_GROUP_DESC reply])
1775AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1776AT_CHECK([ovs-ofctl ofp-print "\
177702 13 00 78 00 00 00 02 00 07 00 00 00 00 00 00 \
177800 68 01 00 00 00 20 00 \
177900 20 00 64 00 00 00 01 ff ff ff ff 00 00 00 00 \
178000 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
178100 20 00 c8 00 00 00 02 ff ff ff ff 00 00 00 00 \
178200 00 00 10 00 00 00 02 00 00 00 00 00 00 00 00 \
178300 20 00 c8 00 00 00 03 ff ff ff ff 00 00 00 00 \
178400 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
1785"], [0], [dnl
1786OFPST_GROUP_DESC reply (OF1.1) (xid=0x2):
1787 group_id=8192,type=select,bucket=weight:100,watch_port:1,actions=output:1,bucket=weight:200,watch_port:2,actions=output:2,bucket=weight:200,watch_port:3,actions=output:3
1788])
1789AT_CLEANUP
1790
1791AT_SETUP([OFPST_GROUP_FEATURES request])
1792AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1793AT_CHECK([ovs-ofctl ofp-print "\
179403 12 00 10 00 00 00 02 00 08 00 00 00 00 00 00 \
1795"], [0], [OFPST_GROUP_FEATURES request (OF1.2) (xid=0x2):
1796])
1797AT_CLEANUP
1798
1799AT_SETUP([OFPST_GROUP_FEATURES reply])
1800AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1801AT_CHECK([ovs-ofctl ofp-print "\
180203 13 00 38 00 00 00 02 00 08 00 00 00 00 00 00 \
180300 00 00 0f 00 00 00 0f \
180400 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 \
180500 00 00 01 00 00 00 03 00 00 00 07 00 00 00 0f \
1806"], [0], [dnl
1807OFPST_GROUP_FEATURES reply (OF1.2) (xid=0x2):
1808 Group table:
1809 Types: 0xf
1810 Capabilities: 0xf
1811 All group :
1812 max_groups = 0x1 actions=0x00000001
1813 Select group :
1814 max_groups = 0x2 actions=0x00000003
1815 Indirect group :
1816 max_groups = 0x3 actions=0x00000007
1817 Fast Failover group :
1818 max_groups = 0x4 actions=0x0000000f
1819])
1820AT_CLEANUP
1821
1822AT_SETUP([OFPST_PORT_DESC request - OF1.0])
1823AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1824AT_CHECK([ovs-ofctl ofp-print "0110000c00000001000d0000"], [0], [dnl
1825OFPST_PORT_DESC request (xid=0x1):
1826])
1827AT_CLEANUP
1828
2be393ed
JP
1829AT_SETUP([OFPST_PORT_DESC reply - OF1.0])
1830AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1831AT_CHECK([ovs-ofctl ofp-print "\
183201 11 00 3c 00 00 00 00 00 0d 00 00 00 03 50 54 \
183300 00 00 01 65 74 68 30 00 00 00 00 00 00 00 00 \
183400 00 00 00 00 00 00 01 00 00 00 01 00 00 02 08 \
183500 00 02 8f 00 00 02 8f 00 00 00 00 \
1836"], [0], [dnl
1837OFPST_PORT_DESC reply (xid=0x0):
1838 3(eth0): addr:50:54:00:00:00:01
1839 config: PORT_DOWN
1840 state: LINK_DOWN
1841 current: 100MB-FD AUTO_NEG
1842 advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
1843 supported: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
1844 speed: 100 Mbps now, 100 Mbps max
1845])
1846AT_CLEANUP
1847
638a19b0
JR
1848AT_SETUP([OFPT_METER_MOD request - OF1.3])
1849AT_KEYWORDS([ofp-print])
1850AT_CHECK([ovs-ofctl ofp-print "\
185104 1d 00 20 00 00 00 02 00 00 00 0d 00 00 00 05 \
185200 01 00 10 00 00 04 00 00 00 00 80 00 00 00 00 \
1853"], [0], [dnl
1854OFPT_METER_MOD (OF1.3) (xid=0x2): ADD meter=5 kbps burst stats bands=
1855type=drop rate=1024 burst_size=128
1856])
1857AT_CLEANUP
1858
1859AT_SETUP([OFPST_METER request - OF1.3])
1860AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1861AT_CHECK([ovs-ofctl ofp-print "041200180000000200090000000000000000000100000000"], [0], [dnl
1862OFPST_METER request (OF1.3) (xid=0x2): meter=1
1863])
1864AT_CLEANUP
1865
1866AT_SETUP([OFPST_METER_CONFIG request - OF1.3])
1867AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1868AT_CHECK([ovs-ofctl ofp-print "0412001800000002000a0000000000000000000100000000"], [0], [dnl
1869OFPST_METER_CONFIG request (OF1.3) (xid=0x2): meter=1
1870])
1871AT_CLEANUP
1872
1873AT_SETUP([OFPST_METER_FEATURES request - OF1.3])
1874AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1875AT_CHECK([ovs-ofctl ofp-print "0412001000000002000b000000000000"], [0], [dnl
1876OFPST_METER_FEATURES request (OF1.3) (xid=0x2):
1877])
1878AT_CLEANUP
1879
1880AT_SETUP([OFPST_METER_FEATURES reply - OF1.3])
1881AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1882AT_CHECK([ovs-ofctl ofp-print "\
188304 13 00 20 00 00 00 02 00 0b 00 00 00 00 00 00 \
6e055a6c 188400 01 00 00 00 00 00 06 00 00 00 0F 10 02 00 00 \
638a19b0
JR
1885"], [0], [dnl
1886OFPST_METER_FEATURES reply (OF1.3) (xid=0x2):
1887max_meter:65536 max_bands:16 max_color:2
1888band_types: drop dscp_remark
1889capabilities: kbps pktps burst stats
1890])
1891AT_CLEANUP
1892
1893AT_SETUP([OFPST_METER_CONFIG reply - OF1.3])
1894AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1895AT_CHECK([ovs-ofctl ofp-print "\
189604 13 00 50 00 00 00 02 00 0a 00 00 00 00 00 00 \
189700 28 00 05 00 00 00 01 \
189800 01 00 10 00 01 00 00 00 00 05 00 00 00 00 00 \
189900 02 00 10 00 10 00 00 00 00 f0 00 00 00 00 00 \
190000 18 00 09 00 00 00 02 \
190100 01 00 10 00 02 00 00 00 00 00 00 00 00 00 00 \
1902"], [0], [dnl
1903OFPST_METER_CONFIG reply (OF1.3) (xid=0x2):
1904meter=1 kbps burst bands=
1905type=drop rate=65536 burst_size=1280
1906type=dscp_remark rate=1048576 burst_size=61440 prec_level=0
1907
1908meter=2 kbps stats bands=
1909type=drop rate=131072
1910])
1911AT_CLEANUP
1912
1913AT_SETUP([OFPST_METER reply - OF1.3])
1914AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1915AT_CHECK([ovs-ofctl ofp-print "\
191604 13 00 90 00 00 00 02 00 09 00 00 00 00 00 00 \
191700 00 00 01 00 48 00 00 00 00 00 00 00 00 00 05 \
191800 00 00 00 00 00 10 00 00 00 00 00 00 02 30 00 \
0445637d 191900 00 01 8a 0a 6e 23 44 \
638a19b0
JR
192000 00 00 00 00 00 00 7e 00 00 00 00 00 00 34 33 \
192100 00 00 00 00 00 00 e7 00 00 00 00 00 00 94 2e \
192200 00 00 02 00 38 00 00 00 00 00 00 00 00 00 02 \
192300 00 00 00 00 00 02 00 00 00 00 00 00 00 30 00 \
0445637d 192400 00 01 87 0a 23 6e 44 \
638a19b0
JR
192500 00 00 00 00 00 00 2a 00 00 00 00 00 00 04 33 \
1926"], [0], [dnl
1927OFPST_METER reply (OF1.3) (xid=0x2):
0445637d 1928meter:1 flow_count:5 packet_in_count:4096 byte_in_count:143360 duration:394.174990148s bands:
638a19b0
JR
19290: packet_count:126 byte_count:13363
19301: packet_count:231 byte_count:37934
1931
0445637d 1932meter:2 flow_count:2 packet_in_count:512 byte_in_count:12288 duration:391.170094148s bands:
638a19b0
JR
19330: packet_count:42 byte_count:1075
1934])
1935AT_CLEANUP
1936
58cf43df 1937AT_SETUP([OFPT_BARRIER_REQUEST - OF1.0])
fec00620
BP
1938AT_KEYWORDS([ofp-print])
1939AT_CHECK([ovs-ofctl ofp-print '01 12 00 08 00 00 00 01'], [0], [dnl
1940OFPT_BARRIER_REQUEST (xid=0x1):
1941])
1942AT_CLEANUP
1943
58cf43df
SH
1944AT_SETUP([OFPT_BARRIER_REQUEST - OF1.1])
1945AT_KEYWORDS([ofp-print])
1946AT_CHECK([ovs-ofctl ofp-print '02 14 00 08 00 00 00 01'], [0], [dnl
1947OFPT_BARRIER_REQUEST (OF1.1) (xid=0x1):
1948])
1949AT_CLEANUP
1950
1951AT_SETUP([OFPT_BARRIER_REQUEST - OF1.2])
1952AT_KEYWORDS([ofp-print])
1953AT_CHECK([ovs-ofctl ofp-print '03 14 00 08 00 00 00 01'], [0], [dnl
1954OFPT_BARRIER_REQUEST (OF1.2) (xid=0x1):
1955])
1956AT_CLEANUP
1957
2e1ae200
JR
1958AT_SETUP([OFPT_BARRIER_REQUEST - OF1.3])
1959AT_KEYWORDS([ofp-print])
1960AT_CHECK([ovs-ofctl ofp-print '04 14 00 08 00 00 00 01'], [0], [dnl
1961OFPT_BARRIER_REQUEST (OF1.3) (xid=0x1):
1962])
1963AT_CLEANUP
1964
58cf43df 1965AT_SETUP([OFPT_BARRIER_REPLY - OF1.0])
fec00620
BP
1966AT_KEYWORDS([ofp-print])
1967AT_CHECK([ovs-ofctl ofp-print '01 13 00 08 00 00 00 01'], [0], [dnl
1968OFPT_BARRIER_REPLY (xid=0x1):
1969])
1970AT_CLEANUP
1971
2e1ae200 1972AT_SETUP([OFPT_BARRIER_REPLY - OF1.1])
58cf43df
SH
1973AT_KEYWORDS([ofp-print])
1974AT_CHECK([ovs-ofctl ofp-print '02 15 00 08 00 00 00 01'], [0], [dnl
1975OFPT_BARRIER_REPLY (OF1.1) (xid=0x1):
1976])
1977AT_CLEANUP
1978
2e1ae200 1979AT_SETUP([OFPT_BARRIER_REPLY - OF1.2])
58cf43df
SH
1980AT_KEYWORDS([ofp-print])
1981AT_CHECK([ovs-ofctl ofp-print '03 15 00 08 00 00 00 01'], [0], [dnl
1982OFPT_BARRIER_REPLY (OF1.2) (xid=0x1):
1983])
1984AT_CLEANUP
1985
2e1ae200
JR
1986AT_SETUP([OFPT_BARRIER_REPLY - OF1.3])
1987AT_KEYWORDS([ofp-print])
1988AT_CHECK([ovs-ofctl ofp-print '04 15 00 08 00 00 00 01'], [0], [dnl
1989OFPT_BARRIER_REPLY (OF1.3) (xid=0x1):
1990])
1991AT_CLEANUP
1992
e8f9a7bb
VG
1993AT_SETUP([OFPT_QUEUE_GET_CONFIG_REQUEST - OF1.0])
1994AT_KEYWORDS([ofp-print])
1995AT_CHECK([ovs-ofctl ofp-print "01 16 00 0c 00 00 00 01 00 01 00 00"], [0], [dnl
1996OFPT_QUEUE_GET_CONFIG_REQUEST (xid=0x1): port=1
1997])
1998AT_CLEANUP
1999
2000AT_SETUP([OFPT_QUEUE_GET_CONFIG_REQUEST - OF1.2])
2001AT_KEYWORDS([ofp-print])
2002AT_CHECK([ovs-ofctl ofp-print "\
200303 16 00 10 00 00 00 01 00 00 00 01 00 00 00 00"], [0], [dnl
2004OFPT_QUEUE_GET_CONFIG_REQUEST (OF1.2) (xid=0x1): port=1
2005])
2006AT_CLEANUP
2007
2008AT_SETUP([OFPT_QUEUE_GET_CONFIG_REPLY - OF1.0])
2009AT_KEYWORDS([ofp-print])
2010AT_CHECK([ovs-ofctl ofp-print "01 17 00 40 00 00 00 01 \
201100 01 00 00 00 00 00 00 \
201200 00 55 55 00 28 00 00 \
201300 01 00 10 00 00 00 00 01 f4 00 00 00 00 00 00 \
201400 02 00 10 00 00 00 00 02 ee 00 00 00 00 00 00 \
201500 00 44 44 00 08 00 00 \
2016"], [0], [dnl
2017OFPT_QUEUE_GET_CONFIG_REPLY (xid=0x1): port=1
2018queue 21845: min_rate:50.0% max_rate:75.0%
2019queue 17476:
2020])
2021AT_CLEANUP
2022
2023AT_SETUP([OFPT_QUEUE_GET_CONFIG_REPLY - OF1.2])
2024AT_KEYWORDS([ofp-print])
2025AT_CHECK([ovs-ofctl ofp-print "03 17 00 50 00 00 00 01 \
202600 00 00 01 00 00 00 00 \
202700 00 55 55 00 00 00 01 00 30 00 00 00 00 00 00 \
202800 01 00 10 00 00 00 00 01 f4 00 00 00 00 00 00 \
202900 02 00 10 00 00 00 00 02 ee 00 00 00 00 00 00 \
203000 00 44 44 00 08 00 01 00 10 00 00 00 00 00 00 \
2031"], [0], [dnl
2032OFPT_QUEUE_GET_CONFIG_REPLY (OF1.2) (xid=0x1): port=1
2033queue 21845: min_rate:50.0% max_rate:75.0%
2034queue 17476:
2035])
2036AT_CLEANUP
2e1ae200
JR
2037
2038AT_SETUP([OFPT_SET_ASYNC - OF1.3])
2039AT_KEYWORDS([ofp-print])
2040AT_CHECK([ovs-ofctl ofp-print "\
204104 1c 00 20 00 00 00 00 00 00 10 05 00 00 10 07 \
204200 00 00 03 00 00 00 07 00 00 00 00 00 00 00 03 \
2043"], [0], [dnl
2044OFPT_SET_ASYNC (OF1.3) (xid=0x0):
2045 master:
2046 PACKET_IN: no_match invalid_ttl 12
2047 PORT_STATUS: add delete
2048 FLOW_REMOVED: (off)
2049
2050 slave:
2051 PACKET_IN: no_match action invalid_ttl 12
2052 PORT_STATUS: add delete modify
2053 FLOW_REMOVED: idle hard
2054])
2055AT_CLEANUP
2056
6ea4776b
JR
2057AT_SETUP([OFPT_ROLE_REQUEST - OF1.2])
2058AT_KEYWORDS([ofp-print])
2059AT_CHECK([ovs-ofctl ofp-print "\
206003 18 00 18 00 00 00 02 00 00 00 02 00 00 00 00 \
206100 00 00 00 00 00 00 03 \
2062"], [0], [dnl
2063OFPT_ROLE_REQUEST (OF1.2) (xid=0x2): role=master generation_id=3
2064])
2065AT_CLEANUP
2066
2067AT_SETUP([OFPT_ROLE_REQUEST - nochange - OF1.2])
2068AT_KEYWORDS([ofp-print])
2069AT_CHECK([ovs-ofctl ofp-print "\
207003 18 00 18 00 00 00 02 00 00 00 00 00 00 00 00 \
207100 00 00 00 00 00 00 00 \
2072"], [0], [dnl
2073OFPT_ROLE_REQUEST (OF1.2) (xid=0x2): role=nochange
2074])
2075AT_CLEANUP
2076
fec00620
BP
2077AT_SETUP([NXT_ROLE_REQUEST])
2078AT_KEYWORDS([ofp-print])
2079AT_CHECK([ovs-ofctl ofp-print "\
208001 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0a \
208100 00 00 01 \
2082"], [0], [dnl
2083NXT_ROLE_REQUEST (xid=0x2): role=master
2084])
2085AT_CLEANUP
2086
6ea4776b
JR
2087AT_SETUP([OFPT_ROLE_REPLY - OF1.2])
2088AT_KEYWORDS([ofp-print])
2089AT_CHECK([ovs-ofctl ofp-print "\
209003 19 00 18 00 00 00 02 00 00 00 03 00 00 00 00 \
147cc9d3 209112 34 56 78 ab cd ef 90 \
6ea4776b 2092"], [0], [dnl
147cc9d3 2093OFPT_ROLE_REPLY (OF1.2) (xid=0x2): role=slave generation_id=1311768467750121360
6ea4776b
JR
2094])
2095AT_CLEANUP
2096
fec00620
BP
2097AT_SETUP([NXT_ROLE_REPLY])
2098AT_KEYWORDS([ofp-print])
2099AT_CHECK([ovs-ofctl ofp-print "\
210001 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0b \
210100 00 00 02 \
2102"], [0], [dnl
2103NXT_ROLE_REPLY (xid=0x2): role=slave
2104])
2105AT_CLEANUP
2106
00467f73
AC
2107AT_SETUP([OFP_ROLE_STATUS - master, experimenter - OF1.4])
2108AT_KEYWORDS([ofp-print])
2109AT_CHECK([ovs-ofctl ofp-print "\
211005 1e 00 18 00 00 00 0a \
211100 00 00 02 02 00 00 00 ff ff ff ff ff ff ff ff \
2112"], [0], [dnl
2113OFPT_ROLE_STATUS (OF 0x05) (xid=0xa): role=master reason=experimenter_data_changed
2114])
2115AT_CLEANUP
2116
2117AT_SETUP([OFP_ROLE_STATUS - master, config - OF1.4])
2118AT_KEYWORDS([ofp-print])
2119AT_CHECK([ovs-ofctl ofp-print "\
212005 1e 00 18 00 00 00 0a \
212100 00 00 02 01 00 00 00 ff ff ff ff ff ff ff ff \
2122"], [0], [dnl
2123OFPT_ROLE_STATUS (OF 0x05) (xid=0xa): role=master reason=configuration_changed
2124])
2125AT_CLEANUP
2126
2127AT_SETUP([OFP_ROLE_STATUS - master, config,generation - OF1.4])
2128AT_KEYWORDS([ofp-print])
2129AT_CHECK([ovs-ofctl ofp-print "\
213005 1e 00 18 00 00 00 0a \
213100 00 00 02 01 00 00 00 00 00 00 00 00 00 00 10 \
2132"], [0], [dnl
2133OFPT_ROLE_STATUS (OF 0x05) (xid=0xa): role=master generation_id=16 reason=configuration_changed
2134])
2135AT_CLEANUP
2136
54834960
EJ
2137AT_SETUP([NXT_SET_PACKET_IN])
2138AT_KEYWORDS([ofp-print])
2139AT_CHECK([ovs-ofctl ofp-print "\
214001 04 00 14 00 00 00 02 00 00 23 20 00 00 00 10 \
214100 00 00 01 \
2142"], [0], [dnl
2143NXT_SET_PACKET_IN_FORMAT (xid=0x2): format=nxm
2144])
2145AT_CLEANUP
2146
2147AT_SETUP([NXT_PACKET_IN])
2148AT_KEYWORDS([ofp-print])
2149AT_CHECK([ovs-ofctl ofp-print "\
969fc56c 215001 04 00 ba 00 00 00 00 00 00 23 20 00 00 00 11 \
54834960 2151ff ff ff ff 00 40 01 07 00 00 00 00 00 00 00 09 \
969fc56c 215200 4e 00 00 00 00 00 00 00 00 00 02 00 01 00 01 \
54834960
EJ
215320 08 00 00 00 00 00 00 00 06 00 01 00 04 00 00 \
215400 01 00 01 02 04 00 00 00 02 00 01 04 04 00 00 \
215500 03 00 01 06 04 00 00 00 04 00 01 08 04 00 00 \
969fc56c 215600 05 80 00 05 10 5a 5a 5a 5a 5a 5a 5a 5a ff ff \
42edbe39 2157ff ff ff ff ff ff 00 00 00 00 82 82 82 82 82 82 \
54834960
EJ
215880 81 81 81 81 81 81 00 00 50 08 00 45 00 00 28 \
215900 00 00 00 00 06 32 05 53 53 53 53 54 54 54 54 \
dc235f7f 216000 55 00 56 00 00 00 00 00 00 00 00 50 02 00 00 \
54834960
EJ
216131 6d 00 00 00 00 00 00 00 00 \
2162"], [0], [dnl
42edbe39 2163NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 metadata=0x5a5a5a5a5a5a5a5a reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
dc235f7f 2164tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86,tcp_flags=0x002 tcp_csum:316d
54834960
EJ
2165])
2166AT_CLEANUP
2167
b4ccee75
SH
2168AT_SETUP([NXT_PACKET_IN, with hex output of packet data])
2169AT_KEYWORDS([ofp-print])
2170AT_CHECK([ovs-ofctl ofp-print "\
217101 04 00 ba 00 00 00 00 00 00 23 20 00 00 00 11 \
2172ff ff ff ff 00 40 01 07 00 00 00 00 00 00 00 09 \
217300 4e 00 00 00 00 00 00 00 00 00 02 00 01 00 01 \
217420 08 00 00 00 00 00 00 00 06 00 01 00 04 00 00 \
217500 01 00 01 02 04 00 00 00 02 00 01 04 04 00 00 \
217600 03 00 01 06 04 00 00 00 04 00 01 08 04 00 00 \
217700 05 80 00 05 10 5a 5a 5a 5a 5a 5a 5a 5a ff ff \
2178ff ff ff ff ff ff 00 00 00 00 82 82 82 82 82 82 \
217980 81 81 81 81 81 81 00 00 50 08 00 45 00 00 28 \
218000 00 00 00 00 06 32 05 53 53 53 53 54 54 54 54 \
dc235f7f 218100 55 00 56 00 00 00 00 00 00 00 00 50 01 00 00 \
b4ccee75
SH
218231 6d 00 00 00 00 00 00 00 00 \
2183" 3], [0], [dnl
2184NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 metadata=0x5a5a5a5a5a5a5a5a reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
dc235f7f 2185tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86,tcp_flags=0x001 tcp_csum:316d
b4ccee75
SH
218600000000 82 82 82 82 82 82 80 81-81 81 81 81 81 00 00 50
218700000010 08 00 45 00 00 28 00 00-00 00 00 06 32 05 53 53
218800000020 53 53 54 54 54 54 00 55-00 56 00 00 00 00 00 00
dc235f7f 218900000030 00 00 50 01 00 00 31 6d-00 00 00 00 00 00 00 00
b4ccee75
SH
2190])
2191AT_CLEANUP
2192
80d5aefd
BP
2193AT_SETUP([NXT_SET_ASYNC_CONFIG])
2194AT_KEYWORDS([ofp-print])
2195AT_CHECK([ovs-ofctl ofp-print "\
219601 04 00 28 00 00 00 00 00 00 23 20 00 00 00 13 \
219700 00 10 05 00 00 10 07 00 00 00 03 00 00 00 07 \
219800 00 00 00 00 00 00 03 \
2199"], [0], [dnl
2200NXT_SET_ASYNC_CONFIG (xid=0x0):
2201 master:
2202 PACKET_IN: no_match invalid_ttl 12
2203 PORT_STATUS: add delete
2204 FLOW_REMOVED: (off)
2205
2206 slave:
2207 PACKET_IN: no_match action invalid_ttl 12
2208 PORT_STATUS: add delete modify
2209 FLOW_REMOVED: idle hard
2210])
2211AT_CLEANUP
2212
a7349929
BP
2213AT_SETUP([NXT_SET_CONTROLLER_ID])
2214AT_KEYWORDS([ofp-print])
2215AT_CHECK([ovs-ofctl ofp-print "\
221601 04 00 18 00 00 00 03 00 00 23 20 00 00 00 14 \
221700 00 00 00 00 00 00 7b \
2218"], [0], [dnl
2219NXT_SET_CONTROLLER_ID (xid=0x3): id=123
2220])
2221AT_CLEANUP
2222
2b07c8b1
BP
2223AT_SETUP([NXT_FLOW_MONITOR_CANCEL])
2224AT_KEYWORDS([ofp-print])
2225AT_CHECK([ovs-ofctl ofp-print "\
222601 04 00 14 00 00 00 03 00 00 23 20 00 00 00 15 \
222701 02 30 40 \
2228"], [0], [dnl
2229NXT_FLOW_MONITOR_CANCEL (xid=0x3): id=16920640
2230])
2231AT_CLEANUP
2232
2233AT_SETUP([NXT_FLOW_MONITOR_PAUSED])
2234AT_KEYWORDS([ofp-print])
2235AT_CHECK([ovs-ofctl ofp-print "\
223601 04 00 10 00 00 00 03 00 00 23 20 00 00 00 16 \
2237"], [0], [dnl
2238NXT_FLOW_MONITOR_PAUSED (xid=0x3):
2239])
2240AT_CLEANUP
2241
2242AT_SETUP([NXT_FLOW_MONITOR_RESUMED])
2243AT_KEYWORDS([ofp-print])
2244AT_CHECK([ovs-ofctl ofp-print "\
224501 04 00 10 00 00 00 03 00 00 23 20 00 00 00 17 \
2246"], [0], [dnl
2247NXT_FLOW_MONITOR_RESUMED (xid=0x3):
2248])
2249AT_CLEANUP
2250
fec00620
BP
2251AT_SETUP([NXT_SET_FLOW_FORMAT])
2252AT_KEYWORDS([ofp-print])
2253AT_CHECK([ovs-ofctl ofp-print "\
225401 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0c \
225500 00 00 02 \
2256"], [0], [dnl
2257NXT_SET_FLOW_FORMAT (xid=0x2): format=nxm
2258])
2259AT_CLEANUP
2260
2261# The flow is formatted with cls_rule_format() for the low-verbosity case.
2262AT_SETUP([NXT_FLOW_MOD, low verbosity])
2263AT_KEYWORDS([ofp-print])
2264AT_CHECK([ovs-ofctl ofp-print "\
226501 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
226600 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
de0f16bc 2267ff ff ff ff 00 10 00 00 00 14 00 00 00 00 00 00 \
fec00620
BP
226800 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
226900 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
227000 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
2271" 2], [0], [dnl
de0f16bc 2272NXT_FLOW_MOD (xid=0x2): ADD reg0=0x7b,tun_id=0x1c8 out_port:16 actions=load:0x5->NXM_NX_REG0[[]]
fec00620
BP
2273])
2274AT_CLEANUP
2275
eec25dc1
BP
2276# The flow is formatted with ofp10_match_to_string() for the
2277# low-verbosity case.
fec00620
BP
2278AT_SETUP([NXT_FLOW_MOD, high verbosity])
2279AT_KEYWORDS([ofp-print])
2280AT_CHECK([ovs-ofctl ofp-print "\
228101 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
228200 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
de0f16bc 2283ff ff ff ff 01 00 00 00 00 14 00 00 00 00 00 00 \
fec00620
BP
228400 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
228500 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
228600 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
2287" 3], [0], [dnl
de0f16bc 2288NXT_FLOW_MOD (xid=0x2): ADD NXM_NX_TUN_ID(00000000000001c8), NXM_NX_REG0(0000007b) out_port:256 actions=load:0x5->NXM_NX_REG0[[]]
fec00620
BP
2289])
2290AT_CLEANUP
2291
7395c052
NZ
2292AT_SETUP([OFPT_GROUP_MOD])
2293AT_KEYWORDS([ofp-print])
2294AT_CHECK([ovs-ofctl ofp-print "\
229502 0f 00 70 11 22 33 44 00 00 01 00 87 65 43 21 \
229600 20 00 64 00 00 00 01 ff ff ff ff 00 00 00 00 \
229700 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
229800 20 00 c8 00 00 00 02 ff ff ff ff 00 00 00 00 \
229900 00 00 10 00 00 00 02 00 00 00 00 00 00 00 00 \
230000 20 00 c8 00 00 00 03 ff ff ff ff 00 00 00 00 \
230100 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
2302"], [0], [dnl
2303OFPT_GROUP_MOD (OF1.1) (xid=0x11223344):
2304 ADD group_id=2271560481,type=select,bucket=weight:100,watch_port:1,actions=output:1,bucket=weight:200,watch_port:2,actions=output:2,bucket=weight:200,watch_port:3,actions=output:3
2305])
2306AT_CLEANUP
2307
fec00620
BP
2308AT_SETUP([NXT_FLOW_REMOVED])
2309AT_KEYWORDS([ofp-print])
2310AT_CHECK([ovs-ofctl ofp-print "\
231101 04 00 78 00 00 00 00 00 00 23 20 00 00 00 0e \
745bfd5e 231200 00 00 00 00 00 00 00 ff ff 00 02 00 00 00 06 \
fec00620
BP
231301 6e 36 00 00 05 00 3c 00 00 00 00 00 00 00 01 \
231400 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
231502 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
231600 05 00 00 06 02 08 06 00 00 08 02 00 00 00 00 \
23171e 02 00 02 00 00 20 04 c0 a8 00 01 00 00 22 04 \
2318c0 a8 00 02 00 00 00 00 \
2319"], [0], [dnl
745bfd5e 2320NXT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2 reason=idle table_id=1 duration6.024s idle5 pkts1 bytes60
fec00620
BP
2321])
2322AT_CLEANUP
2323
a1a7d333
BP
2324AT_SETUP([NXT_FLOW_MOD_TABLE_ID])
2325AT_KEYWORDS([ofp-print])
2326AT_CHECK([ovs-ofctl ofp-print "\
232701 04 00 18 01 02 03 04 00 00 23 20 00 00 00 0f \
232801 00 00 00 00 00 00 00 \
2329"], [0], [dnl
2330NXT_FLOW_MOD_TABLE_ID (xid=0x1020304): enable
2331])
2332AT_CLEANUP
2333
fec00620
BP
2334AT_SETUP([NXST_FLOW request])
2335AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2336AT_CHECK([ovs-ofctl ofp-print "\
233701 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
233800 00 00 00 00 00 00 00 ff ff 00 00 ff 00 00 00 \
2339"], [0], [dnl
54ae6fa8 2340NXST_FLOW request (xid=0x4): @&t@
fec00620
BP
2341])
2342AT_CLEANUP
2343
2344AT_SETUP([NXST_FLOW reply])
2345AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2346AT_CHECK([ovs-ofctl ofp-print "\
05b8f1c2 234701 11 08 18 00 00 00 04 ff ff 00 00 00 00 23 20 \
fec00620
BP
234800 00 00 00 00 00 00 00 00 88 00 00 00 00 00 01 \
234902 dc 6c 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
235000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
235100 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
235202 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
235300 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
23540a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
2355a8 00 02 00 00 0c 01 06 00 00 12 02 09 e7 00 00 \
235614 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
235700 88 00 00 00 00 00 03 32 11 62 00 ff ff 00 05 \
f27f2134 235800 00 00 4c 00 03 00 00 00 00 00 00 00 00 00 00 \
fec00620
BP
235900 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
236000 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
236100 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
236200 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2363a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
236400 00 12 02 09 e4 00 00 14 02 00 00 00 00 00 00 \
236500 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
f27f2134 236633 f9 aa 00 ff ff 00 05 00 00 00 4c 00 05 00 00 \
fec00620
BP
236700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
236800 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
236902 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
237000 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
23710a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
2372a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
237314 02 09 e5 00 00 00 00 00 00 00 08 00 03 00 00 \
237400 88 00 00 00 00 00 04 2d 0f a5 00 ff ff 00 05 \
f27f2134 237500 00 00 4c 00 01 00 00 00 00 00 00 00 00 00 00 \
fec00620
BP
237600 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
237700 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
237800 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
237900 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2380a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
238100 00 12 02 09 e3 00 00 14 02 00 00 00 00 00 00 \
238200 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
f27f2134 238334 73 bc 00 ff ff 00 05 00 0a 00 4c 00 03 00 03 \
fec00620
BP
238400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
238500 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
238602 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
238700 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
23880a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
2389a8 00 02 00 00 0c 01 06 00 00 12 02 09 e5 00 00 \
239014 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
239100 88 00 00 00 00 00 05 28 0d e8 00 ff ff 00 05 \
239200 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
239300 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
239400 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
239500 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
239600 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2397a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
239800 00 12 02 09 e2 00 00 14 02 00 00 00 00 00 00 \
239900 00 00 08 00 01 00 00 00 88 00 00 00 00 00 01 \
240002 62 5a 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
240100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
240200 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
240302 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
240400 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
24050a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
2406a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
240714 02 09 e7 00 00 00 00 00 00 00 08 00 03 00 00 \
240800 88 00 00 00 00 00 01 38 be 5e 00 ff ff 00 05 \
240900 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
241000 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
241100 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
241200 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
241300 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2414a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
241500 00 12 02 00 00 00 00 14 02 09 e6 00 00 00 00 \
241600 00 00 08 00 03 00 00 00 88 00 00 00 00 00 04 \
241727 d0 df 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
241800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
241900 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
242002 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
242100 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
24220a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
2423a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
242414 02 09 e3 00 00 00 00 00 00 00 08 00 03 00 00 \
242500 88 00 00 00 00 00 03 2c d2 9c 00 ff ff 00 05 \
242600 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
242700 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
242800 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
242900 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
243000 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2431a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
243200 00 12 02 00 00 00 00 14 02 09 e4 00 00 00 00 \
243300 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
24340a 40 83 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
243500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
243600 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
243702 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
243800 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
24390a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
2440a8 00 02 00 00 0c 01 06 00 00 12 02 09 e8 00 00 \
244114 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
244200 88 00 00 00 00 00 05 25 31 7c 00 ff ff 00 05 \
244300 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
244400 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
244500 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
244600 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
244700 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2448a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
244900 00 12 02 00 00 00 00 14 02 09 e2 00 00 00 00 \
245000 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
245104 c4 b4 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
245200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
245300 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
245402 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
245500 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
24560a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
2457a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
245814 02 09 e8 00 00 00 00 00 00 00 08 00 03 00 00 \
245900 88 00 00 00 00 00 01 39 38 70 00 ff ff 00 05 \
246000 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
246100 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
246200 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
246300 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
246400 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2465a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
246600 00 12 02 09 e6 00 00 14 02 00 00 00 00 00 00 \
246700 00 00 08 00 01 00 00 00 60 00 00 00 00 00 e4 \
24682e 7d db 00 80 00 00 00 00 00 00 14 00 00 00 00 \
246900 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
247000 00 00 00 00 00 00 00 00 01 20 08 00 00 00 00 \
247100 00 01 c8 00 01 00 04 00 00 00 7b 00 00 00 00 \
2472ff ff 00 18 00 00 23 20 00 07 00 1f 00 01 00 04 \
247300 00 00 00 00 00 00 05 \
05b8f1c2
BP
247400 30 01 00 00 00 0e 10 00 07 a1 20 80 00 00 00 \
247500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
247600 00 00 00 00 00 00 64 00 00 00 00 00 00 19 00 \
fec00620
BP
2477"], [0],
2478[[NXST_FLOW reply (xid=0x4):
b9718b7b
BP
2479 cookie=0x0, duration=1.048s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2535,tp_dst=0 actions=output:1
2480 cookie=0x0, duration=3.84s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, idle_age=2, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2532,tp_dst=0 actions=output:1
2481 cookie=0x0, duration=2.872s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, idle_age=4, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2533 actions=output:3
2482 cookie=0x0, duration=4.756s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, idle_age=0, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2531,tp_dst=0 actions=output:1
2483 cookie=0x0, duration=2.88s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, hard_timeout=10, idle_age=2, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2533,tp_dst=0 actions=output:1
2484 cookie=0x0, duration=5.672s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2530,tp_dst=0 actions=output:1
2485 cookie=0x0, duration=1.04s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2535 actions=output:3
2486 cookie=0x0, duration=1.952s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2534 actions=output:3
2487 cookie=0x0, duration=4.668s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2531 actions=output:3
2488 cookie=0x0, duration=3.752s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2532 actions=output:3
2489 cookie=0x0, duration=0.172s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2536,tp_dst=0 actions=output:1
2490 cookie=0x0, duration=5.624s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2530 actions=output:3
2491 cookie=0x0, duration=0.08s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,nw_src=192.168.0.2,nw_dst=192.168.0.1,nw_tos=0,tp_src=0,tp_dst=2536 actions=output:3
2492 cookie=0x0, duration=1.96s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,tcp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,tp_src=2534,tp_dst=0 actions=output:1
e896c2d4 2493 cookie=0x0, duration=228.78s, table=0, n_packets=0, n_bytes=0, reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[]
05b8f1c2 2494 cookie=0x0, duration=3600.0005s, table=1, n_packets=100, n_bytes=6400, actions=drop
fec00620
BP
2495]])
2496AT_CLEANUP
2497
2498AT_SETUP([NXST_AGGREGATE request])
2499AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2500AT_CHECK([ovs-ofctl ofp-print "\
250101 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
250200 00 00 01 00 00 00 00 ff ff 00 00 ff 00 00 00 \
2503"], [0], [dnl
54ae6fa8 2504NXST_AGGREGATE request (xid=0x4): @&t@
fec00620
BP
2505])
2506AT_CLEANUP
2507
2508AT_SETUP([NXST_AGGREGATE reply])
2509AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2510AT_CHECK([ovs-ofctl ofp-print "\
251101 11 00 30 00 00 00 04 ff ff 00 00 00 00 23 20 \
251200 00 00 01 00 00 00 00 00 00 00 00 00 00 00 07 \
251300 00 00 00 00 00 01 a4 00 00 00 07 00 00 00 00 \
2514"], [0], [dnl
2515NXST_AGGREGATE reply (xid=0x4): packet_count=7 byte_count=420 flow_count=7
2516])
2517AT_CLEANUP
2b07c8b1
BP
2518
2519AT_SETUP([NXST_FLOW_MONITOR request])
2520AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2521AT_CHECK([ovs-ofctl ofp-print "\
252201 10 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 02 00 00 00 00 \
252300 00 40 00 00 3f ff fe 00 00 01 00 00 00 00 00 \
252400 00 20 00 00 04 ff ff 00 06 02 00 00 00 00 00 00 00 00 02 00 01 00 00 \
2525"], [0], [dnl
2526NXST_FLOW_MONITOR request (xid=0x4):
2527 id=16384 flags=initial,add,delete,modify,actions,own out_port=LOCAL table=1
2528 id=8192 flags=delete table=2 in_port=1
2529])
2530AT_CLEANUP
2531
2532AT_SETUP([NXST_FLOW_MONITOR reply])
2533AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2534AT_CHECK([ovs-ofctl ofp-print "\
253501 11 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 02 00 00 00 00 \
99f837f8 253600 20 00 01 00 05 80 00 00 05 00 10 00 06 01 00 12 34 56 78 9a bc de f0 \
2b07c8b1
BP
253700 00 00 02 00 01 00 00 \
253800 08 00 03 00 01 86 a0 \
2539"], [0], [dnl
2540NXST_FLOW_MONITOR reply (xid=0x4):
2541 event=DELETED reason=eviction table=1 idle_timeout=5 hard_timeout=16 cookie=0x123456789abcdef0 in_port=1
2542 event=ABBREV xid=0x186a0
2543])
2544AT_CLEANUP