b20bdc9a4378739f1bbc368e1972a60540354d5c
[sliver-openvswitch.git] / tests / ofp-print.at
1 AT_BANNER([ofp-print])
2
3 AT_SETUP([empty])
4 AT_KEYWORDS([ofp-print])
5 AT_CHECK([ovs-ofctl ofp-print ''], [0], [OpenFlow message is empty
6 ])
7 AT_CLEANUP
8
9 AT_SETUP([too short])
10 AT_KEYWORDS([ofp-print])
11 AT_CHECK([ovs-ofctl ofp-print aabb], [0], [dnl
12 OpenFlow packet too short (only 2 bytes):
13 00000000  aa bb                                           |..              |
14 ])
15 AT_CLEANUP
16
17 AT_SETUP([wrong OpenFlow version])
18 AT_KEYWORDS([ofp-print])
19 AT_CHECK([ovs-ofctl ofp-print aabbccddeeff0011], [0], [dnl
20 Bad OpenFlow version 170:
21 00000000  aa bb cc dd ee ff 00 11-                        |........        |
22 ])
23 AT_CLEANUP
24
25 AT_SETUP([truncated message])
26 AT_KEYWORDS([ofp-print])
27 AT_CHECK([ovs-ofctl ofp-print 01bbccddeeff0011], [0], [dnl
28 (***truncated to 8 bytes from 52445***)
29 00000000  01 bb cc dd ee ff 00 11-                        |........        |
30 ])
31 AT_CLEANUP
32
33 AT_SETUP([message only uses part of buffer])
34 AT_KEYWORDS([ofp-print])
35 AT_CHECK([ovs-ofctl ofp-print 01bb0009eeff00112233], [0], [dnl
36 (***only uses 9 bytes out of 10***)
37 00000000  01 bb 00 09 ee ff 00 11-22 33                   |........"3      |
38 ])
39 # "
40 AT_CLEANUP
41
42 AT_SETUP([OFPT_HELLO - ordinary])
43 AT_KEYWORDS([ofp-print])
44 AT_CHECK([ovs-ofctl ofp-print 0100000800000000], [0], [dnl
45 OFPT_HELLO (xid=0x0):
46 ])
47 AT_CLEANUP
48
49 AT_SETUP([OFPT_HELLO with extra data])
50 AT_KEYWORDS([ofp-print])
51 AT_CHECK([ovs-ofctl ofp-print 0100001300000000657874726120646174610a], [0],
52 [dnl
53 OFPT_HELLO (xid=0x0):
54 00000000  65 78 74 72 61 20 64 61-74 61 0a                |extra data.     |
55 ])
56 AT_CLEANUP
57
58 AT_SETUP([OFPT_ERROR with type OFPET_HELLO_FAILED])
59 AT_KEYWORDS([ofp-print])
60 AT_CHECK([ovs-ofctl ofp-print 010100170000000000000001657874726120646174610a], [0], [dnl
61 OFPT_ERROR (xid=0x0): type OFPET_HELLO_FAILED, code OFPHFC_EPERM
62 extra data\012
63 ])
64 AT_CLEANUP
65
66 AT_SETUP([OFPT_ERROR with type OFPET_BAD_REQUEST])
67 AT_KEYWORDS([ofp-print])
68 AT_CHECK([ovs-ofctl ofp-print 01010014000000000001000601bbccddeeff0011], [0], [dnl
69 OFPT_ERROR (xid=0x0): type OFPET_BAD_REQUEST, code OFPBRC_BAD_LEN
70 (***truncated to 8 bytes from 52445***)
71 00000000  01 bb cc dd ee ff 00 11-                        |........        |
72 ])
73 AT_CLEANUP
74
75 AT_SETUP([OFPT_ERROR with code NXBRC_NXM_BAD_PREREQ])
76 AT_KEYWORDS([ofp-print])
77 AT_CHECK([ovs-ofctl ofp-print '0101001c55555555 b0c20000 0000232000010104 0102000811111111'], [0], [dnl
78 OFPT_ERROR (xid=0x55555555): type OFPET_BAD_REQUEST, code NXBRC_NXM_BAD_PREREQ
79 OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
80 ])
81 AT_CLEANUP
82
83 AT_SETUP([OFPT_ECHO_REQUEST, empty payload])
84 AT_KEYWORDS([ofp-print])
85 AT_CHECK([ovs-ofctl ofp-print '01 02 00 08 00 00 00 01'], [0], [dnl
86 OFPT_ECHO_REQUEST (xid=0x1): 0 bytes of payload
87 ])
88 AT_CLEANUP
89
90 AT_SETUP([OFPT_ECHO_REQUEST, 5-byte payload])
91 AT_KEYWORDS([ofp-print])
92 AT_CHECK([ovs-ofctl ofp-print '0102000d00000001 25 53 54 1a 9d'], [0], [dnl
93 OFPT_ECHO_REQUEST (xid=0x1): 5 bytes of payload
94 00000000  25 53 54 1a 9d                                  |%ST..           |
95 ])
96 AT_CLEANUP
97
98 AT_SETUP([OFPT_ECHO_REPLY, empty payload])
99 AT_KEYWORDS([ofp-print])
100 AT_CHECK([ovs-ofctl ofp-print '01 03 00 08 00 00 00 01'], [0], [dnl
101 OFPT_ECHO_REPLY (xid=0x1): 0 bytes of payload
102 ])
103 AT_CLEANUP
104
105 AT_SETUP([OFPT_ECHO_REPLY, 5-byte payload])
106 AT_KEYWORDS([ofp-print])
107 AT_CHECK([ovs-ofctl ofp-print '0103000d0000000ba330efaf9e'], [0], [dnl
108 OFPT_ECHO_REPLY (xid=0xb): 5 bytes of payload
109 00000000  a3 30 ef af 9e                                  |.0...           |
110 ])
111 AT_CLEANUP
112
113 AT_SETUP([OFPT_FEATURES_REQUEST])
114 AT_KEYWORDS([ofp-print])
115 AT_CHECK([ovs-ofctl ofp-print '0105000800000001'], [0], [dnl
116 OFPT_FEATURES_REQUEST (xid=0x1):
117 ])
118 AT_CLEANUP
119
120 AT_SETUP([OFPT_FEATURES_REPLY])
121 AT_KEYWORDS([ofp-print])
122 AT_CHECK([ovs-ofctl ofp-print "\
123 01 06 00 e0 00 00 00 01 00 00 50 54 00 00 00 01 \
124 00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
125 ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
126 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
127 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
128 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
129 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
130 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
131 00 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
132 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
133 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
134 00 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
135 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
136 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
137 "], [0], [dnl
138 OFPT_FEATURES_REPLY (xid=0x1): ver:0x1, dpid:0000505400000001
139 n_tables:2, n_buffers:256
140 features: capabilities:0x87, actions:0xfff
141  1(eth1): addr:50:54:00:00:00:02, config: 0, state:0
142      current:    100MB-FD AUTO_NEG @&t@
143      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
144      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
145  2(eth2): addr:50:54:00:00:00:03, config: 0, state:0
146      current:    100MB-FD AUTO_NEG @&t@
147      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
148      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
149  3(eth0): addr:50:54:00:00:00:01, config: 0, state:0
150      current:    100MB-FD AUTO_NEG @&t@
151      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
152      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
153  LOCAL(br0): addr:50:54:00:00:00:01, config: 0x1, state:0x1
154 ])
155 AT_CLEANUP
156
157 AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port])
158 AT_KEYWORDS([ofp-print])
159 AT_CHECK([ovs-ofctl ofp-print "\
160 01 06 00 dc 00 00 00 01 00 00 50 54 00 00 00 01 \
161 00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
162 ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
163 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
164 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
165 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
166 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
167 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
168 00 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
169 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
170 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
171 00 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
172 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
173 00 00 02 08 00 00 02 8f 00 00 02 8f \
174 "], [0], [dnl
175 ***decode error: type OFPET_BAD_REQUEST, code OFPBRC_BAD_LEN***
176 00000000  01 06 00 dc 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
177 00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 0f ff |................|
178 00000020  ff fe 50 54 00 00 00 01-62 72 30 00 00 00 00 00 |..PT....br0.....|
179 00000030  00 00 00 00 00 00 00 00-00 00 00 01 00 00 00 01 |................|
180 00000040  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
181 00000050  00 03 50 54 00 00 00 01-65 74 68 30 00 00 00 00 |..PT....eth0....|
182 00000060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
183 00000070  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
184 00000080  00 02 50 54 00 00 00 03-65 74 68 32 00 00 00 00 |..PT....eth2....|
185 00000090  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
186 000000a0  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
187 000000b0  00 01 50 54 00 00 00 02-65 74 68 31 00 00 00 00 |..PT....eth1....|
188 000000c0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
189 000000d0  00 00 02 08 00 00 02 8f-00 00 02 8f             |............    |
190 ], [stderr])
191 AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
192 received OpenFlow message OFPT_FEATURES_REPLY with incorrect length 220 (must be exactly 32 bytes or longer by an integer multiple of 48 bytes)
193 ])
194 AT_CLEANUP
195
196 AT_SETUP([OFPT_GET_CONFIG_REQUEST])
197 AT_KEYWORDS([ofp-print])
198 AT_CHECK([ovs-ofctl ofp-print '0107000800000001'], [0], [dnl
199 OFPT_GET_CONFIG_REQUEST (xid=0x1):
200 ])
201 AT_CLEANUP
202
203 AT_SETUP([OFPT_GET_CONFIG_REPLY, most common form])
204 AT_KEYWORDS([ofp-print])
205 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 00 00 00'], [0], [dnl
206 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
207 ])
208 AT_CLEANUP
209
210
211 AT_SETUP([OFPT_GET_CONFIG_REPLY, frags and miss_send_len])
212 AT_KEYWORDS([ofp-print])
213 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 02 00 ff'], [0], [dnl
214 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=reassemble miss_send_len=255
215 ])
216 AT_CLEANUP
217
218 AT_SETUP([OFPT_PACKET_IN])
219 AT_KEYWORDS([ofp-print])
220 AT_SKIP_IF([test ! -x /usr/sbin/tcpdump])
221 AT_CHECK([ovs-ofctl ofp-print "\
222 01 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
223 00 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
224 45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
225 c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
226 50 00 02 00 26 e8 00 00 00 00 00 00 00 00 \
227 "], [0], [dnl
228 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 data_len=60 buffer=0x00000111
229 tunnel0:in_port0003:tci(0) mac50:54:00:00:00:05->50:54:00:00:00:06 type0800 proto6 tos0 ip192.168.0.1->192.168.0.2 port10031->0
230 -8:00:00.000000 50:54:00:00:00:05 > 50:54:00:00:00:06, ethertype IPv4 (0x0800), length 60: 192.168.0.1.10031 > 192.168.0.2.0: . win 512
231 ])
232 AT_CLEANUP
233
234 AT_SETUP([OFPT_FLOW_REMOVED])
235 AT_KEYWORDS([ofp-print])
236 AT_CHECK([ovs-ofctl ofp-print "\
237 01 0b 00 58 00 00 00 00 00 00 00 00 00 03 50 54 \
238 00 00 00 05 50 54 00 00 00 06 ff ff 00 00 08 06 \
239 00 02 00 00 c0 a8 00 01 c0 a8 00 02 00 00 00 00 \
240 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 05 \
241 30 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \
242 00 00 00 00 00 00 00 3c \
243 "], [0], [dnl
244 OFPT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000/0xffff,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,opcode=2,nw_tos=0,tp_src=0,tp_dst=0 reason=idle duration5.82s idle5 pkts1 bytes60
245 ])
246 AT_CLEANUP
247
248 AT_SETUP([OFPT_PORT_STATUS])
249 AT_KEYWORDS([ofp-print])
250 AT_CHECK([ovs-ofctl ofp-print "\
251 01 0c 00 40 00 00 00 00 02 00 00 00 00 00 00 00 \
252 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
253 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
254 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
255 "], [0], [dnl
256 OFPT_PORT_STATUS (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01, config: 0x1, state:0x1
257      current:    100MB-FD AUTO_NEG @&t@
258      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
259      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG @&t@
260 ])
261 AT_CLEANUP
262
263 AT_SETUP([OFPT_PACKET_OUT])
264 AT_KEYWORDS([ofp-print])
265 AT_CHECK([ovs-ofctl ofp-print "\
266 01 0d 00 54 00 00 00 00 00 00 01 14 00 01 00 08 \
267 00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
268 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
269 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
270 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
271 00 00 00 00 \
272 "], [0], [dnl
273 OFPT_PACKET_OUT (xid=0x0): in_port=1 actions_len=8 actions=output:3 buffer=0x00000114
274 ])
275 AT_CLEANUP
276
277 # The flow is formatted with cls_rule_format() for the low-verbosity case.
278 AT_SETUP([OFPT_FLOW_MOD - low verbosity])
279 AT_KEYWORDS([ofp-print])
280 AT_CHECK([ovs-ofctl ofp-print "\
281 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
282 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
283 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
284 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
285 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
286 " 2], [0], [dnl
287 OFPT_FLOW_MOD (xid=0x0): ADD priority=65535,arp,in_port=1,vlan_tci=0x0000/0xffff,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,opcode=2,nw_tos=0,tp_src=0,tp_dst=0 idle:5 buf:0x10e actions=output:3
288 ])
289 AT_CLEANUP
290
291 # The flow is formatted with ofp_match_to_string() for the low-verbosity case.
292 AT_SETUP([OFPT_FLOW_MOD - high verbosity])
293 AT_KEYWORDS([ofp-print])
294 AT_CHECK([ovs-ofctl ofp-print "\
295 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
296 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
297 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
298 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
299 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
300 " 3], [0], [dnl
301 OFPT_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,opcode=2,nw_tos=0,tp_src=0,tp_dst=0 idle:5 pri:65535 buf:0x10e actions=output:3
302 ])
303 AT_CLEANUP
304
305 AT_SETUP([OFPT_PORT_MOD])
306 AT_KEYWORDS([ofp-print])
307 AT_CHECK([ovs-ofctl ofp-print "\
308 01 0f 00 20 00 00 00 03 00 03 50 54 00 00 00 01 \
309 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
310 " 3], [0], [dnl
311 OFPT_PORT_MOD (xid=0x3):port: 3: addr:50:54:00:00:00:01, config: 0x1, mask:0x1
312      advertise: UNCHANGED
313 ])
314 AT_CLEANUP
315
316 AT_SETUP([OFPST_DESC request])
317 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
318 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100000000"], [0], [dnl
319 OFPST_DESC request (xid=0x1):
320 ])
321 AT_CLEANUP
322
323 AT_SETUP([OFPST_DESC reply])
324 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
325 AT_CHECK([ovs-ofctl ofp-print "\
326 01 11 04 2c 00 00 00 01 00 00 00 00 4e 69 63 69 \
327 72 61 20 4e 65 74 77 6f 72 6b 73 2c 20 49 6e 63 \
328 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
329 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
330 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
331 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
332 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
333 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
334 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
335 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
336 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
337 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
338 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
339 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
340 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
341 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
342 00 00 00 00 00 00 00 00 00 00 00 00 4f 70 65 6e \
343 20 76 53 77 69 74 63 68 00 00 00 00 00 00 00 00 \
344 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
345 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
346 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
347 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
348 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
349 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
350 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
351 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
352 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
353 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
354 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
355 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
356 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
357 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
358 00 00 00 00 00 00 00 00 00 00 00 00 31 2e 31 2e \
359 30 70 72 65 32 00 00 00 00 00 00 00 00 00 00 00 \
360 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
361 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
362 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
363 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
364 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
365 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
366 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
367 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
368 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
369 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
370 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
371 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
372 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
373 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
374 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
375 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
376 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
377 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
378 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
379 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
380 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
381 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
382 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
383 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
384 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
385 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
386 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
387 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
388 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
389 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
390 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
391 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
392 00 00 00 00 00 00 00 00 00 00 00 00 \
393 "], [0], [dnl
394 OFPST_DESC reply (xid=0x1):
395 Manufacturer: Nicira Networks, Inc.
396 Hardware: Open vSwitch
397 Software: 1.1.0pre2
398 Serial Num: None
399 DP Description: None
400 ])
401 AT_CLEANUP
402
403 AT_SETUP([OFPST_FLOW request])
404 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
405 AT_CHECK([ovs-ofctl ofp-print "\
406 01 10 00 38 00 00 00 04 00 01 00 00 00 38 20 ff \
407 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
408 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
409 00 00 00 00 ff 00 ff ff \
410 "], [0], [dnl
411 OFPST_FLOW request (xid=0x4): priority=0
412 ])
413 AT_CLEANUP
414
415 AT_SETUP([OFPST_FLOW reply])
416 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
417 AT_CHECK([ovs-ofctl ofp-print "\
418 01 11 01 8c 00 00 00 04 00 01 00 00 00 60 00 00 \
419 00 00 00 00 00 03 50 54 00 00 00 05 50 54 00 00 \
420 00 06 ff ff 00 00 08 06 00 02 00 00 c0 a8 00 01 \
421 c0 a8 00 02 00 00 00 00 00 00 00 04 0b eb c2 00 \
422 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
423 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
424 00 00 00 3c 00 00 00 08 00 01 00 00 00 60 00 00 \
425 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
426 00 05 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 02 \
427 c0 a8 00 01 00 00 00 00 00 00 00 08 35 a4 e9 00 \
428 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
429 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
430 00 00 04 fa 00 00 00 08 00 03 00 00 00 60 00 00 \
431 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
432 00 05 ff ff 00 00 08 06 00 01 00 00 c0 a8 00 02 \
433 c0 a8 00 01 00 00 00 00 00 00 00 04 10 b0 76 00 \
434 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
435 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
436 00 00 00 3c 00 00 00 08 00 03 00 00 00 60 00 00 \
437 00 00 00 00 00 03 50 54 00 00 00 05 50 54 00 00 \
438 00 06 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 01 \
439 c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \
440 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
441 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
442 00 00 04 fa 00 00 00 08 00 01 00 00 \
443 "], [0], [dnl
444 OFPST_FLOW reply (xid=0x4):
445  cookie=0x0, duration=4.2s, table_id=0, priority=65535, n_packets=1, n_bytes=60, idle_timeout=5,arp,in_port=3,dl_vlan=65535,dl_vlan_pcp=0,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,opcode=2,nw_tos=0,tp_src=0,tp_dst=0 actions=output:1
446  cookie=0x0, duration=8.9s, table_id=0, priority=65535, n_packets=13, n_bytes=1274, idle_timeout=5,icmp,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,nw_tos=0,icmp_type=0,icmp_code=0 actions=output:3
447  cookie=0x0, duration=4.28s, table_id=0, priority=65535, n_packets=1, n_bytes=60, idle_timeout=5,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,opcode=1,nw_tos=0,icmp_type=0,icmp_code=0 actions=output:3
448  cookie=0x0, duration=9.096s, table_id=0, priority=65535, n_packets=13, n_bytes=1274, idle_timeout=5,icmp,in_port=3,dl_vlan=65535,dl_vlan_pcp=0,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
449 ])
450 AT_CLEANUP
451
452 AT_SETUP([OFPST_AGGREGATE request])
453 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
454 AT_CHECK([ovs-ofctl ofp-print "\
455 01 10 00 38 00 00 00 04 00 02 00 00 00 38 20 ff \
456 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
457 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
458 00 00 00 00 ff 00 ff ff \
459 "], [0], [dnl
460 OFPST_AGGREGATE request (xid=0x4): priority=0
461 ])
462 AT_CLEANUP
463
464 AT_SETUP([OFPST_AGGREGATE reply])
465 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
466 AT_CHECK([ovs-ofctl ofp-print "\
467 01 11 00 24 00 00 00 04 00 02 00 00 00 00 00 00 \
468 00 00 01 82 00 00 00 00 00 00 93 78 00 00 00 04 \
469 00 00 00 00 \
470 "], [0], [dnl
471 OFPST_AGGREGATE reply (xid=0x4): packet_count=386 byte_count=37752 flow_count=4
472 ])
473 AT_CLEANUP
474
475 AT_SETUP([OFPST_TABLE request])
476 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
477 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100030000"], [0], [dnl
478 OFPST_TABLE request (xid=0x1):
479 ])
480 AT_CLEANUP
481
482 AT_SETUP([OFPST_TABLE reply])
483 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
484 AT_CHECK([ovs-ofctl ofp-print "\
485 01 11 00 4c 00 00 00 01 00 03 00 00 00 00 00 00 \
486 63 6c 61 73 73 69 66 69 65 72 00 00 00 00 00 00 \
487 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
488 00 3f ff ff 00 10 00 00 00 00 00 0b 00 00 00 00 \
489 00 00 00 00 00 00 00 00 00 00 00 00 \
490 "], [0], [dnl
491 OFPST_TABLE reply (xid=0x1): 1 tables
492   0: classifier: wild=0x3fffff, max=1048576, active=11
493                lookup=0, matched=0
494 ])
495 AT_CLEANUP
496
497 AT_SETUP([OFPST_PORT request])
498 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
499 AT_CHECK([ovs-ofctl ofp-print "\
500 01 10 00 14 00 00 00 01 00 04 00 00 ff ff 00 00 \
501 00 00 00 00 \
502 "], [0], [dnl
503 OFPST_PORT request (xid=0x1): port_no=65535
504 ])
505 AT_CLEANUP
506
507 AT_SETUP([OFPST_PORT reply])
508 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
509 AT_CHECK([ovs-ofctl ofp-print "\
510 01 11 01 ac 00 00 00 01 00 04 00 00 00 03 00 00 \
511 00 00 00 00 00 00 00 00 00 00 4d 20 00 00 00 00 \
512 00 00 14 32 00 00 00 00 00 0f 60 4e 00 00 00 00 \
513 00 05 71 bc 00 00 00 00 00 00 00 00 00 00 00 00 \
514 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
515 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
516 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
517 00 00 00 00 ff fe 00 00 00 00 00 00 00 00 00 00 \
518 00 00 02 ac 00 00 00 00 00 00 01 f5 00 00 00 00 \
519 00 01 0c 8c 00 00 00 00 00 00 db 1c 00 00 00 00 \
520 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
521 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
522 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
523 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
524 00 00 00 00 00 00 00 00 00 00 06 be 00 00 00 00 \
525 00 00 05 84 00 00 00 00 00 02 34 b4 00 00 00 00 \
526 00 02 23 d4 00 00 00 00 00 00 00 00 00 00 00 00 \
527 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
528 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
529 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
530 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 \
531 00 00 14 12 00 00 00 00 00 00 14 66 00 00 00 00 \
532 00 04 a2 54 00 00 00 00 00 05 8a 1e 00 00 00 00 \
533 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
534 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
535 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
536 00 00 00 00 00 00 00 00 00 00 00 00 \
537 "], [0], [dnl
538 OFPST_PORT reply (xid=0x1): 4 ports
539   port  3: rx pkts=19744, bytes=1007694, drop=0, errs=0, frame=0, over=0, crc=0
540            tx pkts=5170, bytes=356796, drop=0, errs=0, coll=0
541   port 65534: rx pkts=684, bytes=68748, drop=0, errs=0, frame=0, over=0, crc=0
542            tx pkts=501, bytes=56092, drop=0, errs=0, coll=0
543   port  2: rx pkts=1726, bytes=144564, drop=0, errs=0, frame=0, over=0, crc=0
544            tx pkts=1412, bytes=140244, drop=0, errs=0, coll=0
545   port  1: rx pkts=5138, bytes=303700, drop=0, errs=0, frame=0, over=0, crc=0
546            tx pkts=5222, bytes=363038, drop=0, errs=0, coll=0
547 ])
548 AT_CLEANUP
549
550 AT_SETUP([OFPST_QUEUE request])
551 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
552 AT_CHECK([ovs-ofctl ofp-print "\
553 01 10 00 14 00 00 00 01 00 05 00 00 ff fc 00 00 \
554 ff ff ff ff \
555 "], [0], [dnl
556 OFPST_QUEUE request (xid=0x1):port=ALL queue=ALL
557 ])
558 AT_CLEANUP
559
560 AT_SETUP([OFPST_QUEUE reply])
561 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
562 AT_CHECK([ovs-ofctl ofp-print "\
563 01 11 00 cc 00 00 00 01 00 05 00 00 00 03 00 00 \
564 00 00 00 01 00 00 00 00 00 00 01 2e 00 00 00 00 \
565 00 00 00 01 00 00 00 00 00 00 00 00 00 03 00 00 \
566 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
567 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
568 00 00 00 01 00 00 00 00 00 00 08 34 00 00 00 00 \
569 00 00 00 14 00 00 00 00 00 00 00 00 00 02 00 00 \
570 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
571 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
572 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 \
573 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
574 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
575 00 00 00 00 00 00 00 00 00 00 00 00 \
576 "], [0], [dnl
577 OFPST_QUEUE reply (xid=0x1): 6 queues
578   port 3 queue 1: bytes=302, pkts=1, errors=0
579   port 3 queue 2: bytes=0, pkts=0, errors=0
580   port 2 queue 1: bytes=2100, pkts=20, errors=0
581   port 2 queue 2: bytes=0, pkts=0, errors=0
582   port 1 queue 1: bytes=0, pkts=0, errors=0
583   port 1 queue 2: bytes=0, pkts=0, errors=0
584 ])
585 AT_CLEANUP
586
587 AT_SETUP([OFPT_BARRIER_REQUEST])
588 AT_KEYWORDS([ofp-print])
589 AT_CHECK([ovs-ofctl ofp-print '01 12 00 08 00 00 00 01'], [0], [dnl
590 OFPT_BARRIER_REQUEST (xid=0x1):
591 ])
592 AT_CLEANUP
593
594 AT_SETUP([OFPT_BARRIER_REPLY])
595 AT_KEYWORDS([ofp-print])
596 AT_CHECK([ovs-ofctl ofp-print '01 13 00 08 00 00 00 01'], [0], [dnl
597 OFPT_BARRIER_REPLY (xid=0x1):
598 ])
599 AT_CLEANUP
600
601 AT_SETUP([NXT_STATUS_REQUEST])
602 AT_KEYWORDS([ofp-print])
603 AT_CHECK([ovs-ofctl ofp-print "\
604 01 04 00 16 00 00 00 01 00 00 23 20 00 00 00 00 \
605 73 77 69 74 63 68 \
606 "], [0], [dnl
607 NXT_STATUS_REQUEST (xid=0x1): "switch"
608 ])
609 AT_CLEANUP
610
611 AT_SETUP([NXT_STATUS_REPLY])
612 AT_KEYWORDS([ofp-print])
613 AT_CHECK([ovs-ofctl ofp-print "\
614 01 04 00 43 00 00 00 01 00 00 23 20 00 00 00 01 \
615 73 77 69 74 63 68 2e 6e 6f 77 3d 31 30 36 31 36 \
616 0a 73 77 69 74 63 68 2e 75 70 74 69 6d 65 3d 31 \
617 31 33 36 0a 73 77 69 74 63 68 2e 70 69 64 3d 38 \
618 31 31 0a \
619 "], [0], [dnl
620 NXT_STATUS_REPLY (xid=0x1): "switch.now=10616\012switch.uptime=1136\012switch.pid=811\012"
621 ])
622 AT_CLEANUP
623
624 AT_SETUP([NXT_TUN_ID_FROM_COOKIE])
625 AT_KEYWORDS([ofp-print])
626 AT_CHECK([ovs-ofctl ofp-print "\
627 01 04 00 18 00 00 00 02 00 00 23 20 00 00 00 09 \
628 01 00 00 00 00 00 00 00 \
629 "], [0], [dnl
630 NXT_TUN_ID_FROM_COOKIE (xid=0x2): set=1
631 ])
632 AT_CLEANUP
633
634 AT_SETUP([NXT_ROLE_REQUEST])
635 AT_KEYWORDS([ofp-print])
636 AT_CHECK([ovs-ofctl ofp-print "\
637 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0a \
638 00 00 00 01 \
639 "], [0], [dnl
640 NXT_ROLE_REQUEST (xid=0x2): role=master
641 ])
642 AT_CLEANUP
643
644 AT_SETUP([NXT_ROLE_REPLY])
645 AT_KEYWORDS([ofp-print])
646 AT_CHECK([ovs-ofctl ofp-print "\
647 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0b \
648 00 00 00 02 \
649 "], [0], [dnl
650 NXT_ROLE_REPLY (xid=0x2): role=slave
651 ])
652 AT_CLEANUP
653
654 AT_SETUP([NXT_SET_FLOW_FORMAT])
655 AT_KEYWORDS([ofp-print])
656 AT_CHECK([ovs-ofctl ofp-print "\
657 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0c \
658 00 00 00 02 \
659 "], [0], [dnl
660 NXT_SET_FLOW_FORMAT (xid=0x2): format=nxm
661 ])
662 AT_CLEANUP
663
664 # The flow is formatted with cls_rule_format() for the low-verbosity case.
665 AT_SETUP([NXT_FLOW_MOD, low verbosity])
666 AT_KEYWORDS([ofp-print])
667 AT_CHECK([ovs-ofctl ofp-print "\
668 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
669 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
670 ff ff ff ff ff ff 00 00 00 14 00 00 00 00 00 00 \
671 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
672 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
673 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
674 " 2], [0], [dnl
675 NXT_FLOW_MOD (xid=0x2): ADD reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[[]]
676 ])
677 AT_CLEANUP
678
679 # The flow is formatted with ofp_match_to_string() for the low-verbosity case.
680 AT_SETUP([NXT_FLOW_MOD, high verbosity])
681 AT_KEYWORDS([ofp-print])
682 AT_CHECK([ovs-ofctl ofp-print "\
683 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
684 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
685 ff ff ff ff ff ff 00 00 00 14 00 00 00 00 00 00 \
686 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
687 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
688 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
689 " 3], [0], [dnl
690 NXT_FLOW_MOD (xid=0x2): ADD NXM_NX_TUN_ID(00000000000001c8), NXM_NX_REG0(0000007b) actions=load:0x5->NXM_NX_REG0[[]]
691 ])
692 AT_CLEANUP
693
694 AT_SETUP([NXT_FLOW_REMOVED])
695 AT_KEYWORDS([ofp-print])
696 AT_CHECK([ovs-ofctl ofp-print "\
697 01 04 00 78 00 00 00 00 00 00 23 20 00 00 00 0e \
698 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 06 \
699 01 6e 36 00 00 05 00 3c 00 00 00 00 00 00 00 01 \
700 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
701 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
702 00 05 00 00 06 02 08 06 00 00 08 02 00 00 00 00 \
703 1e 02 00 02 00 00 20 04 c0 a8 00 01 00 00 22 04 \
704 c0 a8 00 02 00 00 00 00 \
705 "], [0], [dnl
706 NXT_FLOW_REMOVED (xid=0x0): priority=65535,arp,in_port=3,vlan_tci=0x0000/0xffff,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,opcode=2 reason=idle duration6.024s idle5 pkts1 bytes60
707 ])
708 AT_CLEANUP
709
710 AT_SETUP([NXST_FLOW request])
711 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
712 AT_CHECK([ovs-ofctl ofp-print "\
713 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
714 00 00 00 00 00 00 00 00 ff ff 00 00 ff 00 00 00 \
715 "], [0], [dnl
716 NXST_FLOW request (xid=0x4): priority=0
717 ])
718 AT_CLEANUP
719
720 AT_SETUP([NXST_FLOW reply])
721 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
722 AT_CHECK([ovs-ofctl ofp-print "\
723 01 11 07 e8 00 00 00 04 ff ff 00 00 00 00 23 20 \
724 00 00 00 00 00 00 00 00 00 88 00 00 00 00 00 01 \
725 02 dc 6c 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
726 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
727 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
728 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
729 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
730 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
731 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e7 00 00 \
732 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
733 00 88 00 00 00 00 00 03 32 11 62 00 ff ff 00 05 \
734 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
735 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
736 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
737 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
738 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
739 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
740 00 00 12 02 09 e4 00 00 14 02 00 00 00 00 00 00 \
741 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
742 33 f9 aa 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
743 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
744 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
745 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
746 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
747 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
748 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
749 14 02 09 e5 00 00 00 00 00 00 00 08 00 03 00 00 \
750 00 88 00 00 00 00 00 04 2d 0f a5 00 ff ff 00 05 \
751 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
752 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
753 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
754 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
755 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
756 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
757 00 00 12 02 09 e3 00 00 14 02 00 00 00 00 00 00 \
758 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
759 34 73 bc 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
760 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
761 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
762 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
763 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
764 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
765 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e5 00 00 \
766 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
767 00 88 00 00 00 00 00 05 28 0d e8 00 ff ff 00 05 \
768 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
769 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
770 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
771 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
772 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
773 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
774 00 00 12 02 09 e2 00 00 14 02 00 00 00 00 00 00 \
775 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 01 \
776 02 62 5a 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
777 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
778 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
779 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
780 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
781 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
782 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
783 14 02 09 e7 00 00 00 00 00 00 00 08 00 03 00 00 \
784 00 88 00 00 00 00 00 01 38 be 5e 00 ff ff 00 05 \
785 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
786 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
787 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
788 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
789 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
790 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
791 00 00 12 02 00 00 00 00 14 02 09 e6 00 00 00 00 \
792 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 04 \
793 27 d0 df 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
794 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
795 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
796 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
797 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
798 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
799 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
800 14 02 09 e3 00 00 00 00 00 00 00 08 00 03 00 00 \
801 00 88 00 00 00 00 00 03 2c d2 9c 00 ff ff 00 05 \
802 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
803 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
804 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
805 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
806 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
807 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
808 00 00 12 02 00 00 00 00 14 02 09 e4 00 00 00 00 \
809 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
810 0a 40 83 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
811 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
812 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
813 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
814 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
815 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
816 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e8 00 00 \
817 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
818 00 88 00 00 00 00 00 05 25 31 7c 00 ff ff 00 05 \
819 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
820 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
821 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
822 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
823 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
824 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
825 00 00 12 02 00 00 00 00 14 02 09 e2 00 00 00 00 \
826 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
827 04 c4 b4 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
828 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
829 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
830 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
831 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
832 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
833 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
834 14 02 09 e8 00 00 00 00 00 00 00 08 00 03 00 00 \
835 00 88 00 00 00 00 00 01 39 38 70 00 ff ff 00 05 \
836 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
837 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
838 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
839 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
840 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
841 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
842 00 00 12 02 09 e6 00 00 14 02 00 00 00 00 00 00 \
843 00 00 00 08 00 01 00 00 00 60 00 00 00 00 00 e4 \
844 2e 7d db 00 80 00 00 00 00 00 00 14 00 00 00 00 \
845 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
846 00 00 00 00 00 00 00 00 00 01 20 08 00 00 00 00 \
847 00 00 01 c8 00 01 00 04 00 00 00 7b 00 00 00 00 \
848 ff ff 00 18 00 00 23 20 00 07 00 1f 00 01 00 04 \
849 00 00 00 00 00 00 00 05 \
850 "], [0],
851 [[NXST_FLOW reply (xid=0x4):
852  cookie=0x0, duration=1.048s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=3,vlan_tci=0x0000/0xffff,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
853  cookie=0x0, duration=3.84s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=3,vlan_tci=0x0000/0xffff,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
854  cookie=0x0, duration=2.872s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=1,vlan_tci=0x0000/0xffff,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
855  cookie=0x0, duration=4.756s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=3,vlan_tci=0x0000/0xffff,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
856  cookie=0x0, duration=2.88s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=3,vlan_tci=0x0000/0xffff,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
857  cookie=0x0, duration=5.672s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=3,vlan_tci=0x0000/0xffff,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
858  cookie=0x0, duration=1.04s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=1,vlan_tci=0x0000/0xffff,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
859  cookie=0x0, duration=1.952s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=1,vlan_tci=0x0000/0xffff,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
860  cookie=0x0, duration=4.668s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=1,vlan_tci=0x0000/0xffff,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
861  cookie=0x0, duration=3.752s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=1,vlan_tci=0x0000/0xffff,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
862  cookie=0x0, duration=0.172s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=3,vlan_tci=0x0000/0xffff,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
863  cookie=0x0, duration=5.624s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=1,vlan_tci=0x0000/0xffff,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
864  cookie=0x0, duration=0.08s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=1,vlan_tci=0x0000/0xffff,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
865  cookie=0x0, duration=1.96s, table_id=0, n_packets=1, n_bytes=60, idle_timeout=5,priority=65535,tcp,in_port=3,vlan_tci=0x0000/0xffff,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
866  cookie=0x0, duration=228.78s, table_id=0, n_packets=0, n_bytes=0, reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[]
867 ]])
868 AT_CLEANUP
869
870 AT_SETUP([NXST_AGGREGATE request])
871 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
872 AT_CHECK([ovs-ofctl ofp-print "\
873 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
874 00 00 00 01 00 00 00 00 ff ff 00 00 ff 00 00 00 \
875 "], [0], [dnl
876 NXST_AGGREGATE request (xid=0x4): priority=0
877 ])
878 AT_CLEANUP
879
880 AT_SETUP([NXST_AGGREGATE reply])
881 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
882 AT_CHECK([ovs-ofctl ofp-print "\
883 01 11 00 30 00 00 00 04 ff ff 00 00 00 00 23 20 \
884 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 07 \
885 00 00 00 00 00 00 01 a4 00 00 00 07 00 00 00 00 \
886 "], [0], [dnl
887 NXST_AGGREGATE reply (xid=0x4): packet_count=7 byte_count=420 flow_count=7
888 ])
889 AT_CLEANUP