datapath: Convert kernel priority actions into match/set.
[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
142      config:     0
143      state:      0
144      current:    100MB-FD AUTO_NEG
145      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
146      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
147  2(eth2): addr:50:54:00:00:00:03
148      config:     0
149      state:      0
150      current:    100MB-FD AUTO_NEG
151      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
152      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
153  3(eth0): addr:50:54:00:00:00:01
154      config:     0
155      state:      0
156      current:    100MB-FD AUTO_NEG
157      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
158      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
159  LOCAL(br0): addr:50:54:00:00:00:01
160      config:     PORT_DOWN
161      state:      LINK_DOWN
162 ])
163 AT_CLEANUP
164
165 AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port])
166 AT_KEYWORDS([ofp-print])
167 AT_CHECK([ovs-ofctl ofp-print "\
168 01 06 00 dc 00 00 00 01 00 00 50 54 00 00 00 01 \
169 00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
170 ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
171 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
172 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
173 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
174 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
175 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
176 00 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
177 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
178 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
179 00 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
181 00 00 02 08 00 00 02 8f 00 00 02 8f \
182 "], [0], [dnl
183 ***decode error: type OFPET_BAD_REQUEST, code OFPBRC_BAD_LEN***
184 00000000  01 06 00 dc 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
185 00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 0f ff |................|
186 00000020  ff fe 50 54 00 00 00 01-62 72 30 00 00 00 00 00 |..PT....br0.....|
187 00000030  00 00 00 00 00 00 00 00-00 00 00 01 00 00 00 01 |................|
188 00000040  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
189 00000050  00 03 50 54 00 00 00 01-65 74 68 30 00 00 00 00 |..PT....eth0....|
190 00000060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
191 00000070  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
192 00000080  00 02 50 54 00 00 00 03-65 74 68 32 00 00 00 00 |..PT....eth2....|
193 00000090  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
194 000000a0  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
195 000000b0  00 01 50 54 00 00 00 02-65 74 68 31 00 00 00 00 |..PT....eth1....|
196 000000c0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
197 000000d0  00 00 02 08 00 00 02 8f-00 00 02 8f             |............    |
198 ], [stderr])
199 AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
200 received OpenFlow message OFPT_FEATURES_REPLY with incorrect length 220 (must be exactly 32 bytes or longer by an integer multiple of 48 bytes)
201 ])
202 AT_CLEANUP
203
204 AT_SETUP([OFPT_GET_CONFIG_REQUEST])
205 AT_KEYWORDS([ofp-print])
206 AT_CHECK([ovs-ofctl ofp-print '0107000800000001'], [0], [dnl
207 OFPT_GET_CONFIG_REQUEST (xid=0x1):
208 ])
209 AT_CLEANUP
210
211 AT_SETUP([OFPT_GET_CONFIG_REPLY, most common form])
212 AT_KEYWORDS([ofp-print])
213 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 00 00 00'], [0], [dnl
214 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
215 ])
216 AT_CLEANUP
217
218
219 AT_SETUP([OFPT_GET_CONFIG_REPLY, frags and miss_send_len])
220 AT_KEYWORDS([ofp-print])
221 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 02 00 ff'], [0], [dnl
222 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=reassemble miss_send_len=255
223 ])
224 AT_CLEANUP
225
226 AT_SETUP([OFPT_PACKET_IN])
227 AT_KEYWORDS([ofp-print])
228 AT_SKIP_IF([test ! -x /usr/sbin/tcpdump])
229 AT_CHECK([ovs-ofctl ofp-print "\
230 01 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
231 00 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
232 45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
233 c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
234 50 00 02 00 26 e8 00 00 00 00 00 00 00 00 \
235 "], [0], [stdout])
236 dnl The tcpdump output format differs slightly from one version to another,
237 dnl so trim off the end of the line where differences appear.
238 AT_CHECK([sed 's/\(length 60:\).*/\1 .../' stdout], [0], [dnl
239 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 data_len=60 buffer=0x00000111
240 priority0: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
241 50:54:00:00:00:05 > 50:54:00:00:00:06, ethertype IPv4 (0x0800), length 60: ...
242 ])
243 AT_CLEANUP
244
245 AT_SETUP([OFPT_FLOW_REMOVED])
246 AT_KEYWORDS([ofp-print])
247 AT_CHECK([ovs-ofctl ofp-print "\
248 01 0b 00 58 00 00 00 00 00 00 00 00 00 03 50 54 \
249 00 00 00 05 50 54 00 00 00 06 ff ff 00 00 08 06 \
250 00 02 00 00 c0 a8 00 01 c0 a8 00 02 00 00 00 00 \
251 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 05 \
252 30 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \
253 00 00 00 00 00 00 00 3c \
254 "], [0], [dnl
255 OFPT_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,nw_src=192.168.0.1,nw_dst=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 reason=idle duration5.82s idle5 pkts1 bytes60
256 ])
257 AT_CLEANUP
258
259 AT_SETUP([OFPT_PORT_STATUS])
260 AT_KEYWORDS([ofp-print])
261 AT_CHECK([ovs-ofctl ofp-print "\
262 01 0c 00 40 00 00 00 00 02 00 00 00 00 00 00 00 \
263 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
264 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
265 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
266 "], [0], [dnl
267 OFPT_PORT_STATUS (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
268      config:     PORT_DOWN
269      state:      LINK_DOWN
270      current:    100MB-FD AUTO_NEG
271      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
272      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
273 ])
274 AT_CLEANUP
275
276 AT_SETUP([OFPT_PACKET_OUT])
277 AT_KEYWORDS([ofp-print])
278 AT_CHECK([ovs-ofctl ofp-print "\
279 01 0d 00 54 00 00 00 00 00 00 01 14 00 01 00 08 \
280 00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
281 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
282 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
283 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
284 00 00 00 00 \
285 "], [0], [dnl
286 OFPT_PACKET_OUT (xid=0x0): in_port=1 actions_len=8 actions=output:3 buffer=0x00000114
287 ])
288 AT_CLEANUP
289
290 # The flow is formatted with cls_rule_format() for the low-verbosity case.
291 AT_SETUP([OFPT_FLOW_MOD - low verbosity])
292 AT_KEYWORDS([ofp-print])
293 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
294 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
295 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
296 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
297 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
298 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
299 " 2], [0], [dnl
300 OFPT_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,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2 idle:5 buf:0x10e actions=output:3
301 ], [dnl
302 ofp_util|INFO|normalization changed ofp_match, details:
303 ofp_util|INFO| pre: 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,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0
304 ofp_util|INFO|post: 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,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2
305 ])
306 AT_CLEANUP
307
308 # The flow is formatted with ofp_match_to_string() for the high-verbosity case.
309 AT_SETUP([OFPT_FLOW_MOD - high verbosity])
310 AT_KEYWORDS([ofp-print])
311 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
312 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
313 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
314 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
315 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
316 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
317 " 3], [0], [dnl
318 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,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 idle:5 pri:65535 buf:0x10e actions=output:3
319 ], [dnl
320 ofp_util|INFO|normalization changed ofp_match, details:
321 ofp_util|INFO| pre: 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,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0
322 ofp_util|INFO|post: 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,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=2
323 ])
324 AT_CLEANUP
325
326 AT_SETUP([OFPT_PORT_MOD])
327 AT_KEYWORDS([ofp-print])
328 AT_CHECK([ovs-ofctl ofp-print "\
329 01 0f 00 20 00 00 00 03 00 03 50 54 00 00 00 01 \
330 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
331 " 3], [0], [dnl
332 OFPT_PORT_MOD (xid=0x3):port: 3: addr:50:54:00:00:00:01, config: 0x1, mask:0x1
333      advertise: UNCHANGED
334 ])
335 AT_CLEANUP
336
337 AT_SETUP([OFPST_DESC request])
338 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
339 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100000000"], [0], [dnl
340 OFPST_DESC request (xid=0x1):
341 ])
342 AT_CLEANUP
343
344 AT_SETUP([OFPST_DESC reply])
345 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
346 AT_CHECK([ovs-ofctl ofp-print "\
347 01 11 04 2c 00 00 00 01 00 00 00 00 4e 69 63 69 \
348 72 61 20 4e 65 74 77 6f 72 6b 73 2c 20 49 6e 63 \
349 2e 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 00 00 00 00 \
359 00 00 00 00 00 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 4f 70 65 6e \
364 20 76 53 77 69 74 63 68 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 00 00 00 00 \
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 00 00 00 00 \
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 31 2e 31 2e \
380 30 70 72 65 32 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 00 00 00 00 \
393 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
394 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
395 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
396 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
397 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
398 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
399 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
401 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
402 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
403 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
404 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
405 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
406 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
407 00 00 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 00 00 00 00 00 00 00 00 00 00 00 00 \
410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
411 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
412 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
413 00 00 00 00 00 00 00 00 00 00 00 00 \
414 "], [0], [dnl
415 OFPST_DESC reply (xid=0x1):
416 Manufacturer: Nicira Networks, Inc.
417 Hardware: Open vSwitch
418 Software: 1.1.0pre2
419 Serial Num: None
420 DP Description: None
421 ])
422 AT_CLEANUP
423
424 AT_SETUP([OFPST_FLOW request])
425 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
426 AT_CHECK([ovs-ofctl ofp-print "\
427 01 10 00 38 00 00 00 04 00 01 00 00 00 38 20 ff \
428 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
429 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
430 00 00 00 00 ff 00 ff ff \
431 "], [0], [dnl
432 OFPST_FLOW request (xid=0x4): @&t@
433 ])
434 AT_CLEANUP
435
436 AT_SETUP([OFPST_FLOW reply])
437 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
438 AT_CHECK([ovs-ofctl ofp-print "\
439 01 11 01 e4 00 00 00 04 00 01 00 00 00 60 00 00 \
440 00 00 00 00 00 03 50 54 00 00 00 05 50 54 00 00 \
441 00 06 ff ff 00 00 08 06 00 02 00 00 c0 a8 00 01 \
442 c0 a8 00 02 00 00 00 00 00 00 00 04 0b eb c2 00 \
443 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
444 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
445 00 00 00 3c 00 00 00 08 00 01 00 00 00 60 00 00 \
446 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
447 00 05 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 02 \
448 c0 a8 00 01 00 00 00 00 00 00 00 08 35 a4 e9 00 \
449 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
450 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
451 00 00 04 fa 00 00 00 08 00 03 00 00 00 60 00 00 \
452 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
453 00 05 ff ff 00 00 08 06 00 01 00 00 c0 a8 00 02 \
454 c0 a8 00 01 00 00 00 00 00 00 00 04 10 b0 76 00 \
455 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
456 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
457 00 00 00 3c 00 00 00 08 00 03 00 00 00 60 00 00 \
458 00 00 00 01 00 03 50 54 00 00 00 05 50 54 00 00 \
459 00 06 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 01 \
460 c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \
461 80 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
462 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
463 00 00 04 fa 00 00 00 08 00 01 00 00 \
464 00 58 02 00 00 3f ff ff 00 00 00 00 00 00 00 00 \
465 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
466 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
467 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 \
468 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
469 00 00 00 00 00 00 00 00 \
470 "], [0], [dnl
471 OFPST_FLOW reply (xid=0x4):
472  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,nw_src=192.168.0.1,nw_dst=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 actions=output:1
473  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
474  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,nw_src=192.168.0.2,nw_dst=192.168.0.1,arp_op=1,nw_tos=0,icmp_type=0,icmp_code=0 actions=output:3
475  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
476  cookie=0x0, duration=0s, table=2, n_packets=0, n_bytes=0, actions=drop
477 ])
478 AT_CLEANUP
479
480 AT_SETUP([OFPST_AGGREGATE request])
481 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
482 AT_CHECK([ovs-ofctl ofp-print "\
483 01 10 00 38 00 00 00 04 00 02 00 00 00 38 20 ff \
484 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
485 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
486 00 00 00 00 ff 00 ff ff \
487 "], [0], [dnl
488 OFPST_AGGREGATE request (xid=0x4): @&t@
489 ])
490 AT_CLEANUP
491
492 AT_SETUP([OFPST_AGGREGATE reply])
493 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
494 AT_CHECK([ovs-ofctl ofp-print "\
495 01 11 00 24 00 00 00 04 00 02 00 00 00 00 00 00 \
496 00 00 01 82 00 00 00 00 00 00 93 78 00 00 00 04 \
497 00 00 00 00 \
498 "], [0], [dnl
499 OFPST_AGGREGATE reply (xid=0x4): packet_count=386 byte_count=37752 flow_count=4
500 ])
501 AT_CLEANUP
502
503 AT_SETUP([OFPST_TABLE request])
504 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
505 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100030000"], [0], [dnl
506 OFPST_TABLE request (xid=0x1):
507 ])
508 AT_CLEANUP
509
510 AT_SETUP([OFPST_TABLE reply])
511 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
512 AT_CHECK([ovs-ofctl ofp-print "\
513 01 11 00 4c 00 00 00 01 00 03 00 00 00 00 00 00 \
514 63 6c 61 73 73 69 66 69 65 72 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 3f ff ff 00 10 00 00 00 00 00 0b 00 00 00 00 \
517 00 00 00 00 00 00 00 00 00 00 00 00 \
518 "], [0], [dnl
519 OFPST_TABLE reply (xid=0x1): 1 tables
520   0: classifier: wild=0x3fffff, max=1048576, active=11
521                lookup=0, matched=0
522 ])
523 AT_CLEANUP
524
525 AT_SETUP([OFPST_PORT request])
526 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
527 AT_CHECK([ovs-ofctl ofp-print "\
528 01 10 00 14 00 00 00 01 00 04 00 00 ff ff 00 00 \
529 00 00 00 00 \
530 "], [0], [dnl
531 OFPST_PORT request (xid=0x1): port_no=65535
532 ])
533 AT_CLEANUP
534
535 AT_SETUP([OFPST_PORT reply])
536 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
537 AT_CHECK([ovs-ofctl ofp-print "\
538 01 11 01 ac 00 00 00 01 00 04 00 00 00 03 00 00 \
539 00 00 00 00 00 00 00 00 00 00 4d 20 00 00 00 00 \
540 00 00 14 32 00 00 00 00 00 0f 60 4e 00 00 00 00 \
541 00 05 71 bc 00 00 00 00 00 00 00 00 00 00 00 00 \
542 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
543 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
544 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
545 00 00 00 00 ff fe 00 00 00 00 00 00 00 00 00 00 \
546 00 00 02 ac 00 00 00 00 00 00 01 f5 00 00 00 00 \
547 00 01 0c 8c 00 00 00 00 00 00 db 1c 00 00 00 00 \
548 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
549 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
550 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
551 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
552 00 00 00 00 00 00 00 00 00 00 06 be 00 00 00 00 \
553 00 00 05 84 00 00 00 00 00 02 34 b4 00 00 00 00 \
554 00 02 23 d4 00 00 00 00 00 00 00 00 00 00 00 00 \
555 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
556 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
557 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
558 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 \
559 00 00 14 12 00 00 00 00 00 00 14 66 00 00 00 00 \
560 00 04 a2 54 00 00 00 00 00 05 8a 1e 00 00 00 00 \
561 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
562 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
563 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
564 00 00 00 00 00 00 00 00 00 00 00 00 \
565 "], [0], [dnl
566 OFPST_PORT reply (xid=0x1): 4 ports
567   port  3: rx pkts=19744, bytes=1007694, drop=0, errs=0, frame=0, over=0, crc=0
568            tx pkts=5170, bytes=356796, drop=0, errs=0, coll=0
569   port 65534: rx pkts=684, bytes=68748, drop=0, errs=0, frame=0, over=0, crc=0
570            tx pkts=501, bytes=56092, drop=0, errs=0, coll=0
571   port  2: rx pkts=1726, bytes=144564, drop=0, errs=0, frame=0, over=0, crc=0
572            tx pkts=1412, bytes=140244, drop=0, errs=0, coll=0
573   port  1: rx pkts=5138, bytes=303700, drop=0, errs=0, frame=0, over=0, crc=0
574            tx pkts=5222, bytes=363038, drop=0, errs=0, coll=0
575 ])
576 AT_CLEANUP
577
578 AT_SETUP([OFPST_QUEUE request])
579 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
580 AT_CHECK([ovs-ofctl ofp-print "\
581 01 10 00 14 00 00 00 01 00 05 00 00 ff fc 00 00 \
582 ff ff ff ff \
583 "], [0], [dnl
584 OFPST_QUEUE request (xid=0x1):port=ALL queue=ALL
585 ])
586 AT_CLEANUP
587
588 AT_SETUP([OFPST_QUEUE reply])
589 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
590 AT_CHECK([ovs-ofctl ofp-print "\
591 01 11 00 cc 00 00 00 01 00 05 00 00 00 03 00 00 \
592 00 00 00 01 00 00 00 00 00 00 01 2e 00 00 00 00 \
593 00 00 00 01 00 00 00 00 00 00 00 00 00 03 00 00 \
594 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
595 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
596 00 00 00 01 00 00 00 00 00 00 08 34 00 00 00 00 \
597 00 00 00 14 00 00 00 00 00 00 00 00 00 02 00 00 \
598 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
599 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
600 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 \
601 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
602 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
603 00 00 00 00 00 00 00 00 00 00 00 00 \
604 "], [0], [dnl
605 OFPST_QUEUE reply (xid=0x1): 6 queues
606   port 3 queue 1: bytes=302, pkts=1, errors=0
607   port 3 queue 2: bytes=0, pkts=0, errors=0
608   port 2 queue 1: bytes=2100, pkts=20, errors=0
609   port 2 queue 2: bytes=0, pkts=0, errors=0
610   port 1 queue 1: bytes=0, pkts=0, errors=0
611   port 1 queue 2: bytes=0, pkts=0, errors=0
612 ])
613 AT_CLEANUP
614
615 AT_SETUP([OFPT_BARRIER_REQUEST])
616 AT_KEYWORDS([ofp-print])
617 AT_CHECK([ovs-ofctl ofp-print '01 12 00 08 00 00 00 01'], [0], [dnl
618 OFPT_BARRIER_REQUEST (xid=0x1):
619 ])
620 AT_CLEANUP
621
622 AT_SETUP([OFPT_BARRIER_REPLY])
623 AT_KEYWORDS([ofp-print])
624 AT_CHECK([ovs-ofctl ofp-print '01 13 00 08 00 00 00 01'], [0], [dnl
625 OFPT_BARRIER_REPLY (xid=0x1):
626 ])
627 AT_CLEANUP
628
629 AT_SETUP([NXT_ROLE_REQUEST])
630 AT_KEYWORDS([ofp-print])
631 AT_CHECK([ovs-ofctl ofp-print "\
632 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0a \
633 00 00 00 01 \
634 "], [0], [dnl
635 NXT_ROLE_REQUEST (xid=0x2): role=master
636 ])
637 AT_CLEANUP
638
639 AT_SETUP([NXT_ROLE_REPLY])
640 AT_KEYWORDS([ofp-print])
641 AT_CHECK([ovs-ofctl ofp-print "\
642 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0b \
643 00 00 00 02 \
644 "], [0], [dnl
645 NXT_ROLE_REPLY (xid=0x2): role=slave
646 ])
647 AT_CLEANUP
648
649 AT_SETUP([NXT_SET_FLOW_FORMAT])
650 AT_KEYWORDS([ofp-print])
651 AT_CHECK([ovs-ofctl ofp-print "\
652 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0c \
653 00 00 00 02 \
654 "], [0], [dnl
655 NXT_SET_FLOW_FORMAT (xid=0x2): format=nxm
656 ])
657 AT_CLEANUP
658
659 # The flow is formatted with cls_rule_format() for the low-verbosity case.
660 AT_SETUP([NXT_FLOW_MOD, low verbosity])
661 AT_KEYWORDS([ofp-print])
662 AT_CHECK([ovs-ofctl ofp-print "\
663 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
664 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
665 ff ff ff ff ff ff 00 00 00 14 00 00 00 00 00 00 \
666 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
667 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
668 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
669 " 2], [0], [dnl
670 NXT_FLOW_MOD (xid=0x2): ADD reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[[]]
671 ])
672 AT_CLEANUP
673
674 # The flow is formatted with ofp_match_to_string() for the low-verbosity case.
675 AT_SETUP([NXT_FLOW_MOD, high verbosity])
676 AT_KEYWORDS([ofp-print])
677 AT_CHECK([ovs-ofctl ofp-print "\
678 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
679 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
680 ff ff ff ff ff ff 00 00 00 14 00 00 00 00 00 00 \
681 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
682 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
683 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
684 " 3], [0], [dnl
685 NXT_FLOW_MOD (xid=0x2): ADD NXM_NX_TUN_ID(00000000000001c8), NXM_NX_REG0(0000007b) actions=load:0x5->NXM_NX_REG0[[]]
686 ])
687 AT_CLEANUP
688
689 AT_SETUP([NXT_FLOW_REMOVED])
690 AT_KEYWORDS([ofp-print])
691 AT_CHECK([ovs-ofctl ofp-print "\
692 01 04 00 78 00 00 00 00 00 00 23 20 00 00 00 0e \
693 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 06 \
694 01 6e 36 00 00 05 00 3c 00 00 00 00 00 00 00 01 \
695 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
696 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
697 00 05 00 00 06 02 08 06 00 00 08 02 00 00 00 00 \
698 1e 02 00 02 00 00 20 04 c0 a8 00 01 00 00 22 04 \
699 c0 a8 00 02 00 00 00 00 \
700 "], [0], [dnl
701 NXT_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,nw_src=192.168.0.1,nw_dst=192.168.0.2,arp_op=2 reason=idle duration6.024s idle5 pkts1 bytes60
702 ])
703 AT_CLEANUP
704
705 AT_SETUP([NXT_FLOW_MOD_TABLE_ID])
706 AT_KEYWORDS([ofp-print])
707 AT_CHECK([ovs-ofctl ofp-print "\
708 01 04 00 18 01 02 03 04 00 00 23 20 00 00 00 0f \
709 01 00 00 00 00 00 00 00 \
710 "], [0], [dnl
711 NXT_FLOW_MOD_TABLE_ID (xid=0x1020304): enable
712 ])
713 AT_CLEANUP
714
715 AT_SETUP([NXST_FLOW request])
716 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
717 AT_CHECK([ovs-ofctl ofp-print "\
718 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
719 00 00 00 00 00 00 00 00 ff ff 00 00 ff 00 00 00 \
720 "], [0], [dnl
721 NXST_FLOW request (xid=0x4): @&t@
722 ])
723 AT_CLEANUP
724
725 AT_SETUP([NXST_FLOW reply])
726 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
727 AT_CHECK([ovs-ofctl ofp-print "\
728 01 11 08 18 00 00 00 04 ff ff 00 00 00 00 23 20 \
729 00 00 00 00 00 00 00 00 00 88 00 00 00 00 00 01 \
730 02 dc 6c 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
731 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
732 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
733 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
734 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
735 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
736 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e7 00 00 \
737 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
738 00 88 00 00 00 00 00 03 32 11 62 00 ff ff 00 05 \
739 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
740 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
741 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
742 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
743 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
744 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
745 00 00 12 02 09 e4 00 00 14 02 00 00 00 00 00 00 \
746 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
747 33 f9 aa 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
748 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
749 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
750 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
751 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
752 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
753 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
754 14 02 09 e5 00 00 00 00 00 00 00 08 00 03 00 00 \
755 00 88 00 00 00 00 00 04 2d 0f a5 00 ff ff 00 05 \
756 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
757 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
758 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
759 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
760 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
761 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
762 00 00 12 02 09 e3 00 00 14 02 00 00 00 00 00 00 \
763 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
764 34 73 bc 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
765 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
766 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
767 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
768 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
769 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
770 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e5 00 00 \
771 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
772 00 88 00 00 00 00 00 05 28 0d e8 00 ff ff 00 05 \
773 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
774 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
775 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
776 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
777 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
778 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
779 00 00 12 02 09 e2 00 00 14 02 00 00 00 00 00 00 \
780 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 01 \
781 02 62 5a 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
782 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
783 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
784 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
785 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
786 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
787 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
788 14 02 09 e7 00 00 00 00 00 00 00 08 00 03 00 00 \
789 00 88 00 00 00 00 00 01 38 be 5e 00 ff ff 00 05 \
790 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
791 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
792 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
793 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
794 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
795 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
796 00 00 12 02 00 00 00 00 14 02 09 e6 00 00 00 00 \
797 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 04 \
798 27 d0 df 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
799 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
800 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
801 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
802 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
803 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
804 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
805 14 02 09 e3 00 00 00 00 00 00 00 08 00 03 00 00 \
806 00 88 00 00 00 00 00 03 2c d2 9c 00 ff ff 00 05 \
807 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
808 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
809 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
810 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
811 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
812 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
813 00 00 12 02 00 00 00 00 14 02 09 e4 00 00 00 00 \
814 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
815 0a 40 83 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
816 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
817 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
818 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
819 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
820 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
821 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e8 00 00 \
822 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
823 00 88 00 00 00 00 00 05 25 31 7c 00 ff ff 00 05 \
824 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
825 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
826 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
827 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
828 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
829 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
830 00 00 12 02 00 00 00 00 14 02 09 e2 00 00 00 00 \
831 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
832 04 c4 b4 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
833 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
834 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
835 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
836 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
837 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
838 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
839 14 02 09 e8 00 00 00 00 00 00 00 08 00 03 00 00 \
840 00 88 00 00 00 00 00 01 39 38 70 00 ff ff 00 05 \
841 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
842 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
843 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
844 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
845 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
846 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
847 00 00 12 02 09 e6 00 00 14 02 00 00 00 00 00 00 \
848 00 00 00 08 00 01 00 00 00 60 00 00 00 00 00 e4 \
849 2e 7d db 00 80 00 00 00 00 00 00 14 00 00 00 00 \
850 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
851 00 00 00 00 00 00 00 00 00 01 20 08 00 00 00 00 \
852 00 00 01 c8 00 01 00 04 00 00 00 7b 00 00 00 00 \
853 ff ff 00 18 00 00 23 20 00 07 00 1f 00 01 00 04 \
854 00 00 00 00 00 00 00 05 \
855 00 30 01 00 00 00 0e 10 00 07 a1 20 80 00 00 00 \
856 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
857 00 00 00 00 00 00 00 64 00 00 00 00 00 00 19 00 \
858 "], [0],
859 [[NXST_FLOW reply (xid=0x4):
860  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
861  cookie=0x0, duration=3.84s, 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=2532,tp_dst=0 actions=output:1
862  cookie=0x0, duration=2.872s, 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=2533 actions=output:3
863  cookie=0x0, duration=4.756s, 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=2531,tp_dst=0 actions=output:1
864  cookie=0x0, duration=2.88s, 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=2533,tp_dst=0 actions=output:1
865  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
866  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
867  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
868  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
869  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
870  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
871  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
872  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
873  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
874  cookie=0x0, duration=228.78s, table=0, n_packets=0, n_bytes=0, reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[]
875  cookie=0x0, duration=3600.0005s, table=1, n_packets=100, n_bytes=6400, actions=drop
876 ]])
877 AT_CLEANUP
878
879 AT_SETUP([NXST_AGGREGATE request])
880 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
881 AT_CHECK([ovs-ofctl ofp-print "\
882 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
883 00 00 00 01 00 00 00 00 ff ff 00 00 ff 00 00 00 \
884 "], [0], [dnl
885 NXST_AGGREGATE request (xid=0x4): @&t@
886 ])
887 AT_CLEANUP
888
889 AT_SETUP([NXST_AGGREGATE reply])
890 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
891 AT_CHECK([ovs-ofctl ofp-print "\
892 01 11 00 30 00 00 00 04 ff ff 00 00 00 00 23 20 \
893 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 07 \
894 00 00 00 00 00 00 01 a4 00 00 00 07 00 00 00 00 \
895 "], [0], [dnl
896 NXST_AGGREGATE reply (xid=0x4): packet_count=7 byte_count=420 flow_count=7
897 ])
898 AT_CLEANUP