ofproto: Implement OpenFlow extension to allow control over async messages.
[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 (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 (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 (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])
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): ver:0x1, dpid:0000505400000001
176 n_tables:2, n_buffers:256
177 features: capabilities:0x87, actions:0xfff
178  1(eth1): addr:50:54:00:00:00:02
179      config:     0
180      state:      0
181      current:    100MB-FD AUTO_NEG
182      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
183      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
184  2(eth2): addr:50:54:00:00:00:03
185      config:     0
186      state:      0
187      current:    100MB-FD AUTO_NEG
188      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
189      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
190  3(eth0): addr:50:54:00:00:00:01
191      config:     0
192      state:      0
193      current:    100MB-FD AUTO_NEG
194      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
195      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
196  LOCAL(br0): addr:50:54:00:00:00:01
197      config:     PORT_DOWN
198      state:      LINK_DOWN
199 ])
200 AT_CLEANUP
201
202 AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port])
203 AT_KEYWORDS([ofp-print])
204 AT_CHECK([ovs-ofctl ofp-print "\
205 01 06 00 dc 00 00 00 01 00 00 50 54 00 00 00 01 \
206 00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
207 ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
208 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
209 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
210 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
211 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
212 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
213 00 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
214 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
215 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
216 00 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
217 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
218 00 00 02 08 00 00 02 8f 00 00 02 8f \
219 "], [0], [dnl
220 ***decode error: OFPBRC_BAD_LEN***
221 00000000  01 06 00 dc 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
222 00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 0f ff |................|
223 00000020  ff fe 50 54 00 00 00 01-62 72 30 00 00 00 00 00 |..PT....br0.....|
224 00000030  00 00 00 00 00 00 00 00-00 00 00 01 00 00 00 01 |................|
225 00000040  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
226 00000050  00 03 50 54 00 00 00 01-65 74 68 30 00 00 00 00 |..PT....eth0....|
227 00000060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
228 00000070  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
229 00000080  00 02 50 54 00 00 00 03-65 74 68 32 00 00 00 00 |..PT....eth2....|
230 00000090  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
231 000000a0  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
232 000000b0  00 01 50 54 00 00 00 02-65 74 68 31 00 00 00 00 |..PT....eth1....|
233 000000c0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
234 000000d0  00 00 02 08 00 00 02 8f-00 00 02 8f             |............    |
235 ], [stderr])
236 AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
237 received OFPT_FEATURES_REPLY with incorrect length 220 (must be exactly 32 bytes or longer by an integer multiple of 48 bytes)
238 ])
239 AT_CLEANUP
240
241 AT_SETUP([OFPT_GET_CONFIG_REQUEST])
242 AT_KEYWORDS([ofp-print])
243 AT_CHECK([ovs-ofctl ofp-print '0107000800000001'], [0], [dnl
244 OFPT_GET_CONFIG_REQUEST (xid=0x1):
245 ])
246 AT_CLEANUP
247
248 AT_SETUP([OFPT_GET_CONFIG_REPLY, most common form])
249 AT_KEYWORDS([ofp-print])
250 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 00 00 00'], [0], [dnl
251 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
252 ])
253 AT_CLEANUP
254
255
256 AT_SETUP([OFPT_GET_CONFIG_REPLY, frags and miss_send_len])
257 AT_KEYWORDS([ofp-print])
258 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 02 00 ff'], [0], [dnl
259 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=reassemble miss_send_len=255
260 ])
261 AT_CLEANUP
262
263 AT_SETUP([OFPT_PACKET_IN])
264 AT_KEYWORDS([ofp-print])
265 AT_CHECK([ovs-ofctl ofp-print "\
266 01 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
267 00 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
268 45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
269 c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
270 50 00 02 00 26 e8 00 00 00 00 00 00 00 00 \
271 "], [0], [dnl
272 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
273 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
274 ])
275 AT_CLEANUP
276
277 AT_SETUP([OFPT_FLOW_REMOVED])
278 AT_KEYWORDS([ofp-print])
279 AT_CHECK([ovs-ofctl ofp-print "\
280 01 0b 00 58 00 00 00 00 00 00 00 00 00 03 50 54 \
281 00 00 00 05 50 54 00 00 00 06 ff ff 00 00 08 06 \
282 00 02 00 00 c0 a8 00 01 c0 a8 00 02 00 00 00 00 \
283 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 05 \
284 30 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \
285 00 00 00 00 00 00 00 3c \
286 "], [0], [dnl
287 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
288 ])
289 AT_CLEANUP
290
291 AT_SETUP([OFPT_PORT_STATUS])
292 AT_KEYWORDS([ofp-print])
293 AT_CHECK([ovs-ofctl ofp-print "\
294 01 0c 00 40 00 00 00 00 02 00 00 00 00 00 00 00 \
295 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
296 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
297 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
298 "], [0], [dnl
299 OFPT_PORT_STATUS (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
300      config:     PORT_DOWN
301      state:      LINK_DOWN
302      current:    100MB-FD AUTO_NEG
303      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
304      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
305 ])
306 AT_CLEANUP
307
308 AT_SETUP([OFPT_PACKET_OUT])
309 AT_KEYWORDS([ofp-print])
310 AT_CHECK([ovs-ofctl ofp-print "\
311 01 0d 00 54 00 00 00 00 00 00 01 14 00 01 00 08 \
312 00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
313 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
314 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
315 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
316 00 00 00 00 \
317 "], [0], [dnl
318 OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 buffer=0x00000114
319 ])
320 AT_CLEANUP
321
322 # The flow is formatted with cls_rule_format() for the low-verbosity case.
323 AT_SETUP([OFPT_FLOW_MOD - low verbosity])
324 AT_KEYWORDS([ofp-print])
325 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
326 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
327 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
328 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
329 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
330 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
331 " 2], [0], [dnl
332 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
333 ], [dnl
334 ofp_util|INFO|normalization changed ofp_match, details:
335 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
336 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
337 ])
338 AT_CLEANUP
339
340 # The flow is formatted with ofp_match_to_string() for the high-verbosity case.
341 AT_SETUP([OFPT_FLOW_MOD - high verbosity])
342 AT_KEYWORDS([ofp-print])
343 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
344 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
345 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
346 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
347 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
348 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
349 " 3], [0], [dnl
350 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
351 ], [dnl
352 ofp_util|INFO|normalization changed ofp_match, details:
353 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
354 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
355 ])
356 AT_CLEANUP
357
358 AT_SETUP([OFPT_PORT_MOD])
359 AT_KEYWORDS([ofp-print])
360 AT_CHECK([ovs-ofctl ofp-print "\
361 01 0f 00 20 00 00 00 03 00 03 50 54 00 00 00 01 \
362 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
363 " 3], [0], [dnl
364 OFPT_PORT_MOD (xid=0x3):port: 3: addr:50:54:00:00:00:01, config: 0x1, mask:0x1
365      advertise: UNCHANGED
366 ])
367 AT_CLEANUP
368
369 AT_SETUP([OFPST_DESC request])
370 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
371 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100000000"], [0], [dnl
372 OFPST_DESC request (xid=0x1):
373 ])
374 AT_CLEANUP
375
376 AT_SETUP([OFPST_DESC reply])
377 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
378 AT_CHECK([ovs-ofctl ofp-print "\
379 01 11 04 2c 00 00 00 01 00 00 00 00 4e 69 63 69 \
380 72 61 20 4e 65 74 77 6f 72 6b 73 2c 20 49 6e 63 \
381 2e 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 4f 70 65 6e \
396 20 76 53 77 69 74 63 68 00 00 00 00 00 00 00 00 \
397 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
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 31 2e 31 2e \
412 30 70 72 65 32 00 00 00 00 00 00 00 00 00 00 00 \
413 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
414 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
415 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
416 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
417 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
418 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
419 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
420 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
421 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
422 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
423 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
424 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
425 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
426 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
427 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
428 00 00 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 4e 6f 6e 65 \
430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
431 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
432 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
433 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
434 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
435 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
436 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
437 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
438 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
439 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
441 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
442 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
443 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
444 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
445 00 00 00 00 00 00 00 00 00 00 00 00 \
446 "], [0], [dnl
447 OFPST_DESC reply (xid=0x1):
448 Manufacturer: Nicira Networks, Inc.
449 Hardware: Open vSwitch
450 Software: 1.1.0pre2
451 Serial Num: None
452 DP Description: None
453 ])
454 AT_CLEANUP
455
456 AT_SETUP([OFPST_FLOW request])
457 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
458 AT_CHECK([ovs-ofctl ofp-print "\
459 01 10 00 38 00 00 00 04 00 01 00 00 00 38 20 ff \
460 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
461 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
462 00 00 00 00 ff 00 ff ff \
463 "], [0], [dnl
464 OFPST_FLOW request (xid=0x4): @&t@
465 ])
466 AT_CLEANUP
467
468 AT_SETUP([OFPST_FLOW reply])
469 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
470 AT_CHECK([ovs-ofctl ofp-print "\
471 01 11 01 e4 00 00 00 04 00 01 00 00 00 60 00 00 \
472 00 00 00 00 00 03 50 54 00 00 00 05 50 54 00 00 \
473 00 06 ff ff 00 00 08 06 00 02 00 00 c0 a8 00 01 \
474 c0 a8 00 02 00 00 00 00 00 00 00 04 0b eb c2 00 \
475 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
476 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
477 00 00 00 3c 00 00 00 08 00 01 00 00 00 60 00 00 \
478 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
479 00 05 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 02 \
480 c0 a8 00 01 00 00 00 00 00 00 00 08 35 a4 e9 00 \
481 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
482 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
483 00 00 04 fa 00 00 00 08 00 03 00 00 00 60 00 00 \
484 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
485 00 05 ff ff 00 00 08 06 00 01 00 00 c0 a8 00 02 \
486 c0 a8 00 01 00 00 00 00 00 00 00 04 10 b0 76 00 \
487 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
488 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
489 00 00 00 3c 00 00 00 08 00 03 00 00 00 60 00 00 \
490 00 00 00 01 00 03 50 54 00 00 00 05 50 54 00 00 \
491 00 06 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 01 \
492 c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \
493 80 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
494 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
495 00 00 04 fa 00 00 00 08 00 01 00 00 \
496 00 58 02 00 00 3f ff ff 00 00 00 00 00 00 00 00 \
497 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
498 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
499 00 00 00 00 80 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 \
502 "], [0], [dnl
503 OFPST_FLOW reply (xid=0x4):
504  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
505  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
506  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
507  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
508  cookie=0x0, duration=0s, table=2, n_packets=0, n_bytes=0, actions=drop
509 ])
510 AT_CLEANUP
511
512 AT_SETUP([OFPST_AGGREGATE request])
513 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
514 AT_CHECK([ovs-ofctl ofp-print "\
515 01 10 00 38 00 00 00 04 00 02 00 00 00 38 20 ff \
516 ff fe 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 ff 00 ff ff \
519 "], [0], [dnl
520 OFPST_AGGREGATE request (xid=0x4): @&t@
521 ])
522 AT_CLEANUP
523
524 AT_SETUP([OFPST_AGGREGATE reply])
525 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
526 AT_CHECK([ovs-ofctl ofp-print "\
527 01 11 00 24 00 00 00 04 00 02 00 00 00 00 00 00 \
528 00 00 01 82 00 00 00 00 00 00 93 78 00 00 00 04 \
529 00 00 00 00 \
530 "], [0], [dnl
531 OFPST_AGGREGATE reply (xid=0x4): packet_count=386 byte_count=37752 flow_count=4
532 ])
533 AT_CLEANUP
534
535 AT_SETUP([OFPST_TABLE request])
536 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
537 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100030000"], [0], [dnl
538 OFPST_TABLE request (xid=0x1):
539 ])
540 AT_CLEANUP
541
542 AT_SETUP([OFPST_TABLE reply])
543 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
544 AT_CHECK([ovs-ofctl ofp-print "\
545 01 11 00 4c 00 00 00 01 00 03 00 00 00 00 00 00 \
546 63 6c 61 73 73 69 66 69 65 72 00 00 00 00 00 00 \
547 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
548 00 3f ff ff 00 10 00 00 00 00 00 0b 00 00 00 00 \
549 00 00 00 00 00 00 00 00 00 00 00 00 \
550 "], [0], [dnl
551 OFPST_TABLE reply (xid=0x1): 1 tables
552   0: classifier: wild=0x3fffff, max=1048576, active=11
553                lookup=0, matched=0
554 ])
555 AT_CLEANUP
556
557 AT_SETUP([OFPST_PORT request])
558 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
559 AT_CHECK([ovs-ofctl ofp-print "\
560 01 10 00 14 00 00 00 01 00 04 00 00 ff ff 00 00 \
561 00 00 00 00 \
562 "], [0], [dnl
563 OFPST_PORT request (xid=0x1): port_no=65535
564 ])
565 AT_CLEANUP
566
567 AT_SETUP([OFPST_PORT reply])
568 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
569 AT_CHECK([ovs-ofctl ofp-print "\
570 01 11 01 ac 00 00 00 01 00 04 00 00 00 03 00 00 \
571 00 00 00 00 00 00 00 00 00 00 4d 20 00 00 00 00 \
572 00 00 14 32 00 00 00 00 00 0f 60 4e 00 00 00 00 \
573 00 05 71 bc 00 00 00 00 00 00 00 00 00 00 00 00 \
574 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
575 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
576 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
577 00 00 00 00 ff fe 00 00 00 00 00 00 00 00 00 00 \
578 00 00 02 ac 00 00 00 00 00 00 01 f5 00 00 00 00 \
579 00 01 0c 8c 00 00 00 00 00 00 db 1c 00 00 00 00 \
580 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
581 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
582 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
583 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
584 00 00 00 00 00 00 00 00 00 00 06 be 00 00 00 00 \
585 00 00 05 84 00 00 00 00 00 02 34 b4 00 00 00 00 \
586 00 02 23 d4 00 00 00 00 00 00 00 00 00 00 00 00 \
587 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
588 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
589 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
590 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 \
591 00 00 14 12 00 00 00 00 00 00 14 66 00 00 00 00 \
592 00 04 a2 54 00 00 00 00 00 05 8a 1e 00 00 00 00 \
593 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
594 00 00 00 00 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 00 00 00 \
596 00 00 00 00 00 00 00 00 00 00 00 00 \
597 "], [0], [dnl
598 OFPST_PORT reply (xid=0x1): 4 ports
599   port  3: rx pkts=19744, bytes=1007694, drop=0, errs=0, frame=0, over=0, crc=0
600            tx pkts=5170, bytes=356796, drop=0, errs=0, coll=0
601   port 65534: rx pkts=684, bytes=68748, drop=0, errs=0, frame=0, over=0, crc=0
602            tx pkts=501, bytes=56092, drop=0, errs=0, coll=0
603   port  2: rx pkts=1726, bytes=144564, drop=0, errs=0, frame=0, over=0, crc=0
604            tx pkts=1412, bytes=140244, drop=0, errs=0, coll=0
605   port  1: rx pkts=5138, bytes=303700, drop=0, errs=0, frame=0, over=0, crc=0
606            tx pkts=5222, bytes=363038, drop=0, errs=0, coll=0
607 ])
608 AT_CLEANUP
609
610 AT_SETUP([OFPST_QUEUE request])
611 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
612 AT_CHECK([ovs-ofctl ofp-print "\
613 01 10 00 14 00 00 00 01 00 05 00 00 ff fc 00 00 \
614 ff ff ff ff \
615 "], [0], [dnl
616 OFPST_QUEUE request (xid=0x1):port=ALL queue=ALL
617 ])
618 AT_CLEANUP
619
620 AT_SETUP([OFPST_QUEUE reply])
621 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
622 AT_CHECK([ovs-ofctl ofp-print "\
623 01 11 00 cc 00 00 00 01 00 05 00 00 00 03 00 00 \
624 00 00 00 01 00 00 00 00 00 00 01 2e 00 00 00 00 \
625 00 00 00 01 00 00 00 00 00 00 00 00 00 03 00 00 \
626 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
627 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
628 00 00 00 01 00 00 00 00 00 00 08 34 00 00 00 00 \
629 00 00 00 14 00 00 00 00 00 00 00 00 00 02 00 00 \
630 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
631 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
632 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 \
633 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
634 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
635 00 00 00 00 00 00 00 00 00 00 00 00 \
636 "], [0], [dnl
637 OFPST_QUEUE reply (xid=0x1): 6 queues
638   port 3 queue 1: bytes=302, pkts=1, errors=0
639   port 3 queue 2: bytes=0, pkts=0, errors=0
640   port 2 queue 1: bytes=2100, pkts=20, errors=0
641   port 2 queue 2: bytes=0, pkts=0, errors=0
642   port 1 queue 1: bytes=0, pkts=0, errors=0
643   port 1 queue 2: bytes=0, pkts=0, errors=0
644 ])
645 AT_CLEANUP
646
647 AT_SETUP([OFPT_BARRIER_REQUEST])
648 AT_KEYWORDS([ofp-print])
649 AT_CHECK([ovs-ofctl ofp-print '01 12 00 08 00 00 00 01'], [0], [dnl
650 OFPT_BARRIER_REQUEST (xid=0x1):
651 ])
652 AT_CLEANUP
653
654 AT_SETUP([OFPT_BARRIER_REPLY])
655 AT_KEYWORDS([ofp-print])
656 AT_CHECK([ovs-ofctl ofp-print '01 13 00 08 00 00 00 01'], [0], [dnl
657 OFPT_BARRIER_REPLY (xid=0x1):
658 ])
659 AT_CLEANUP
660
661 AT_SETUP([NXT_ROLE_REQUEST])
662 AT_KEYWORDS([ofp-print])
663 AT_CHECK([ovs-ofctl ofp-print "\
664 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0a \
665 00 00 00 01 \
666 "], [0], [dnl
667 NXT_ROLE_REQUEST (xid=0x2): role=master
668 ])
669 AT_CLEANUP
670
671 AT_SETUP([NXT_ROLE_REPLY])
672 AT_KEYWORDS([ofp-print])
673 AT_CHECK([ovs-ofctl ofp-print "\
674 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0b \
675 00 00 00 02 \
676 "], [0], [dnl
677 NXT_ROLE_REPLY (xid=0x2): role=slave
678 ])
679 AT_CLEANUP
680
681 AT_SETUP([NXT_SET_PACKET_IN])
682 AT_KEYWORDS([ofp-print])
683 AT_CHECK([ovs-ofctl ofp-print "\
684 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 10 \
685 00 00 00 01 \
686 "], [0], [dnl
687 NXT_SET_PACKET_IN_FORMAT (xid=0x2): format=nxm
688 ])
689 AT_CLEANUP
690
691 AT_SETUP([NXT_PACKET_IN])
692 AT_KEYWORDS([ofp-print])
693 AT_CHECK([ovs-ofctl ofp-print "\
694 01 04 00 aa 00 00 00 00 00 00 23 20 00 00 00 11 \
695 ff ff ff ff 00 40 01 07 00 00 00 00 00 00 00 09 \
696 00 3a 00 00 00 00 00 00 00 00 00 02 00 01 00 01 \
697 20 08 00 00 00 00 00 00 00 06 00 01 00 04 00 00 \
698 00 01 00 01 02 04 00 00 00 02 00 01 04 04 00 00 \
699 00 03 00 01 06 04 00 00 00 04 00 01 08 04 00 00 \
700 00 05 00 00 00 00 00 00 00 00 82 82 82 82 82 82 \
701 80 81 81 81 81 81 81 00 00 50 08 00 45 00 00 28 \
702 00 00 00 00 00 06 32 05 53 53 53 53 54 54 54 54 \
703 00 55 00 56 00 00 00 00 00 00 00 00 50 00 00 00 \
704 31 6d 00 00 00 00 00 00 00 00 \
705 "], [0], [dnl
706 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)
707 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
708 ])
709 AT_CLEANUP
710
711 AT_SETUP([NXT_SET_ASYNC_CONFIG])
712 AT_KEYWORDS([ofp-print])
713 AT_CHECK([ovs-ofctl ofp-print "\
714 01 04 00 28 00 00 00 00 00 00 23 20 00 00 00 13 \
715 00 00 10 05 00 00 10 07 00 00 00 03 00 00 00 07 \
716 00 00 00 00 00 00 00 03 \
717 "], [0], [dnl
718 NXT_SET_ASYNC_CONFIG (xid=0x0):
719  master:
720        PACKET_IN: no_match invalid_ttl 12
721      PORT_STATUS: add delete
722     FLOW_REMOVED: (off)
723
724  slave:
725        PACKET_IN: no_match action invalid_ttl 12
726      PORT_STATUS: add delete modify
727     FLOW_REMOVED: idle hard
728 ])
729 AT_CLEANUP
730
731 AT_SETUP([NXT_SET_FLOW_FORMAT])
732 AT_KEYWORDS([ofp-print])
733 AT_CHECK([ovs-ofctl ofp-print "\
734 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0c \
735 00 00 00 02 \
736 "], [0], [dnl
737 NXT_SET_FLOW_FORMAT (xid=0x2): format=nxm
738 ])
739 AT_CLEANUP
740
741 # The flow is formatted with cls_rule_format() for the low-verbosity case.
742 AT_SETUP([NXT_FLOW_MOD, low verbosity])
743 AT_KEYWORDS([ofp-print])
744 AT_CHECK([ovs-ofctl ofp-print "\
745 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
746 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
747 ff ff ff ff ff ff 00 00 00 14 00 00 00 00 00 00 \
748 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
749 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
750 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
751 " 2], [0], [dnl
752 NXT_FLOW_MOD (xid=0x2): ADD reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[[]]
753 ])
754 AT_CLEANUP
755
756 # The flow is formatted with ofp_match_to_string() for the low-verbosity case.
757 AT_SETUP([NXT_FLOW_MOD, high verbosity])
758 AT_KEYWORDS([ofp-print])
759 AT_CHECK([ovs-ofctl ofp-print "\
760 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
761 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
762 ff ff ff ff ff ff 00 00 00 14 00 00 00 00 00 00 \
763 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
764 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
765 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
766 " 3], [0], [dnl
767 NXT_FLOW_MOD (xid=0x2): ADD NXM_NX_TUN_ID(00000000000001c8), NXM_NX_REG0(0000007b) actions=load:0x5->NXM_NX_REG0[[]]
768 ])
769 AT_CLEANUP
770
771 AT_SETUP([NXT_FLOW_REMOVED])
772 AT_KEYWORDS([ofp-print])
773 AT_CHECK([ovs-ofctl ofp-print "\
774 01 04 00 78 00 00 00 00 00 00 23 20 00 00 00 0e \
775 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 06 \
776 01 6e 36 00 00 05 00 3c 00 00 00 00 00 00 00 01 \
777 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
778 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
779 00 05 00 00 06 02 08 06 00 00 08 02 00 00 00 00 \
780 1e 02 00 02 00 00 20 04 c0 a8 00 01 00 00 22 04 \
781 c0 a8 00 02 00 00 00 00 \
782 "], [0], [dnl
783 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
784 ])
785 AT_CLEANUP
786
787 AT_SETUP([NXT_FLOW_MOD_TABLE_ID])
788 AT_KEYWORDS([ofp-print])
789 AT_CHECK([ovs-ofctl ofp-print "\
790 01 04 00 18 01 02 03 04 00 00 23 20 00 00 00 0f \
791 01 00 00 00 00 00 00 00 \
792 "], [0], [dnl
793 NXT_FLOW_MOD_TABLE_ID (xid=0x1020304): enable
794 ])
795 AT_CLEANUP
796
797 AT_SETUP([NXST_FLOW request])
798 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
799 AT_CHECK([ovs-ofctl ofp-print "\
800 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
801 00 00 00 00 00 00 00 00 ff ff 00 00 ff 00 00 00 \
802 "], [0], [dnl
803 NXST_FLOW request (xid=0x4): @&t@
804 ])
805 AT_CLEANUP
806
807 AT_SETUP([NXST_FLOW reply])
808 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
809 AT_CHECK([ovs-ofctl ofp-print "\
810 01 11 08 18 00 00 00 04 ff ff 00 00 00 00 23 20 \
811 00 00 00 00 00 00 00 00 00 88 00 00 00 00 00 01 \
812 02 dc 6c 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
813 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
814 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
815 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
816 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
817 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
818 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e7 00 00 \
819 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
820 00 88 00 00 00 00 00 03 32 11 62 00 ff ff 00 05 \
821 00 00 00 4c 00 03 00 00 00 00 00 00 00 00 00 00 \
822 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
823 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
824 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
825 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
826 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
827 00 00 12 02 09 e4 00 00 14 02 00 00 00 00 00 00 \
828 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
829 33 f9 aa 00 ff ff 00 05 00 00 00 4c 00 05 00 00 \
830 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
831 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
832 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
833 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
834 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
835 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
836 14 02 09 e5 00 00 00 00 00 00 00 08 00 03 00 00 \
837 00 88 00 00 00 00 00 04 2d 0f a5 00 ff ff 00 05 \
838 00 00 00 4c 00 01 00 00 00 00 00 00 00 00 00 00 \
839 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
840 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
841 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
842 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
843 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
844 00 00 12 02 09 e3 00 00 14 02 00 00 00 00 00 00 \
845 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
846 34 73 bc 00 ff ff 00 05 00 0a 00 4c 00 03 00 03 \
847 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
848 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
849 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
850 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
851 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
852 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e5 00 00 \
853 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
854 00 88 00 00 00 00 00 05 28 0d e8 00 ff ff 00 05 \
855 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
856 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
857 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
858 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
859 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
860 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
861 00 00 12 02 09 e2 00 00 14 02 00 00 00 00 00 00 \
862 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 01 \
863 02 62 5a 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
864 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
865 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
866 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
867 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
868 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
869 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
870 14 02 09 e7 00 00 00 00 00 00 00 08 00 03 00 00 \
871 00 88 00 00 00 00 00 01 38 be 5e 00 ff ff 00 05 \
872 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
873 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
874 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
875 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
876 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
877 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
878 00 00 12 02 00 00 00 00 14 02 09 e6 00 00 00 00 \
879 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 04 \
880 27 d0 df 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
881 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
882 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
883 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
884 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
885 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
886 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
887 14 02 09 e3 00 00 00 00 00 00 00 08 00 03 00 00 \
888 00 88 00 00 00 00 00 03 2c d2 9c 00 ff ff 00 05 \
889 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
890 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
891 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
892 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
893 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
894 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
895 00 00 12 02 00 00 00 00 14 02 09 e4 00 00 00 00 \
896 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
897 0a 40 83 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
898 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
899 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
900 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
901 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
902 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
903 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e8 00 00 \
904 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
905 00 88 00 00 00 00 00 05 25 31 7c 00 ff ff 00 05 \
906 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
907 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
908 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
909 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
910 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
911 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
912 00 00 12 02 00 00 00 00 14 02 09 e2 00 00 00 00 \
913 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
914 04 c4 b4 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
915 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
916 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
917 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
918 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
919 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
920 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
921 14 02 09 e8 00 00 00 00 00 00 00 08 00 03 00 00 \
922 00 88 00 00 00 00 00 01 39 38 70 00 ff ff 00 05 \
923 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
924 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
925 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
926 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
927 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
928 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
929 00 00 12 02 09 e6 00 00 14 02 00 00 00 00 00 00 \
930 00 00 00 08 00 01 00 00 00 60 00 00 00 00 00 e4 \
931 2e 7d db 00 80 00 00 00 00 00 00 14 00 00 00 00 \
932 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
933 00 00 00 00 00 00 00 00 00 01 20 08 00 00 00 00 \
934 00 00 01 c8 00 01 00 04 00 00 00 7b 00 00 00 00 \
935 ff ff 00 18 00 00 23 20 00 07 00 1f 00 01 00 04 \
936 00 00 00 00 00 00 00 05 \
937 00 30 01 00 00 00 0e 10 00 07 a1 20 80 00 00 00 \
938 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
939 00 00 00 00 00 00 00 64 00 00 00 00 00 00 19 00 \
940 "], [0],
941 [[NXST_FLOW reply (xid=0x4):
942  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
943  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
944  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
945  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
946  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
947  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
948  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
949  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
950  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
951  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
952  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
953  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
954  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
955  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
956  cookie=0x0, duration=228.78s, table=0, n_packets=0, n_bytes=0, reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[]
957  cookie=0x0, duration=3600.0005s, table=1, n_packets=100, n_bytes=6400, actions=drop
958 ]])
959 AT_CLEANUP
960
961 AT_SETUP([NXST_AGGREGATE request])
962 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
963 AT_CHECK([ovs-ofctl ofp-print "\
964 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
965 00 00 00 01 00 00 00 00 ff ff 00 00 ff 00 00 00 \
966 "], [0], [dnl
967 NXST_AGGREGATE request (xid=0x4): @&t@
968 ])
969 AT_CLEANUP
970
971 AT_SETUP([NXST_AGGREGATE reply])
972 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
973 AT_CHECK([ovs-ofctl ofp-print "\
974 01 11 00 30 00 00 00 04 ff ff 00 00 00 00 23 20 \
975 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 07 \
976 00 00 00 00 00 00 01 a4 00 00 00 07 00 00 00 00 \
977 "], [0], [dnl
978 NXST_AGGREGATE reply (xid=0x4): packet_count=7 byte_count=420 flow_count=7
979 ])
980 AT_CLEANUP