Abstract everything that uses ofp_phy_port, add OF1.1 support.
[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 '-vPATTERN:console:%c|%p|%m' ofp-print 00bb0008eeff0011],
20   [0], [dnl
21 ***decode error: OFPBRC_BAD_TYPE***
22 00000000  00 bb 00 08 ee ff 00 11-                        |........        |
23 ], [ofp_util|WARN|received OpenFlow message of unknown type 187
24 ])
25 AT_CLEANUP
26
27 AT_SETUP([truncated message])
28 AT_KEYWORDS([ofp-print])
29 AT_CHECK([ovs-ofctl ofp-print 01bbccddeeff0011], [0], [dnl
30 (***truncated to 8 bytes from 52445***)
31 00000000  01 bb cc dd ee ff 00 11-                        |........        |
32 ])
33 AT_CLEANUP
34
35 AT_SETUP([message only uses part of buffer])
36 AT_KEYWORDS([ofp-print])
37 AT_CHECK([ovs-ofctl ofp-print 01bb0009eeff00112233], [0], [dnl
38 (***only uses 9 bytes out of 10***)
39 00000000  01 bb 00 09 ee ff 00 11-22 33                   |........"3      |
40 ])
41 # "
42 AT_CLEANUP
43
44 AT_SETUP([OFPT_HELLO - ordinary])
45 AT_KEYWORDS([ofp-print])
46 AT_CHECK([ovs-ofctl ofp-print 0100000800000000], [0], [dnl
47 OFPT_HELLO (xid=0x0):
48 ])
49 AT_CLEANUP
50
51 AT_SETUP([OFPT_HELLO with extra data])
52 AT_KEYWORDS([ofp-print])
53 AT_CHECK([ovs-ofctl ofp-print 0100001300000000657874726120646174610a], [0],
54 [dnl
55 OFPT_HELLO (xid=0x0):
56 00000000  65 78 74 72 61 20 64 61-74 61 0a                |extra data.     |
57 ])
58 AT_CLEANUP
59
60 AT_SETUP([OFPT_ERROR with type OFPET_HELLO_FAILED - OF1.0])
61 AT_KEYWORDS([ofp-print])
62 AT_CHECK([ovs-ofctl ofp-print 010100170000000000000001657874726120646174610a], [0], [dnl
63 OFPT_ERROR (xid=0x0): OFPHFC_EPERM
64 extra data\012
65 ])
66 AT_CLEANUP
67
68 AT_SETUP([OFPT_ERROR with type OFPET_HELLO_FAILED - OF1.1])
69 AT_KEYWORDS([ofp-print])
70 AT_CHECK([ovs-ofctl ofp-print 020100170000000000000001657874726120646174610a], [0], [dnl
71 OFPT_ERROR (OF1.1) (xid=0x0): OFPHFC_EPERM
72 extra data\012
73 ])
74 AT_CLEANUP
75
76 AT_SETUP([OFPT_ERROR with type OFPET_BAD_REQUEST - OF1.0])
77 AT_KEYWORDS([ofp-print])
78 AT_CHECK([ovs-ofctl ofp-print 01010014000000000001000601bbccddeeff0011], [0], [dnl
79 OFPT_ERROR (xid=0x0): OFPBRC_BAD_LEN
80 (***truncated to 8 bytes from 52445***)
81 00000000  01 bb cc dd ee ff 00 11-                        |........        |
82 ])
83 AT_CLEANUP
84
85 AT_SETUP([OFPT_ERROR with code NXBRC_NXM_BAD_PREREQ - OF1.0])
86 AT_KEYWORDS([ofp-print])
87 AT_CHECK([ovs-ofctl ofp-print '0101001c55555555 b0c20000 0000232000010104 0102000811111111'], [0], [dnl
88 OFPT_ERROR (xid=0x55555555): NXBRC_NXM_BAD_PREREQ
89 OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
90 ])
91 AT_CLEANUP
92
93 AT_SETUP([OFPT_ERROR with code NXBRC_NXM_BAD_PREREQ - OF1.1])
94 AT_KEYWORDS([ofp-print])
95 AT_CHECK([ovs-ofctl ofp-print '0201001c55555555 b0c20000 0000232000010104 0102000811111111'], [0], [dnl
96 OFPT_ERROR (OF1.1) (xid=0x55555555): NXBRC_NXM_BAD_PREREQ
97 OFPT_ECHO_REQUEST (xid=0x11111111): 0 bytes of payload
98 ])
99 AT_CLEANUP
100
101 dnl Error type 3, code 1 is OFPFMFC_OVERLAP in OF1.0
102 dnl and OFPBIC_UNSUP_INST in OF1.1, so check that value in both versions.
103 AT_SETUP([OFPT_ERROR with type OFPFMFC_OVERLAP - OF1.0])
104 AT_KEYWORDS([ofp-print])
105 AT_CHECK([ovs-ofctl ofp-print 01010014000000000003000101bbccddeeff0011], [0], [dnl
106 OFPT_ERROR (xid=0x0): OFPFMFC_OVERLAP
107 (***truncated to 8 bytes from 52445***)
108 00000000  01 bb cc dd ee ff 00 11-                        |........        |
109 ])
110 AT_CLEANUP
111 AT_SETUP([OFPT_ERROR with type OFPBIC_UNSUP_INST - OF1.1])
112 AT_KEYWORDS([ofp-print])
113 AT_CHECK([ovs-ofctl ofp-print 02010014000000000003000102bbccddeeff0011], [0], [dnl
114 OFPT_ERROR (OF1.1) (xid=0x0): OFPBIC_UNSUP_INST
115 (***truncated to 8 bytes from 52445***)
116 00000000  02 bb cc dd ee ff 00 11-                        |........        |
117 ])
118 AT_CLEANUP
119
120 AT_SETUP([OFPT_ECHO_REQUEST, empty payload])
121 AT_KEYWORDS([ofp-print])
122 AT_CHECK([ovs-ofctl ofp-print '01 02 00 08 00 00 00 01'], [0], [dnl
123 OFPT_ECHO_REQUEST (xid=0x1): 0 bytes of payload
124 ])
125 AT_CLEANUP
126
127 AT_SETUP([OFPT_ECHO_REQUEST, 5-byte payload])
128 AT_KEYWORDS([ofp-print])
129 AT_CHECK([ovs-ofctl ofp-print '0102000d00000001 25 53 54 1a 9d'], [0], [dnl
130 OFPT_ECHO_REQUEST (xid=0x1): 5 bytes of payload
131 00000000  25 53 54 1a 9d                                  |%ST..           |
132 ])
133 AT_CLEANUP
134
135 AT_SETUP([OFPT_ECHO_REPLY, empty payload])
136 AT_KEYWORDS([ofp-print])
137 AT_CHECK([ovs-ofctl ofp-print '01 03 00 08 00 00 00 01'], [0], [dnl
138 OFPT_ECHO_REPLY (xid=0x1): 0 bytes of payload
139 ])
140 AT_CLEANUP
141
142 AT_SETUP([OFPT_ECHO_REPLY, 5-byte payload])
143 AT_KEYWORDS([ofp-print])
144 AT_CHECK([ovs-ofctl ofp-print '0103000d0000000ba330efaf9e'], [0], [dnl
145 OFPT_ECHO_REPLY (xid=0xb): 5 bytes of payload
146 00000000  a3 30 ef af 9e                                  |.0...           |
147 ])
148 AT_CLEANUP
149
150 AT_SETUP([OFPT_FEATURES_REQUEST])
151 AT_KEYWORDS([ofp-print])
152 AT_CHECK([ovs-ofctl ofp-print '0105000800000001'], [0], [dnl
153 OFPT_FEATURES_REQUEST (xid=0x1):
154 ])
155 AT_CLEANUP
156
157 AT_SETUP([OFPT_FEATURES_REPLY - OF1.0])
158 AT_KEYWORDS([ofp-print])
159 AT_CHECK([ovs-ofctl ofp-print "\
160 01 06 00 e0 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 00 00 00 00 \
174 "], [0], [dnl
175 OFPT_FEATURES_REPLY (xid=0x1): dpid:0000505400000001
176 n_tables:2, n_buffers:256
177 capabilities: FLOW_STATS TABLE_STATS PORT_STATS ARP_MATCH_IP
178 actions: 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
179  1(eth1): addr:50:54:00:00:00:02
180      config:     0
181      state:      0
182      current:    100MB-FD AUTO_NEG
183      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
184      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
185      speed: 100 Mbps now, 100 Mbps max
186  2(eth2): addr:50:54:00:00:00:03
187      config:     0
188      state:      0
189      current:    100MB-FD AUTO_NEG
190      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
191      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
192      speed: 100 Mbps now, 100 Mbps max
193  3(eth0): addr:50:54:00:00:00:01
194      config:     0
195      state:      0
196      current:    100MB-FD AUTO_NEG
197      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
198      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
199      speed: 100 Mbps now, 100 Mbps max
200  LOCAL(br0): addr:50:54:00:00:00:01
201      config:     PORT_DOWN
202      state:      LINK_DOWN
203      speed: 100 Mbps now, 100 Mbps max
204 ])
205 AT_CLEANUP
206
207 AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.0])
208 AT_KEYWORDS([ofp-print])
209 AT_CHECK([ovs-ofctl ofp-print "\
210 01 06 00 dc 00 00 00 01 00 00 50 54 00 00 00 01 \
211 00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
212 ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
213 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
214 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
215 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
216 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
217 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
218 00 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
219 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
220 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
221 00 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
222 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
223 00 00 02 08 00 00 02 8f 00 00 02 8f \
224 "], [0], [dnl
225 ***decode error: OFPBRC_BAD_LEN***
226 00000000  01 06 00 dc 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
227 00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 0f ff |................|
228 00000020  ff fe 50 54 00 00 00 01-62 72 30 00 00 00 00 00 |..PT....br0.....|
229 00000030  00 00 00 00 00 00 00 00-00 00 00 01 00 00 00 01 |................|
230 00000040  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
231 00000050  00 03 50 54 00 00 00 01-65 74 68 30 00 00 00 00 |..PT....eth0....|
232 00000060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
233 00000070  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
234 00000080  00 02 50 54 00 00 00 03-65 74 68 32 00 00 00 00 |..PT....eth2....|
235 00000090  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
236 000000a0  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
237 000000b0  00 01 50 54 00 00 00 02-65 74 68 31 00 00 00 00 |..PT....eth1....|
238 000000c0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
239 000000d0  00 00 02 08 00 00 02 8f-00 00 02 8f             |............    |
240 ], [stderr])
241 AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
242 received OFPT_FEATURES_REPLY with incorrect length 220 (must be exactly 32 bytes or longer by an integer multiple of 48 bytes)
243 ])
244 AT_CLEANUP
245
246 AT_SETUP([OFPT_FEATURES_REPLY - OF1.1])
247 AT_KEYWORDS([ofp-print])
248 AT_CHECK([ovs-ofctl ofp-print "\
249 02 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
250 00 00 01 00 02 00 00 00 00 00 00 87 00 00 ff ff \
251 ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
252 62 72 30 00 00 00 00 00 00 00 00 00 00 00 00 00 \
253 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
254 00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
255 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
256 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
257 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
258 00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
259 "], [0], [dnl
260 OFPT_FEATURES_REPLY (OF1.1) (xid=0x1): dpid:0000505400000001
261 n_tables:2, n_buffers:256
262 capabilities: FLOW_STATS TABLE_STATS PORT_STATS ARP_MATCH_IP
263 actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST SET_NW_ECN SET_NW_TOS SET_TP_SRC SET_TP_DST COPY_TTL_OUT COPY_TTL_IN SET_MPLS_LABEL SET_MPLS_TC SET_MPLS_TTL
264  3(eth0): addr:50:54:00:00:00:01
265      config:     0
266      state:      0
267      current:    100MB-FD AUTO_NEG
268      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
269      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
270      speed: 100 Mbps now, 100 Mbps max
271  LOCAL(br0): addr:50:54:00:00:00:01
272      config:     PORT_DOWN
273      state:      LINK_DOWN
274      speed: 100 Mbps now, 100 Mbps max
275 ])
276 AT_CLEANUP
277
278 AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.1])
279 AT_KEYWORDS([ofp-print])
280 AT_CHECK([ovs-ofctl ofp-print "\
281 02 06 00 90 00 00 00 01 00 00 50 54 00 00 00 01 \
282 00 00 01 00 02 00 00 00 00 00 00 87 00 00 ff ff \
283 ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
284 62 72 30 00 00 00 00 00 00 00 00 00 00 00 00 00 \
285 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
286 00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
287 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
288 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
289 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
290 "], [0], [dnl
291 ***decode error: OFPBRC_BAD_LEN***
292 00000000  02 06 00 90 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
293 00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 ff ff |................|
294 00000020  ff ff ff fe 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
295 00000030  62 72 30 00 00 00 00 00-00 00 00 00 00 00 00 00 |br0.............|
296 00000040  00 00 00 01 00 00 00 01-00 00 00 00 00 00 00 00 |................|
297 00000050  00 00 00 00 00 00 00 00-00 01 86 a0 00 01 86 a0 |................|
298 00000060  00 00 00 03 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
299 00000070  65 74 68 30 00 00 00 00-00 00 00 00 00 00 00 00 |eth0............|
300 00000080  00 00 00 00 00 00 00 00-00 00 20 08 00 00 28 0f |.......... ...@{:@.|
301 ], [stderr])
302 AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
303 received OFPT_FEATURES_REPLY with incorrect length 144 (must be exactly 32 bytes or longer by an integer multiple of 64 bytes)
304 ])
305 AT_CLEANUP
306
307 AT_SETUP([OFPT_GET_CONFIG_REQUEST])
308 AT_KEYWORDS([ofp-print])
309 AT_CHECK([ovs-ofctl ofp-print '0107000800000001'], [0], [dnl
310 OFPT_GET_CONFIG_REQUEST (xid=0x1):
311 ])
312 AT_CLEANUP
313
314 AT_SETUP([OFPT_GET_CONFIG_REPLY, most common form])
315 AT_KEYWORDS([ofp-print])
316 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 00 00 00'], [0], [dnl
317 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
318 ])
319 AT_CLEANUP
320
321
322 AT_SETUP([OFPT_GET_CONFIG_REPLY, frags and miss_send_len])
323 AT_KEYWORDS([ofp-print])
324 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 02 00 ff'], [0], [dnl
325 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=reassemble miss_send_len=255
326 ])
327 AT_CLEANUP
328
329 AT_SETUP([OFPT_PACKET_IN])
330 AT_KEYWORDS([ofp-print])
331 AT_CHECK([ovs-ofctl ofp-print "\
332 01 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
333 00 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
334 45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
335 c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
336 50 00 02 00 26 e8 00 00 00 00 00 00 00 00 \
337 "], [0], [dnl
338 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
339 priority:0,tunnel:0,in_port:0000,tci(0) mac(50:54:00:00:00:05->50:54:00:00:00:06) type:0800 proto:6 tos:0 ttl:64 ip(192.168.0.1->192.168.0.2) port(10031->0) tcp_csum:26e8
340 ])
341 AT_CLEANUP
342
343 AT_SETUP([OFPT_FLOW_REMOVED])
344 AT_KEYWORDS([ofp-print])
345 AT_CHECK([ovs-ofctl ofp-print "\
346 01 0b 00 58 00 00 00 00 00 00 00 00 00 03 50 54 \
347 00 00 00 05 50 54 00 00 00 06 ff ff 00 00 08 06 \
348 00 02 00 00 c0 a8 00 01 c0 a8 00 02 00 00 00 00 \
349 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 05 \
350 30 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \
351 00 00 00 00 00 00 00 3c \
352 "], [0], [dnl
353 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
354 ])
355 AT_CLEANUP
356
357 AT_SETUP([OFPT_PORT_STATUS - OF1.0])
358 AT_KEYWORDS([ofp-print])
359 AT_CHECK([ovs-ofctl ofp-print "\
360 01 0c 00 40 00 00 00 00 02 00 00 00 00 00 00 00 \
361 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
362 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
363 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
364 "], [0], [dnl
365 OFPT_PORT_STATUS (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
366      config:     PORT_DOWN
367      state:      LINK_DOWN
368      current:    100MB-FD AUTO_NEG
369      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
370      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
371      speed: 100 Mbps now, 100 Mbps max
372 ])
373 AT_CLEANUP
374
375 AT_SETUP([OFPT_PORT_STATUS - OF1.1])
376 AT_KEYWORDS([ofp-print])
377 AT_CHECK([ovs-ofctl ofp-print "\
378 02 0c 00 50 00 00 00 00 02 00 00 00 00 00 00 00 \
379 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
380 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
381 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
382 00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
383 "], [0], [dnl
384 OFPT_PORT_STATUS (OF1.1) (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
385      config:     0
386      state:      0
387      current:    100MB-FD AUTO_NEG
388      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
389      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
390      speed: 100 Mbps now, 100 Mbps max
391 ])
392 AT_CLEANUP
393
394 AT_SETUP([OFPT_PACKET_OUT])
395 AT_KEYWORDS([ofp-print])
396 AT_CHECK([ovs-ofctl ofp-print "\
397 01 0d 00 54 00 00 00 00 00 00 01 14 00 01 00 08 \
398 00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
399 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
400 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
401 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
402 00 00 00 00 \
403 "], [0], [dnl
404 OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 buffer=0x00000114
405 ])
406 AT_CLEANUP
407
408 # The flow is formatted with cls_rule_format() for the low-verbosity case.
409 AT_SETUP([OFPT_FLOW_MOD - low verbosity])
410 AT_KEYWORDS([ofp-print])
411 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
412 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
413 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
414 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
415 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
416 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
417 " 2], [0], [dnl
418 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
419 ], [dnl
420 ofp_util|INFO|normalization changed ofp_match, details:
421 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
422 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
423 ])
424 AT_CLEANUP
425
426 # The flow is formatted with ofp_match_to_string() for the high-verbosity case.
427 AT_SETUP([OFPT_FLOW_MOD - high verbosity])
428 AT_KEYWORDS([ofp-print])
429 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
430 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
431 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
432 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
433 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
434 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
435 " 3], [0], [dnl
436 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
437 ], [dnl
438 ofp_util|INFO|normalization changed ofp_match, details:
439 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
440 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
441 ])
442 AT_CLEANUP
443
444 AT_SETUP([OFPT_PORT_MOD - OF1.0])
445 AT_KEYWORDS([ofp-print])
446 AT_CHECK([ovs-ofctl ofp-print "\
447 01 0f 00 20 00 00 00 03 00 03 50 54 00 00 00 01 \
448 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
449 " 3], [0], [dnl
450 OFPT_PORT_MOD (xid=0x3):port: 3: addr:50:54:00:00:00:01
451      config: PORT_DOWN
452      mask:   PORT_DOWN
453      advertise: UNCHANGED
454 ])
455 AT_CLEANUP
456
457 AT_SETUP([OFPT_PORT_MOD - OF1.1])
458 AT_KEYWORDS([ofp-print])
459 AT_CHECK([ovs-ofctl ofp-print "\
460 02 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
461 50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
462 00 00 00 00 00 00 00 00 \
463 " 3], [0], [dnl
464 OFPT_PORT_MOD (OF1.1) (xid=0x3):port: 3: addr:50:54:00:00:00:01
465      config: PORT_DOWN
466      mask:   PORT_DOWN
467      advertise: UNCHANGED
468 ])
469 AT_CLEANUP
470
471 AT_SETUP([OFPST_DESC request])
472 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
473 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100000000"], [0], [dnl
474 OFPST_DESC request (xid=0x1):
475 ])
476 AT_CLEANUP
477
478 AT_SETUP([OFPST_DESC reply])
479 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
480 AT_CHECK([ovs-ofctl ofp-print "\
481 01 11 04 2c 00 00 00 01 00 00 00 00 4e 69 63 69 \
482 72 61 20 4e 65 74 77 6f 72 6b 73 2c 20 49 6e 63 \
483 2e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
484 00 00 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 00 00 00 00 00 00 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 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
489 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
490 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
491 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
492 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
493 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
494 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
495 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
496 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
497 00 00 00 00 00 00 00 00 00 00 00 00 4f 70 65 6e \
498 20 76 53 77 69 74 63 68 00 00 00 00 00 00 00 00 \
499 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
501 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
502 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
503 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
504 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
505 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
506 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
507 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
508 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
509 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
510 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
511 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
512 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
513 00 00 00 00 00 00 00 00 00 00 00 00 31 2e 31 2e \
514 30 70 72 65 32 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 00 00 00 00 00 00 00 00 00 00 00 00 \
518 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
519 00 00 00 00 00 00 00 00 00 00 00 00 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 00 00 00 \
524 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
525 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
526 00 00 00 00 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 4e 6f 6e 65 \
530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
531 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
532 00 00 00 00 00 00 00 00 00 00 00 00 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 00 00 00 00 \
537 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
538 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
539 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
540 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
541 00 00 00 00 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 00 00 00 00 00 00 00 00 00 00 00 00 \
546 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
547 00 00 00 00 00 00 00 00 00 00 00 00 \
548 "], [0], [dnl
549 OFPST_DESC reply (xid=0x1):
550 Manufacturer: Nicira Networks, Inc.
551 Hardware: Open vSwitch
552 Software: 1.1.0pre2
553 Serial Num: None
554 DP Description: None
555 ])
556 AT_CLEANUP
557
558 AT_SETUP([OFPST_FLOW request])
559 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
560 AT_CHECK([ovs-ofctl ofp-print "\
561 01 10 00 38 00 00 00 04 00 01 00 00 00 38 20 ff \
562 ff fe 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 ff 00 ff ff \
565 "], [0], [dnl
566 OFPST_FLOW request (xid=0x4): @&t@
567 ])
568 AT_CLEANUP
569
570 AT_SETUP([OFPST_FLOW reply])
571 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
572 AT_CHECK([ovs-ofctl ofp-print "\
573 01 11 01 e4 00 00 00 04 00 01 00 00 00 60 00 00 \
574 00 00 00 00 00 03 50 54 00 00 00 05 50 54 00 00 \
575 00 06 ff ff 00 00 08 06 00 02 00 00 c0 a8 00 01 \
576 c0 a8 00 02 00 00 00 00 00 00 00 04 0b eb c2 00 \
577 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
578 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
579 00 00 00 3c 00 00 00 08 00 01 00 00 00 60 00 00 \
580 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
581 00 05 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 02 \
582 c0 a8 00 01 00 00 00 00 00 00 00 08 35 a4 e9 00 \
583 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
584 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
585 00 00 04 fa 00 00 00 08 00 03 00 00 00 60 00 00 \
586 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
587 00 05 ff ff 00 00 08 06 00 01 00 00 c0 a8 00 02 \
588 c0 a8 00 01 00 00 00 00 00 00 00 04 10 b0 76 00 \
589 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
590 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
591 00 00 00 3c 00 00 00 08 00 03 00 00 00 60 00 00 \
592 00 00 00 01 00 03 50 54 00 00 00 05 50 54 00 00 \
593 00 06 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 01 \
594 c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \
595 80 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
596 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
597 00 00 04 fa 00 00 00 08 00 01 00 00 \
598 00 58 02 00 00 3f ff ff 00 00 00 00 00 00 00 00 \
599 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
601 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 \
602 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
603 00 00 00 00 00 00 00 00 \
604 "], [0], [dnl
605 OFPST_FLOW reply (xid=0x4):
606  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
607  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
608  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
609  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
610  cookie=0x0, duration=0s, table=2, n_packets=0, n_bytes=0, actions=drop
611 ])
612 AT_CLEANUP
613
614 AT_SETUP([OFPST_AGGREGATE request])
615 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
616 AT_CHECK([ovs-ofctl ofp-print "\
617 01 10 00 38 00 00 00 04 00 02 00 00 00 38 20 ff \
618 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
619 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
620 00 00 00 00 ff 00 ff ff \
621 "], [0], [dnl
622 OFPST_AGGREGATE request (xid=0x4): @&t@
623 ])
624 AT_CLEANUP
625
626 AT_SETUP([OFPST_AGGREGATE reply])
627 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
628 AT_CHECK([ovs-ofctl ofp-print "\
629 01 11 00 24 00 00 00 04 00 02 00 00 00 00 00 00 \
630 00 00 01 82 00 00 00 00 00 00 93 78 00 00 00 04 \
631 00 00 00 00 \
632 "], [0], [dnl
633 OFPST_AGGREGATE reply (xid=0x4): packet_count=386 byte_count=37752 flow_count=4
634 ])
635 AT_CLEANUP
636
637 AT_SETUP([OFPST_TABLE request])
638 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
639 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100030000"], [0], [dnl
640 OFPST_TABLE request (xid=0x1):
641 ])
642 AT_CLEANUP
643
644 AT_SETUP([OFPST_TABLE reply])
645 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
646 AT_CHECK([ovs-ofctl ofp-print "\
647 01 11 00 4c 00 00 00 01 00 03 00 00 00 00 00 00 \
648 63 6c 61 73 73 69 66 69 65 72 00 00 00 00 00 00 \
649 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
650 00 3f ff ff 00 10 00 00 00 00 00 0b 00 00 00 00 \
651 00 00 00 00 00 00 00 00 00 00 00 00 \
652 "], [0], [dnl
653 OFPST_TABLE reply (xid=0x1): 1 tables
654   0: classifier: wild=0x3fffff, max=1048576, active=11
655                lookup=0, matched=0
656 ])
657 AT_CLEANUP
658
659 AT_SETUP([OFPST_PORT request])
660 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
661 AT_CHECK([ovs-ofctl ofp-print "\
662 01 10 00 14 00 00 00 01 00 04 00 00 ff ff 00 00 \
663 00 00 00 00 \
664 "], [0], [dnl
665 OFPST_PORT request (xid=0x1): port_no=65535
666 ])
667 AT_CLEANUP
668
669 AT_SETUP([OFPST_PORT reply])
670 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
671 AT_CHECK([ovs-ofctl ofp-print "\
672 01 11 01 ac 00 00 00 01 00 04 00 00 00 03 00 00 \
673 00 00 00 00 00 00 00 00 00 00 4d 20 00 00 00 00 \
674 00 00 14 32 00 00 00 00 00 0f 60 4e 00 00 00 00 \
675 00 05 71 bc 00 00 00 00 00 00 00 00 00 00 00 00 \
676 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
677 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
678 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
679 00 00 00 00 ff fe 00 00 00 00 00 00 00 00 00 00 \
680 00 00 02 ac 00 00 00 00 00 00 01 f5 00 00 00 00 \
681 00 01 0c 8c 00 00 00 00 00 00 db 1c 00 00 00 00 \
682 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
683 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
684 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
685 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
686 00 00 00 00 00 00 00 00 00 00 06 be 00 00 00 00 \
687 00 00 05 84 00 00 00 00 00 02 34 b4 00 00 00 00 \
688 00 02 23 d4 00 00 00 00 00 00 00 00 00 00 00 00 \
689 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
690 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
691 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
692 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 \
693 00 00 14 12 00 00 00 00 00 00 14 66 00 00 00 00 \
694 00 04 a2 54 00 00 00 00 00 05 8a 1e 00 00 00 00 \
695 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
696 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
697 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
698 00 00 00 00 00 00 00 00 00 00 00 00 \
699 "], [0], [dnl
700 OFPST_PORT reply (xid=0x1): 4 ports
701   port  3: rx pkts=19744, bytes=1007694, drop=0, errs=0, frame=0, over=0, crc=0
702            tx pkts=5170, bytes=356796, drop=0, errs=0, coll=0
703   port 65534: rx pkts=684, bytes=68748, drop=0, errs=0, frame=0, over=0, crc=0
704            tx pkts=501, bytes=56092, drop=0, errs=0, coll=0
705   port  2: rx pkts=1726, bytes=144564, drop=0, errs=0, frame=0, over=0, crc=0
706            tx pkts=1412, bytes=140244, drop=0, errs=0, coll=0
707   port  1: rx pkts=5138, bytes=303700, drop=0, errs=0, frame=0, over=0, crc=0
708            tx pkts=5222, bytes=363038, drop=0, errs=0, coll=0
709 ])
710 AT_CLEANUP
711
712 AT_SETUP([OFPST_QUEUE request])
713 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
714 AT_CHECK([ovs-ofctl ofp-print "\
715 01 10 00 14 00 00 00 01 00 05 00 00 ff fc 00 00 \
716 ff ff ff ff \
717 "], [0], [dnl
718 OFPST_QUEUE request (xid=0x1):port=ALL queue=ALL
719 ])
720 AT_CLEANUP
721
722 AT_SETUP([OFPST_QUEUE reply])
723 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
724 AT_CHECK([ovs-ofctl ofp-print "\
725 01 11 00 cc 00 00 00 01 00 05 00 00 00 03 00 00 \
726 00 00 00 01 00 00 00 00 00 00 01 2e 00 00 00 00 \
727 00 00 00 01 00 00 00 00 00 00 00 00 00 03 00 00 \
728 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
729 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
730 00 00 00 01 00 00 00 00 00 00 08 34 00 00 00 00 \
731 00 00 00 14 00 00 00 00 00 00 00 00 00 02 00 00 \
732 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
733 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
734 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 \
735 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
736 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
737 00 00 00 00 00 00 00 00 00 00 00 00 \
738 "], [0], [dnl
739 OFPST_QUEUE reply (xid=0x1): 6 queues
740   port 3 queue 1: bytes=302, pkts=1, errors=0
741   port 3 queue 2: bytes=0, pkts=0, errors=0
742   port 2 queue 1: bytes=2100, pkts=20, errors=0
743   port 2 queue 2: bytes=0, pkts=0, errors=0
744   port 1 queue 1: bytes=0, pkts=0, errors=0
745   port 1 queue 2: bytes=0, pkts=0, errors=0
746 ])
747 AT_CLEANUP
748
749 AT_SETUP([OFPT_BARRIER_REQUEST])
750 AT_KEYWORDS([ofp-print])
751 AT_CHECK([ovs-ofctl ofp-print '01 12 00 08 00 00 00 01'], [0], [dnl
752 OFPT_BARRIER_REQUEST (xid=0x1):
753 ])
754 AT_CLEANUP
755
756 AT_SETUP([OFPT_BARRIER_REPLY])
757 AT_KEYWORDS([ofp-print])
758 AT_CHECK([ovs-ofctl ofp-print '01 13 00 08 00 00 00 01'], [0], [dnl
759 OFPT_BARRIER_REPLY (xid=0x1):
760 ])
761 AT_CLEANUP
762
763 AT_SETUP([NXT_ROLE_REQUEST])
764 AT_KEYWORDS([ofp-print])
765 AT_CHECK([ovs-ofctl ofp-print "\
766 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0a \
767 00 00 00 01 \
768 "], [0], [dnl
769 NXT_ROLE_REQUEST (xid=0x2): role=master
770 ])
771 AT_CLEANUP
772
773 AT_SETUP([NXT_ROLE_REPLY])
774 AT_KEYWORDS([ofp-print])
775 AT_CHECK([ovs-ofctl ofp-print "\
776 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0b \
777 00 00 00 02 \
778 "], [0], [dnl
779 NXT_ROLE_REPLY (xid=0x2): role=slave
780 ])
781 AT_CLEANUP
782
783 AT_SETUP([NXT_SET_PACKET_IN])
784 AT_KEYWORDS([ofp-print])
785 AT_CHECK([ovs-ofctl ofp-print "\
786 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 10 \
787 00 00 00 01 \
788 "], [0], [dnl
789 NXT_SET_PACKET_IN_FORMAT (xid=0x2): format=nxm
790 ])
791 AT_CLEANUP
792
793 AT_SETUP([NXT_PACKET_IN])
794 AT_KEYWORDS([ofp-print])
795 AT_CHECK([ovs-ofctl ofp-print "\
796 01 04 00 aa 00 00 00 00 00 00 23 20 00 00 00 11 \
797 ff ff ff ff 00 40 01 07 00 00 00 00 00 00 00 09 \
798 00 3a 00 00 00 00 00 00 00 00 00 02 00 01 00 01 \
799 20 08 00 00 00 00 00 00 00 06 00 01 00 04 00 00 \
800 00 01 00 01 02 04 00 00 00 02 00 01 04 04 00 00 \
801 00 03 00 01 06 04 00 00 00 04 00 01 08 04 00 00 \
802 00 05 00 00 00 00 00 00 00 00 82 82 82 82 82 82 \
803 80 81 81 81 81 81 81 00 00 50 08 00 45 00 00 28 \
804 00 00 00 00 00 06 32 05 53 53 53 53 54 54 54 54 \
805 00 55 00 56 00 00 00 00 00 00 00 00 50 00 00 00 \
806 31 6d 00 00 00 00 00 00 00 00 \
807 "], [0], [dnl
808 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
809 priority:0,tunnel:0,in_port:0000,tci(vlan:80,pcp:0) mac(80:81:81:81:81:81->82:82:82:82:82:82) type:0800 proto:6 tos:0 ttl:0 ip(83.83.83.83->84.84.84.84) port(85->86) tcp_csum:316d
810 ])
811 AT_CLEANUP
812
813 AT_SETUP([NXT_SET_ASYNC_CONFIG])
814 AT_KEYWORDS([ofp-print])
815 AT_CHECK([ovs-ofctl ofp-print "\
816 01 04 00 28 00 00 00 00 00 00 23 20 00 00 00 13 \
817 00 00 10 05 00 00 10 07 00 00 00 03 00 00 00 07 \
818 00 00 00 00 00 00 00 03 \
819 "], [0], [dnl
820 NXT_SET_ASYNC_CONFIG (xid=0x0):
821  master:
822        PACKET_IN: no_match invalid_ttl 12
823      PORT_STATUS: add delete
824     FLOW_REMOVED: (off)
825
826  slave:
827        PACKET_IN: no_match action invalid_ttl 12
828      PORT_STATUS: add delete modify
829     FLOW_REMOVED: idle hard
830 ])
831 AT_CLEANUP
832
833 AT_SETUP([NXT_SET_CONTROLLER_ID])
834 AT_KEYWORDS([ofp-print])
835 AT_CHECK([ovs-ofctl ofp-print "\
836 01 04 00 18 00 00 00 03 00 00 23 20 00 00 00 14 \
837 00 00 00 00 00 00 00 7b \
838 "], [0], [dnl
839 NXT_SET_CONTROLLER_ID (xid=0x3): id=123
840 ])
841 AT_CLEANUP
842
843 AT_SETUP([NXT_SET_FLOW_FORMAT])
844 AT_KEYWORDS([ofp-print])
845 AT_CHECK([ovs-ofctl ofp-print "\
846 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0c \
847 00 00 00 02 \
848 "], [0], [dnl
849 NXT_SET_FLOW_FORMAT (xid=0x2): format=nxm
850 ])
851 AT_CLEANUP
852
853 # The flow is formatted with cls_rule_format() for the low-verbosity case.
854 AT_SETUP([NXT_FLOW_MOD, low verbosity])
855 AT_KEYWORDS([ofp-print])
856 AT_CHECK([ovs-ofctl ofp-print "\
857 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
858 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
859 ff ff ff ff ff ff 00 00 00 14 00 00 00 00 00 00 \
860 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
861 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
862 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
863 " 2], [0], [dnl
864 NXT_FLOW_MOD (xid=0x2): ADD reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[[]]
865 ])
866 AT_CLEANUP
867
868 # The flow is formatted with ofp_match_to_string() for the low-verbosity case.
869 AT_SETUP([NXT_FLOW_MOD, high verbosity])
870 AT_KEYWORDS([ofp-print])
871 AT_CHECK([ovs-ofctl ofp-print "\
872 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
873 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
874 ff ff ff ff ff ff 00 00 00 14 00 00 00 00 00 00 \
875 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
876 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
877 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
878 " 3], [0], [dnl
879 NXT_FLOW_MOD (xid=0x2): ADD NXM_NX_TUN_ID(00000000000001c8), NXM_NX_REG0(0000007b) actions=load:0x5->NXM_NX_REG0[[]]
880 ])
881 AT_CLEANUP
882
883 AT_SETUP([NXT_FLOW_REMOVED])
884 AT_KEYWORDS([ofp-print])
885 AT_CHECK([ovs-ofctl ofp-print "\
886 01 04 00 78 00 00 00 00 00 00 23 20 00 00 00 0e \
887 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 06 \
888 01 6e 36 00 00 05 00 3c 00 00 00 00 00 00 00 01 \
889 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
890 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
891 00 05 00 00 06 02 08 06 00 00 08 02 00 00 00 00 \
892 1e 02 00 02 00 00 20 04 c0 a8 00 01 00 00 22 04 \
893 c0 a8 00 02 00 00 00 00 \
894 "], [0], [dnl
895 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
896 ])
897 AT_CLEANUP
898
899 AT_SETUP([NXT_FLOW_MOD_TABLE_ID])
900 AT_KEYWORDS([ofp-print])
901 AT_CHECK([ovs-ofctl ofp-print "\
902 01 04 00 18 01 02 03 04 00 00 23 20 00 00 00 0f \
903 01 00 00 00 00 00 00 00 \
904 "], [0], [dnl
905 NXT_FLOW_MOD_TABLE_ID (xid=0x1020304): enable
906 ])
907 AT_CLEANUP
908
909 AT_SETUP([NXST_FLOW request])
910 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
911 AT_CHECK([ovs-ofctl ofp-print "\
912 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
913 00 00 00 00 00 00 00 00 ff ff 00 00 ff 00 00 00 \
914 "], [0], [dnl
915 NXST_FLOW request (xid=0x4): @&t@
916 ])
917 AT_CLEANUP
918
919 AT_SETUP([NXST_FLOW reply])
920 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
921 AT_CHECK([ovs-ofctl ofp-print "\
922 01 11 08 18 00 00 00 04 ff ff 00 00 00 00 23 20 \
923 00 00 00 00 00 00 00 00 00 88 00 00 00 00 00 01 \
924 02 dc 6c 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
925 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
926 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
927 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
928 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
929 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
930 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e7 00 00 \
931 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
932 00 88 00 00 00 00 00 03 32 11 62 00 ff ff 00 05 \
933 00 00 00 4c 00 03 00 00 00 00 00 00 00 00 00 00 \
934 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
935 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
936 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
937 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
938 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
939 00 00 12 02 09 e4 00 00 14 02 00 00 00 00 00 00 \
940 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
941 33 f9 aa 00 ff ff 00 05 00 00 00 4c 00 05 00 00 \
942 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
943 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
944 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
945 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
946 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
947 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
948 14 02 09 e5 00 00 00 00 00 00 00 08 00 03 00 00 \
949 00 88 00 00 00 00 00 04 2d 0f a5 00 ff ff 00 05 \
950 00 00 00 4c 00 01 00 00 00 00 00 00 00 00 00 00 \
951 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
952 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
953 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
954 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
955 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
956 00 00 12 02 09 e3 00 00 14 02 00 00 00 00 00 00 \
957 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
958 34 73 bc 00 ff ff 00 05 00 0a 00 4c 00 03 00 03 \
959 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
960 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
961 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
962 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
963 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
964 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e5 00 00 \
965 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
966 00 88 00 00 00 00 00 05 28 0d e8 00 ff ff 00 05 \
967 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
968 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
969 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
970 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
971 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
972 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
973 00 00 12 02 09 e2 00 00 14 02 00 00 00 00 00 00 \
974 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 01 \
975 02 62 5a 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
976 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
977 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
978 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
979 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
980 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
981 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
982 14 02 09 e7 00 00 00 00 00 00 00 08 00 03 00 00 \
983 00 88 00 00 00 00 00 01 38 be 5e 00 ff ff 00 05 \
984 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
985 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
986 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
987 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
988 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
989 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
990 00 00 12 02 00 00 00 00 14 02 09 e6 00 00 00 00 \
991 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 04 \
992 27 d0 df 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
993 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
994 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
995 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
996 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
997 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
998 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
999 14 02 09 e3 00 00 00 00 00 00 00 08 00 03 00 00 \
1000 00 88 00 00 00 00 00 03 2c d2 9c 00 ff ff 00 05 \
1001 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
1002 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
1003 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
1004 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
1005 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
1006 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
1007 00 00 12 02 00 00 00 00 14 02 09 e4 00 00 00 00 \
1008 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
1009 0a 40 83 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
1010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
1011 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
1012 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
1013 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
1014 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
1015 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e8 00 00 \
1016 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
1017 00 88 00 00 00 00 00 05 25 31 7c 00 ff ff 00 05 \
1018 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
1019 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
1020 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
1021 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
1022 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
1023 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
1024 00 00 12 02 00 00 00 00 14 02 09 e2 00 00 00 00 \
1025 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
1026 04 c4 b4 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
1027 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
1028 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
1029 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
1030 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
1031 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
1032 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
1033 14 02 09 e8 00 00 00 00 00 00 00 08 00 03 00 00 \
1034 00 88 00 00 00 00 00 01 39 38 70 00 ff ff 00 05 \
1035 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
1036 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
1037 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
1038 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
1039 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
1040 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
1041 00 00 12 02 09 e6 00 00 14 02 00 00 00 00 00 00 \
1042 00 00 00 08 00 01 00 00 00 60 00 00 00 00 00 e4 \
1043 2e 7d db 00 80 00 00 00 00 00 00 14 00 00 00 00 \
1044 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1045 00 00 00 00 00 00 00 00 00 01 20 08 00 00 00 00 \
1046 00 00 01 c8 00 01 00 04 00 00 00 7b 00 00 00 00 \
1047 ff ff 00 18 00 00 23 20 00 07 00 1f 00 01 00 04 \
1048 00 00 00 00 00 00 00 05 \
1049 00 30 01 00 00 00 0e 10 00 07 a1 20 80 00 00 00 \
1050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1051 00 00 00 00 00 00 00 64 00 00 00 00 00 00 19 00 \
1052 "], [0],
1053 [[NXST_FLOW reply (xid=0x4):
1054  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
1055  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
1056  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
1057  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
1058  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
1059  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
1060  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
1061  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
1062  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
1063  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
1064  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
1065  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
1066  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
1067  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
1068  cookie=0x0, duration=228.78s, table=0, n_packets=0, n_bytes=0, reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[]
1069  cookie=0x0, duration=3600.0005s, table=1, n_packets=100, n_bytes=6400, actions=drop
1070 ]])
1071 AT_CLEANUP
1072
1073 AT_SETUP([NXST_AGGREGATE request])
1074 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1075 AT_CHECK([ovs-ofctl ofp-print "\
1076 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
1077 00 00 00 01 00 00 00 00 ff ff 00 00 ff 00 00 00 \
1078 "], [0], [dnl
1079 NXST_AGGREGATE request (xid=0x4): @&t@
1080 ])
1081 AT_CLEANUP
1082
1083 AT_SETUP([NXST_AGGREGATE reply])
1084 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1085 AT_CHECK([ovs-ofctl ofp-print "\
1086 01 11 00 30 00 00 00 04 ff ff 00 00 00 00 23 20 \
1087 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 07 \
1088 00 00 00 00 00 00 01 a4 00 00 00 07 00 00 00 00 \
1089 "], [0], [dnl
1090 NXST_AGGREGATE reply (xid=0x4): packet_count=7 byte_count=420 flow_count=7
1091 ])
1092 AT_CLEANUP