ofp-util: Add version bitmap support to hello 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_msgs|WARN|unknown OpenFlow message (version 0, type 187)
24 ])
25 AT_CLEANUP
26
27 AT_SETUP([truncated message])
28 AT_KEYWORDS([ofp-print])
29 AT_CHECK([ovs-ofctl ofp-print 0110ccddeeff0011], [0], [dnl
30 (***truncated to 8 bytes from 52445***)
31 00000000  01 10 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 01100009eeff00112233], [0], [dnl
38 (***only uses 9 bytes out of 10***)
39 00000000  01 10 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  version bitmap: 0x01
49 ])
50 AT_CLEANUP
51
52 AT_SETUP([OFPT_HELLO with extra data])
53 AT_KEYWORDS([ofp-print])
54 AT_CHECK([ovs-ofctl ofp-print 0100001300000000657874726120646174610a], [0],
55 [dnl
56 OFPT_HELLO (xid=0x0):
57  version bitmap: 0x01
58  unknown data in hello:
59 00000000  01 00 00 13 00 00 00 00-65 78 74 72 61 20 64 61 |........extra da|
60 00000010  74 61 0a                                        |ta.             |
61 ])
62 AT_CLEANUP
63
64 AT_SETUP([OFPT_HELLO with version bitmap])
65 AT_KEYWORDS([ofp-print])
66 AT_CHECK([ovs-ofctl ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 f0"], [0],
67 [dnl
68 OFPT_HELLO (xid=0x0):
69  version bitmap: 0x04, 0x05, 0x06, 0x07
70 ])
71 AT_CLEANUP
72
73 AT_SETUP([OFPT_HELLO with version bitmap and extra data])
74 AT_KEYWORDS([ofp-print])
75 AT_CHECK([ovs-ofctl ofp-print "\
76 01 00 00 1b 00 00 00 00 ff ff 00 06 01 02 00 00 \
77 00 01 00 08 00 00 00 f0 61 62 63"], [0],
78 [dnl
79 OFPT_HELLO (xid=0x0):
80  version bitmap: 0x04, 0x05, 0x06, 0x07
81  unknown data in hello:
82 00000000  01 00 00 1b 00 00 00 00-ff ff 00 06 01 02 00 00 |................|
83 00000010  00 01 00 08 00 00 00 f0-61 62 63                |........abc     |
84 ])
85 AT_CLEANUP
86
87 dnl OFPT_ERROR tests are in ofp-errors.at.
88
89 AT_SETUP([OFPT_ECHO_REQUEST, empty payload])
90 AT_KEYWORDS([ofp-print])
91 AT_CHECK([ovs-ofctl ofp-print '01 02 00 08 00 00 00 01'], [0], [dnl
92 OFPT_ECHO_REQUEST (xid=0x1): 0 bytes of payload
93 ])
94 AT_CLEANUP
95
96 AT_SETUP([OFPT_ECHO_REQUEST, 5-byte payload])
97 AT_KEYWORDS([ofp-print])
98 AT_CHECK([ovs-ofctl ofp-print '0102000d00000001 25 53 54 1a 9d'], [0], [dnl
99 OFPT_ECHO_REQUEST (xid=0x1): 5 bytes of payload
100 00000000  25 53 54 1a 9d                                  |%ST..           |
101 ])
102 AT_CLEANUP
103
104 AT_SETUP([OFPT_ECHO_REPLY, empty payload])
105 AT_KEYWORDS([ofp-print])
106 AT_CHECK([ovs-ofctl ofp-print '01 03 00 08 00 00 00 01'], [0], [dnl
107 OFPT_ECHO_REPLY (xid=0x1): 0 bytes of payload
108 ])
109 AT_CLEANUP
110
111 AT_SETUP([OFPT_ECHO_REPLY, 5-byte payload])
112 AT_KEYWORDS([ofp-print])
113 AT_CHECK([ovs-ofctl ofp-print '0103000d0000000ba330efaf9e'], [0], [dnl
114 OFPT_ECHO_REPLY (xid=0xb): 5 bytes of payload
115 00000000  a3 30 ef af 9e                                  |.0...           |
116 ])
117 AT_CLEANUP
118
119 AT_SETUP([OFPT_FEATURES_REQUEST])
120 AT_KEYWORDS([ofp-print])
121 AT_CHECK([ovs-ofctl ofp-print '0105000800000001'], [0], [dnl
122 OFPT_FEATURES_REQUEST (xid=0x1):
123 ])
124 AT_CLEANUP
125
126 AT_SETUP([OFPT_FEATURES_REPLY - OF1.0])
127 AT_KEYWORDS([ofp-print])
128 AT_CHECK([ovs-ofctl ofp-print "\
129 01 06 00 e0 00 00 00 01 00 00 50 54 00 00 00 01 \
130 00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
131 ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
132 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
133 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
134 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
135 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
136 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
137 00 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
138 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
139 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
140 00 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
141 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
142 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
143 "], [0], [dnl
144 OFPT_FEATURES_REPLY (xid=0x1): dpid:0000505400000001
145 n_tables:2, n_buffers:256
146 capabilities: FLOW_STATS TABLE_STATS PORT_STATS ARP_MATCH_IP
147 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
148  1(eth1): addr:50:54:00:00:00:02
149      config:     0
150      state:      0
151      current:    100MB-FD AUTO_NEG
152      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
153      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
154      speed: 100 Mbps now, 100 Mbps max
155  2(eth2): addr:50:54:00:00:00:03
156      config:     0
157      state:      0
158      current:    100MB-FD AUTO_NEG
159      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
160      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
161      speed: 100 Mbps now, 100 Mbps max
162  3(eth0): addr:50:54:00:00:00:01
163      config:     0
164      state:      0
165      current:    100MB-FD AUTO_NEG
166      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
167      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
168      speed: 100 Mbps now, 100 Mbps max
169  LOCAL(br0): addr:50:54:00:00:00:01
170      config:     PORT_DOWN
171      state:      LINK_DOWN
172      speed: 0 Mbps now, 0 Mbps max
173 ])
174 AT_CLEANUP
175
176 AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.0])
177 AT_KEYWORDS([ofp-print])
178 AT_CHECK([ovs-ofctl ofp-print "\
179 01 06 00 dc 00 00 00 01 00 00 50 54 00 00 00 01 \
180 00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
181 ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
182 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
183 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
184 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
185 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
186 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
187 00 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
188 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
189 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
190 00 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
191 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
192 00 00 02 08 00 00 02 8f 00 00 02 8f \
193 "], [0], [dnl
194 ***decode error: OFPBRC_BAD_LEN***
195 00000000  01 06 00 dc 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
196 00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 0f ff |................|
197 00000020  ff fe 50 54 00 00 00 01-62 72 30 00 00 00 00 00 |..PT....br0.....|
198 00000030  00 00 00 00 00 00 00 00-00 00 00 01 00 00 00 01 |................|
199 00000040  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
200 00000050  00 03 50 54 00 00 00 01-65 74 68 30 00 00 00 00 |..PT....eth0....|
201 00000060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
202 00000070  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
203 00000080  00 02 50 54 00 00 00 03-65 74 68 32 00 00 00 00 |..PT....eth2....|
204 00000090  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
205 000000a0  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
206 000000b0  00 01 50 54 00 00 00 02-65 74 68 31 00 00 00 00 |..PT....eth1....|
207 000000c0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
208 000000d0  00 00 02 08 00 00 02 8f-00 00 02 8f             |............    |
209 ], [stderr])
210 AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
211 received OFPT_FEATURES_REPLY with incorrect length 220 (must be exactly 32 bytes or longer by an integer multiple of 48 bytes)
212 ])
213 AT_CLEANUP
214
215 AT_SETUP([OFPT_FEATURES_REPLY - OF1.1])
216 AT_KEYWORDS([ofp-print])
217 AT_CHECK([ovs-ofctl ofp-print "\
218 02 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
219 00 00 01 00 02 00 00 00 00 00 00 87 00 00 ff ff \
220 ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
221 62 72 30 00 00 00 00 00 00 00 00 00 00 00 00 00 \
222 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
223 00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
224 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
225 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
226 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
227 00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
228 "], [0], [dnl
229 OFPT_FEATURES_REPLY (OF1.1) (xid=0x1): dpid:0000505400000001
230 n_tables:2, n_buffers:256
231 capabilities: FLOW_STATS TABLE_STATS PORT_STATS ARP_MATCH_IP
232  3(eth0): addr:50:54:00:00:00:01
233      config:     0
234      state:      0
235      current:    100MB-FD AUTO_NEG
236      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
237      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
238      speed: 100 Mbps now, 100 Mbps max
239  LOCAL(br0): addr:50:54:00:00:00:01
240      config:     PORT_DOWN
241      state:      LINK_DOWN
242      speed: 100 Mbps now, 100 Mbps max
243 ])
244 AT_CLEANUP
245
246 AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.1])
247 AT_KEYWORDS([ofp-print])
248 AT_CHECK([ovs-ofctl ofp-print "\
249 02 06 00 90 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 "], [0], [dnl
259 ***decode error: OFPBRC_BAD_LEN***
260 00000000  02 06 00 90 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
261 00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 ff ff |................|
262 00000020  ff ff ff fe 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
263 00000030  62 72 30 00 00 00 00 00-00 00 00 00 00 00 00 00 |br0.............|
264 00000040  00 00 00 01 00 00 00 01-00 00 00 00 00 00 00 00 |................|
265 00000050  00 00 00 00 00 00 00 00-00 01 86 a0 00 01 86 a0 |................|
266 00000060  00 00 00 03 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
267 00000070  65 74 68 30 00 00 00 00-00 00 00 00 00 00 00 00 |eth0............|
268 00000080  00 00 00 00 00 00 00 00-00 00 20 08 00 00 28 0f |.......... ...@{:@.|
269 ], [stderr])
270 AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
271 received OFPT_FEATURES_REPLY with incorrect length 144 (must be exactly 32 bytes or longer by an integer multiple of 64 bytes)
272 ])
273 AT_CLEANUP
274
275 AT_SETUP([OFPT_FEATURES_REPLY - OF1.2])
276 AT_KEYWORDS([ofp-print])
277 AT_CHECK([ovs-ofctl ofp-print "\
278 03 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
279 00 00 01 00 ff 00 00 00 00 00 01 77 00 00 06 ff \
280 ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
281 62 72 30 0a 00 00 00 00 00 00 00 00 00 00 00 00 \
282 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
283 00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
284 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
285 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
286 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
287 00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
288 "], [0], [dnl
289 OFPT_FEATURES_REPLY (OF1.2) (xid=0x1): dpid:0000505400000001
290 n_tables:255, n_buffers:256
291 capabilities: FLOW_STATS TABLE_STATS PORT_STATS IP_REASM QUEUE_STATS PORT_BLOCKED
292  3(eth0): addr:50:54:00:00:00:01
293      config:     0
294      state:      0
295      current:    100MB-FD AUTO_NEG
296      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
297      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
298      speed: 100 Mbps now, 100 Mbps max
299  LOCAL(br0): addr:50:54:00:00:00:01
300      config:     PORT_DOWN
301      state:      LINK_DOWN
302      speed: 100 Mbps now, 100 Mbps max
303 ])
304 AT_CLEANUP
305
306 AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.2])
307 AT_KEYWORDS([ofp-print])
308 AT_CHECK([ovs-ofctl ofp-print "\
309 03 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
310 00 00 01 00 ff 00 00 00 00 00 01 77 00 00 06 ff \
311 ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
312 62 72 30 0a 00 00 00 00 00 00 00 00 00 00 00 00 \
313 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
314 00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
315 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
316 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
317 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
318 "], [0], [dnl
319 OFPT_FEATURES_REPLY (OF1.2) (xid=0x1):
320 (***truncated to 144 bytes from 160***)
321 00000000  03 06 00 a0 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
322 00000010  00 00 01 00 ff 00 00 00-00 00 01 77 00 00 06 ff |...........w....|
323 00000020  ff ff ff fe 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
324 00000030  62 72 30 0a 00 00 00 00-00 00 00 00 00 00 00 00 |br0.............|
325 00000040  00 00 00 01 00 00 00 01-00 00 00 00 00 00 00 00 |................|
326 00000050  00 00 00 00 00 00 00 00-00 01 86 a0 00 01 86 a0 |................|
327 00000060  00 00 00 03 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
328 00000070  65 74 68 30 00 00 00 00-00 00 00 00 00 00 00 00 |eth0............|
329 00000080  00 00 00 00 00 00 00 00-00 00 20 08 00 00 28 0f |.......... ...@{:@.|
330 ], [stderr])
331 AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
332 ])
333 AT_CLEANUP
334
335 AT_SETUP([OFPT_GET_CONFIG_REQUEST])
336 AT_KEYWORDS([ofp-print])
337 AT_CHECK([ovs-ofctl ofp-print '0107000800000001'], [0], [dnl
338 OFPT_GET_CONFIG_REQUEST (xid=0x1):
339 ])
340 AT_CLEANUP
341
342 AT_SETUP([OFPT_GET_CONFIG_REPLY, most common form])
343 AT_KEYWORDS([ofp-print])
344 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 00 00 00'], [0], [dnl
345 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
346 ])
347 AT_CLEANUP
348
349
350 AT_SETUP([OFPT_GET_CONFIG_REPLY, frags and miss_send_len])
351 AT_KEYWORDS([ofp-print])
352 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 02 00 ff'], [0], [dnl
353 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=reassemble miss_send_len=255
354 ])
355 AT_CLEANUP
356
357 AT_SETUP([OFPT_PACKET_IN - OF1.0])
358 AT_KEYWORDS([ofp-print])
359 AT_CHECK([ovs-ofctl ofp-print "\
360 01 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
361 00 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
362 45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
363 c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
364 50 00 02 00 26 e8 00 00 00 00 00 00 00 00 \
365 "], [0], [dnl
366 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
367 priority=0,tcp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,nw_src=192.168.0.1,nw_dst=192.168.0.2,nw_tos=0,nw_ecn=0,nw_ttl=64,tp_src=10031,tp_dst=0 tcp_csum:26e8
368 ])
369 AT_CLEANUP
370
371 AT_SETUP([OFPT_PACKET_IN - OF1.2])
372 AT_KEYWORDS([ofp-print])
373 AT_CHECK([ovs-ofctl ofp-print "\
374 03 0a 00 4c 00 00 00 00 ff ff ff 00 00 2a 00 00 \
375 00 01 00 0c 80 00 00 04 ff ff ff fe 00 00 00 00 \
376 00 00 ff ff ff ff ff ff 00 23 20 83 c1 5f 80 35 \
377 00 01 08 00 06 04 00 03 00 23 20 83 c1 5f 00 00 \
378 00 00 00 23 20 83 c1 5f 00 00 00 00 \
379 "], [0], [dnl
380 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
381 priority=0,rarp,metadata=0,in_port=0,vlan_tci=0x0000,dl_src=00:23:20:83:c1:5f,dl_dst=ff:ff:ff:ff:ff:ff,arp_spa=0.0.0.0,arp_tpa=0.0.0.0,arp_op=3,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
382 ])
383 AT_CLEANUP
384
385 AT_SETUP([OFPT_FLOW_REMOVED - OF1.0])
386 AT_KEYWORDS([ofp-print])
387 AT_CHECK([ovs-ofctl ofp-print "\
388 01 0b 00 58 00 00 00 00 00 00 00 00 00 03 50 54 \
389 00 00 00 05 50 54 00 00 00 06 ff ff 00 00 08 06 \
390 00 02 00 00 c0 a8 00 01 c0 a8 00 02 00 00 00 00 \
391 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 05 \
392 30 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \
393 00 00 00 00 00 00 00 3c \
394 "], [0], [dnl
395 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,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 reason=idle duration5.82s idle5 pkts1 bytes60
396 ])
397 AT_CLEANUP
398
399 AT_SETUP([OFPT_FLOW_REMOVED - OF1.2])
400 AT_KEYWORDS([ofp-print])
401 AT_CHECK([ovs-ofctl ofp-print "\
402 03 0b 00 40 00 00 00 00 fe dc ba 98 76 54 32 10 \
403 80 00 01 05 00 00 00 01 00 98 96 80 00 3c 00 78 \
404 00 00 00 00 00 12 d6 87 00 00 00 00 6f 68 ba 66 \
405 00 01 00 0a 80 00 0c 02 10 09 00 00 00 00 00 00"], [0], [dnl
406 OFPT_FLOW_REMOVED (OF1.2) (xid=0x0): dl_vlan=9 reason=hard table_id=5 cookie:0xfedcba9876543210 duration1.01s idle60 hard120 pkts1234567 bytes1869134438
407 ])
408 AT_CLEANUP
409
410 AT_SETUP([OFPT_PORT_STATUS - OF1.0])
411 AT_KEYWORDS([ofp-print])
412 AT_CHECK([ovs-ofctl ofp-print "\
413 01 0c 00 40 00 00 00 00 02 00 00 00 00 00 00 00 \
414 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
415 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
416 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
417 "], [0], [dnl
418 OFPT_PORT_STATUS (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
419      config:     PORT_DOWN
420      state:      LINK_DOWN
421      current:    100MB-FD AUTO_NEG
422      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
423      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
424      speed: 100 Mbps now, 100 Mbps max
425 ])
426 AT_CLEANUP
427
428 AT_SETUP([OFPT_PORT_STATUS - OF1.1])
429 AT_KEYWORDS([ofp-print])
430 AT_CHECK([ovs-ofctl ofp-print "\
431 02 0c 00 50 00 00 00 00 02 00 00 00 00 00 00 00 \
432 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
433 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
434 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
435 00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
436 "], [0], [dnl
437 OFPT_PORT_STATUS (OF1.1) (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
438      config:     0
439      state:      0
440      current:    100MB-FD AUTO_NEG
441      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
442      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
443      speed: 100 Mbps now, 100 Mbps max
444 ])
445 AT_CLEANUP
446
447 AT_SETUP([OFPT_PACKET_OUT - OF1.0])
448 AT_KEYWORDS([ofp-print])
449 AT_CHECK([ovs-ofctl ofp-print "\
450 01 0d 00 54 00 00 00 00 00 00 01 14 00 01 00 08 \
451 00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
452 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
453 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
454 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
455 00 00 00 00 \
456 "], [0], [dnl
457 OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 buffer=0x00000114
458 ])
459 AT_CLEANUP
460
461 AT_SETUP([OFPT_PACKET_OUT - OF1.1])
462 AT_KEYWORDS([ofp-print])
463 AT_CHECK([ovs-ofctl ofp-print "\
464 03 0d 00 28 88 58 df c5 ff ff ff 00 ff ff ff fe \
465 00 10 00 00 00 00 00 00 00 00 00 10 ff ff ff fb \
466 05 dc 00 00 00 00 00 00 \
467 "], [0], [dnl
468 OFPT_PACKET_OUT (OF1.2) (xid=0x8858dfc5): in_port=LOCAL actions=FLOOD buffer=0xffffff00
469 ])
470 AT_CLEANUP
471
472 # The flow is formatted with cls_rule_format() for the low-verbosity case.
473 AT_SETUP([OFPT_FLOW_MOD - OF1.0 - low verbosity])
474 AT_KEYWORDS([ofp-print])
475 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
476 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
477 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
478 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
479 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
480 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
481 " 2], [0], [dnl
482 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,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 idle:5 buf:0x10e out_port:0 actions=output:3
483 ], [dnl
484 ofp_util|INFO|normalization changed ofp_match, details:
485 ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0
486 ofp_util|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2
487 ])
488 AT_CLEANUP
489
490 # The flow is formatted with cls_rule_format() for the low-verbosity case.
491 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
492 AT_KEYWORDS([ofp-print])
493 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
494 03 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
495 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 ff ff \
496 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
497 00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
498 50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
499 80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
500 00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
501 00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
502 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
503 " 2], [0], [dnl
504 OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:255 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3
505 ], [dnl
506 ])
507 AT_CLEANUP
508
509 # The flow is formatted with ofp10_match_to_string() for the
510 # high-verbosity case.
511 AT_SETUP([OFPT_FLOW_MOD - OF1.0 - high verbosity])
512 AT_KEYWORDS([ofp-print])
513 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
514 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
515 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
516 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
517 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
518 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
519 " 3], [0], [dnl
520 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 out_port:0 actions=output:3
521 ], [dnl
522 ofp_util|INFO|normalization changed ofp_match, details:
523 ofp_util|INFO| pre: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0
524 ofp_util|INFO|post: arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2
525 ])
526 AT_CLEANUP
527
528 # The flow is formatted with cls_rule_format() for the low-verbosity case.
529 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
530 AT_KEYWORDS([ofp-print])
531 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
532 03 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
533 00 00 00 00 00 00 00 00 ff 00 00 00 00 00 ff ff \
534 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
535 00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
536 50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
537 80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
538 00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
539 00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
540 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
541 " 2], [0], [dnl
542 OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:255 priority=65535,arp,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=2 actions=output:3
543 ], [dnl
544 ])
545 AT_CLEANUP
546
547 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field ip_src])
548 AT_KEYWORDS([ofp-print])
549 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
550 03 0e 00 58 52 33 45 02 00 00 00 00 00 00 00 00 \
551 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
552 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
553 00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
554 00 04 00 18 00 00 00 00 00 19 00 10 80 00 16 04 \
555 c0 a8 03 5c 00 00 00 00                         \
556 " 2], [0], [dnl
557 OFPT_FLOW_MOD (OF1.2) (xid=0x52334502): ADD priority=255,ip actions=set_field:192.168.3.92->ip_src
558 ], [dnl
559 ])
560 AT_CLEANUP
561
562 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field ip_dst])
563 AT_KEYWORDS([ofp-print])
564 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
565 03 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
566 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
567 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
568 00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
569 00 04 00 18 00 00 00 00 00 19 00 10 80 00 18 04 \
570 c0 a8 4a 7a 00 00 00 00                         \
571 " 2], [0], [dnl
572 OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,ip actions=set_field:192.168.74.122->ip_dst
573 ], [dnl
574 ])
575 AT_CLEANUP
576
577 AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field ip_src])
578 AT_KEYWORDS([ofp-print])
579 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
580 03 13 00 68 52 33 45 04 00 01 00 00 00 00 00 00 \
581 00 58 00 00 00 00 00 00 00 00 00 00 00 ff 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 00 00 00 \
584 00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
585 00 04 00 18 00 00 00 00 00 19 00 10 80 00 16 04 \
586 c0 a8 03 5c 00 00 00 00                         \
587 " 2], [0], [dnl
588 OFPST_FLOW reply (OF1.2) (xid=0x52334504):
589  cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,ip actions=set_field:192.168.3.92->ip_src
590 ], [dnl
591 ])
592 AT_CLEANUP
593
594 AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field ip_dst])
595 AT_KEYWORDS([ofp-print])
596 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
597 03 13 00 68 52 33 45 09 00 01 00 00 00 00 00 00 \
598 00 58 00 00 00 00 00 00 00 00 00 00 00 ff 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 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
602 00 04 00 18 00 00 00 00 00 19 00 10 80 00 18 04 \
603 c0 a8 4a 7a 00 00 00 00                         \
604 " 2], [0], [dnl
605 OFPST_FLOW reply (OF1.2) (xid=0x52334509):
606  cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,ip actions=set_field:192.168.74.122->ip_dst
607 ], [dnl
608 ])
609 AT_CLEANUP
610
611 AT_SETUP([OFPT_PORT_MOD - OF1.0])
612 AT_KEYWORDS([ofp-print])
613 AT_CHECK([ovs-ofctl ofp-print "\
614 01 0f 00 20 00 00 00 03 00 03 50 54 00 00 00 01 \
615 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
616 " 3], [0], [dnl
617 OFPT_PORT_MOD (xid=0x3):port: 3: addr:50:54:00:00:00:01
618      config: PORT_DOWN
619      mask:   PORT_DOWN
620      advertise: UNCHANGED
621 ])
622 AT_CLEANUP
623
624 AT_SETUP([OFPT_PORT_MOD - OF1.1])
625 AT_KEYWORDS([ofp-print])
626 AT_CHECK([ovs-ofctl ofp-print "\
627 02 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
628 50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
629 00 00 00 00 00 00 00 00 \
630 " 3], [0], [dnl
631 OFPT_PORT_MOD (OF1.1) (xid=0x3):port: 3: addr:50:54:00:00:00:01
632      config: PORT_DOWN
633      mask:   PORT_DOWN
634      advertise: UNCHANGED
635 ])
636 AT_CLEANUP
637
638 AT_SETUP([OFPT_PORT_MOD - OF1.2])
639 AT_KEYWORDS([ofp-print])
640 AT_CHECK([ovs-ofctl ofp-print "\
641 03 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
642 50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
643 00 00 00 00 00 00 00 00 \
644 " 3], [0], [dnl
645 OFPT_PORT_MOD (OF1.2) (xid=0x3):port: 3: addr:50:54:00:00:00:01
646      config: PORT_DOWN
647      mask:   PORT_DOWN
648      advertise: UNCHANGED
649 ])
650 AT_CLEANUP
651
652 AT_SETUP([OFPST_DESC request])
653 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
654 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100000000"], [0], [dnl
655 OFPST_DESC request (xid=0x1):
656 ])
657 AT_CLEANUP
658
659 AT_SETUP([OFPST_DESC reply])
660 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
661 AT_CHECK([ovs-ofctl ofp-print "\
662 01 11 04 2c 00 00 00 01 00 00 00 00 4e 69 63 69 \
663 72 61 2c 20 49 6e 63 2e 00 00 00 00 00 00 00 00 \
664 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
665 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
666 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
667 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
668 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
669 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
670 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
671 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
672 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
673 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
674 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
675 00 00 00 00 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 4f 70 65 6e \
679 20 76 53 77 69 74 63 68 00 00 00 00 00 00 00 00 \
680 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
681 00 00 00 00 00 00 00 00 00 00 00 00 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 00 00 00 \
686 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
687 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
688 00 00 00 00 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 00 00 00 00 00 00 00 00 00 00 00 \
693 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
694 00 00 00 00 00 00 00 00 00 00 00 00 31 2e 31 2e \
695 30 70 72 65 32 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 00 00 00 00 \
699 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
701 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
702 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
703 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
704 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
705 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
706 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
707 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
708 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
709 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
710 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
711 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
712 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
713 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
714 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
715 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
716 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
717 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
718 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
719 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
720 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
721 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
722 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
723 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
724 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
725 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
726 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
727 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
728 00 00 00 00 00 00 00 00 00 00 00 00 \
729 "], [0], [dnl
730 OFPST_DESC reply (xid=0x1):
731 Manufacturer: Nicira, Inc.
732 Hardware: Open vSwitch
733 Software: 1.1.0pre2
734 Serial Num: None
735 DP Description: None
736 ])
737 AT_CLEANUP
738
739 AT_SETUP([OFPST_FLOW request - OF1.0])
740 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
741 AT_CHECK([ovs-ofctl ofp-print "\
742 01 10 00 38 00 00 00 04 00 01 00 00 00 38 20 ff \
743 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
744 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
745 00 00 00 00 ff 00 ff ff \
746 "], [0], [dnl
747 OFPST_FLOW request (xid=0x4): @&t@
748 ])
749 AT_CLEANUP
750
751 AT_SETUP([OFPST_FLOW request - OF1.2])
752 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
753 AT_CHECK([ovs-ofctl ofp-print "\
754 03 12 00 38 00 00 00 02 00 01 00 00 00 00 00 00 \
755 ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
756 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
757 00 01 00 04 00 00 00 00 \
758 "], [0], [dnl
759 OFPST_FLOW request (OF1.2) (xid=0x2): @&t@
760 ])
761 AT_CLEANUP
762
763 AT_SETUP([OFPST_FLOW reply - OF1.0])
764 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
765 AT_CHECK([ovs-ofctl ofp-print "\
766 01 11 01 e4 00 00 00 04 00 01 00 00 00 60 00 00 \
767 00 00 00 00 00 03 50 54 00 00 00 05 50 54 00 00 \
768 00 06 ff ff 00 00 08 06 00 02 00 00 c0 a8 00 01 \
769 c0 a8 00 02 00 00 00 00 00 00 00 04 0b eb c2 00 \
770 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
771 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
772 00 00 00 3c 00 00 00 08 00 01 00 00 00 60 00 00 \
773 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
774 00 05 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 02 \
775 c0 a8 00 01 00 00 00 00 00 00 00 08 35 a4 e9 00 \
776 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
777 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
778 00 00 04 fa 00 00 00 08 00 03 00 00 00 60 00 00 \
779 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
780 00 05 ff ff 00 00 08 06 00 01 00 00 c0 a8 00 02 \
781 c0 a8 00 01 00 00 00 00 00 00 00 04 10 b0 76 00 \
782 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
783 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
784 00 00 00 3c 00 00 00 08 00 03 00 00 00 60 00 00 \
785 00 00 00 01 00 03 50 54 00 00 00 05 50 54 00 00 \
786 00 06 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 01 \
787 c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \
788 80 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
789 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
790 00 00 04 fa 00 00 00 08 00 01 00 00 \
791 00 58 02 00 00 3f ff ff 00 00 00 00 00 00 00 00 \
792 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
793 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
794 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 \
795 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
796 00 00 00 00 00 00 00 00 \
797 "], [0], [dnl
798 OFPST_FLOW reply (xid=0x4):
799  cookie=0x0, duration=4.2s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=3,vlan_tci=0x0000,dl_src=50:54:00:00:00:05,dl_dst=50:54:00:00:00:06,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2,nw_tos=0,tp_src=0,tp_dst=0 actions=output:1
800  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
801  cookie=0x0, duration=4.28s, table=0, n_packets=1, n_bytes=60, idle_timeout=5, priority=65535,arp,in_port=1,vlan_tci=0x0000,dl_src=50:54:00:00:00:06,dl_dst=50:54:00:00:00:05,arp_spa=192.168.0.2,arp_tpa=192.168.0.1,arp_op=1,nw_tos=0,tp_src=0,tp_dst=0 actions=output:3
802  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
803  cookie=0x0, duration=0s, table=2, n_packets=0, n_bytes=0, actions=drop
804 ])
805 AT_CLEANUP
806
807 AT_SETUP([OFPST_FLOW reply - OF1.2])
808 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
809 AT_CHECK([ovs-ofctl ofp-print "\
810 03 13 01 78 00 00 00 02 00 01 00 00 00 00 00 00 \
811 00 78 00 00 00 00 00 03 01 5e f3 c0 80 00 00 00 \
812 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
813 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 62 \
814 00 01 00 2d 80 00 00 04 00 00 00 02 80 00 06 06 \
815 ca da ad d6 0d 37 80 00 0a 02 08 00 80 00 10 01 \
816 00 80 00 04 08 00 00 00 00 00 00 00 00 00 00 00 \
817 00 04 00 18 00 00 00 00 00 00 00 10 00 00 00 02 \
818 05 dc 00 00 00 00 00 00 00 78 00 00 00 00 00 04 \
819 20 7c 0a 40 80 00 00 00 00 00 00 00 00 00 00 00 \
820 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 \
821 00 00 00 00 00 00 00 8c 00 01 00 2d 80 00 00 04 \
822 00 00 00 02 80 00 06 06 52 54 00 c3 00 89 80 00 \
823 0a 02 08 00 80 00 10 01 00 80 00 04 08 00 00 00 \
824 00 00 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
825 00 00 00 10 00 00 00 02 05 dc 00 00 00 00 00 00 \
826 00 78 00 00 00 00 00 04 20 a9 d1 00 80 00 00 00 \
827 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
828 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 2a \
829 00 01 00 2d 80 00 00 04 00 00 00 02 80 00 06 06 \
830 52 54 00 97 00 69 80 00 0a 02 08 00 80 00 10 01 \
831 00 80 00 04 08 00 00 00 00 00 00 00 00 00 00 00 \
832 00 04 00 18 00 00 00 00 00 00 00 10 00 00 00 02 \
833 05 dc 00 00 00 00 00 00 \
834 "], [0], [dnl
835 OFPST_FLOW reply (OF1.2) (xid=0x2):
836  cookie=0x0, duration=3.023s, table=0, n_packets=1, n_bytes=98, ip,metadata=0,in_port=2,dl_dst=ca:da:ad:d6:0d:37,nw_tos=0 actions=output:2
837  cookie=0x0, duration=4.545s, table=0, n_packets=2, n_bytes=140, ip,metadata=0,in_port=2,dl_dst=52:54:00:c3:00:89,nw_tos=0 actions=output:2
838  cookie=0x0, duration=4.548s, table=0, n_packets=1, n_bytes=42, ip,metadata=0,in_port=2,dl_dst=52:54:00:97:00:69,nw_tos=0 actions=output:2
839 ])
840 AT_CLEANUP
841
842 AT_SETUP([OFPST_AGGREGATE request - OF1.0])
843 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
844 AT_CHECK([ovs-ofctl ofp-print "\
845 01 10 00 38 00 00 00 04 00 02 00 00 00 38 20 ff \
846 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
847 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
848 00 00 00 00 ff 00 ff ff \
849 "], [0], [dnl
850 OFPST_AGGREGATE request (xid=0x4): @&t@
851 ])
852 AT_CLEANUP
853
854 AT_SETUP([OFPST_AGGREGATE request - OF1.2])
855 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
856 AT_CHECK([ovs-ofctl ofp-print "\
857 03 12 00 38 00 00 00 02 00 02 00 00 00 00 00 00 \
858 ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
859 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
860 00 01 00 04 00 00 00 00 \
861 "], [0], [dnl
862 OFPST_AGGREGATE request (OF1.2) (xid=0x2): @&t@
863 ])
864 AT_CLEANUP
865
866 AT_SETUP([OFPST_AGGREGATE reply - OF1.0])
867 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
868 AT_CHECK([ovs-ofctl ofp-print "\
869 01 11 00 24 00 00 00 04 00 02 00 00 00 00 00 00 \
870 00 00 01 82 00 00 00 00 00 00 93 78 00 00 00 04 \
871 00 00 00 00 \
872 "], [0], [dnl
873 OFPST_AGGREGATE reply (xid=0x4): packet_count=386 byte_count=37752 flow_count=4
874 ])
875 AT_CLEANUP
876
877 AT_SETUP([OFPST_AGGREGATE reply - OF1.2])
878 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
879 AT_CHECK([ovs-ofctl ofp-print "\
880 03 13 00 28 00 00 00 02 00 02 00 00 00 00 00 00 \
881 00 00 00 00 00 00 00 79 00 00 00 00 00 00 4b 4f \
882 00 00 00 03 00 00 00 00 \
883 "], [0], [dnl
884 OFPST_AGGREGATE reply (OF1.2) (xid=0x2): packet_count=121 byte_count=19279 flow_count=3
885 ])
886 AT_CLEANUP
887
888 AT_SETUP([OFPST_TABLE request - OF1.0])
889 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
890 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100030000"], [0], [dnl
891 OFPST_TABLE request (xid=0x1):
892 ])
893 AT_CLEANUP
894
895 AT_SETUP([OFPST_TABLE request - OF1.1])
896 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
897 AT_CHECK([ovs-ofctl ofp-print "02120010000000020003000000000000"], [0], [dnl
898 OFPST_TABLE request (OF1.1) (xid=0x2):
899 ])
900 AT_CLEANUP
901
902 AT_SETUP([OFPST_TABLE request - OF1.2])
903 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
904 AT_CHECK([ovs-ofctl ofp-print "03120010000000020003000000000000"], [0], [dnl
905 OFPST_TABLE request (OF1.2) (xid=0x2):
906 ])
907 AT_CLEANUP
908
909 AT_SETUP([OFPST_TABLE reply - OF1.0])
910 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
911 AT_CHECK([ovs-ofctl ofp-print "\
912 01 11 00 4c 00 00 00 01 00 03 00 00 00 00 00 00 \
913 63 6c 61 73 73 69 66 69 65 72 00 00 00 00 00 00 \
914 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
915 00 3f ff ff 00 10 00 00 00 00 00 0b 00 00 00 00 \
916 00 00 00 00 00 00 00 00 00 00 00 00 \
917 "], [0], [dnl
918 OFPST_TABLE reply (xid=0x1): 1 tables
919   0: classifier: wild=0x3fffff, max=1048576, active=11
920                lookup=0, matched=0
921 ])
922 AT_CLEANUP
923
924 AT_SETUP([OFPST_TABLE reply - OF1.2])
925 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
926 (mid="wild=0xfffffffff, max=1000000,"
927  tail="
928                match=0xfffffffff, instructions=0x00000007, config=0x00000000
929                write_actions=0x00000000, apply_actions=0x00000000
930                write_setfields=0x0000000fffffffff
931                apply_setfields=0x0000000fffffffff
932                metadata_match=0x0000000000000000
933                metadata_write=0x0000000000000000"
934  echo "OFPST_TABLE reply (OF1.2) (xid=0x2): 255 tables
935   0: classifier: $mid active=1
936                lookup=74614, matched=106024$tail"
937  x=1
938  while test $x -lt 254; do
939    printf "  %d: %-8s: $mid active=0
940                lookup=0, matched=0$tail
941 " $x table$x
942    x=`expr $x + 1`
943  done
944  echo "  254: table254: $mid active=2
945                lookup=0, matched=0$tail") > expout
946
947 (pad32="\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
948  pad7="00 00 00 00 00 00 00 "
949  mid="00 00 00 0f ff ff ff ff \
950 00 00 00 0f ff ff ff ff 00 00 00 00 00 00 00 00 \
951 00 00 00 0f ff ff ff ff 00 00 00 0f ff ff ff ff \
952 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
953 00 00 00 07 00 00 00 00 00 0f 42 40 "
954  tail="00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
955
956  echo -n "03 13 7f 90 00 00 00 02 00 03 00 00 00 00 00 00 "
957
958  x=0
959  printf "%02x $pad7" $x
960  printf "%s$pad32" "classifier" | od -A n -t x1 -v -N 32 | tr '\n' ' '
961  echo -n "$mid 00 00 00 01  "
962  echo -n "00 00 00 00 00 01 23 76 00 00 00 00 00 01 9e 28 "
963
964  x=1
965  while test $x -lt 254; do
966    printf "%02x $pad7" $x
967    printf "%s$pad32" "table$x" | od -A n -t x1 -v -N 32 | tr '\n' ' '
968    echo -n "$mid 00 00 00 00 $tail "
969    x=`expr $x + 1`
970  done
971
972  x=254
973  printf "%02x $pad7" $x
974  printf "%s$pad32" "table$x" | od -A n -t x1 -v -N 32 | tr '\n' ' '
975  echo -n "$mid 00 00 00 02 $tail") > in
976 AT_CHECK([ovs-ofctl ofp-print "$(cat in)"], [0], [expout])
977 AT_CLEANUP
978
979 AT_SETUP([OFPST_PORT request - 1.0])
980 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
981 AT_CHECK([ovs-ofctl ofp-print "\
982 01 10 00 14 00 00 00 01 00 04 00 00 ff ff 00 00 \
983 00 00 00 00 \
984 "], [0], [dnl
985 OFPST_PORT request (xid=0x1): port_no=65535
986 ])
987 AT_CLEANUP
988
989 AT_SETUP([OFPST_PORT request - 1.1])
990 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
991 AT_CHECK([ovs-ofctl ofp-print "\
992 02 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
993 ff ff ff ff 00 00 00 00 \
994 "], [0], [dnl
995 OFPST_PORT request (OF1.1) (xid=0x2): port_no=65535
996 ])
997 AT_CLEANUP
998
999 AT_SETUP([OFPST_PORT request - 1.2])
1000 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1001 AT_CHECK([ovs-ofctl ofp-print "\
1002 03 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
1003 ff ff ff ff 00 00 00 00 \
1004 "], [0], [dnl
1005 OFPST_PORT request (OF1.2) (xid=0x2): port_no=65535
1006 ])
1007 AT_CLEANUP
1008
1009 AT_SETUP([OFPST_PORT reply - OF1.0])
1010 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1011 AT_CHECK([ovs-ofctl ofp-print "\
1012 01 11 01 ac 00 00 00 01 00 04 00 00 00 03 00 00 \
1013 00 00 00 00 00 00 00 00 00 00 4d 20 00 00 00 00 \
1014 00 00 14 32 00 00 00 00 00 0f 60 4e 00 00 00 00 \
1015 00 05 71 bc 00 00 00 00 00 00 00 00 00 00 00 00 \
1016 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1017 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1018 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1019 00 00 00 00 ff fe 00 00 00 00 00 00 00 00 00 00 \
1020 00 00 02 ac 00 00 00 00 00 00 01 f5 00 00 00 00 \
1021 00 01 0c 8c 00 00 00 00 00 00 db 1c 00 00 00 00 \
1022 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1023 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1024 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1025 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
1026 00 00 00 00 00 00 00 00 00 00 06 be 00 00 00 00 \
1027 00 00 05 84 00 00 00 00 00 02 34 b4 00 00 00 00 \
1028 00 02 23 d4 00 00 00 00 00 00 00 00 00 00 00 00 \
1029 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1031 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1032 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 \
1033 00 00 14 12 00 00 00 00 00 00 14 66 00 00 00 00 \
1034 00 04 a2 54 00 00 00 00 00 05 8a 1e 00 00 00 00 \
1035 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1036 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1037 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1038 00 00 00 00 00 00 00 00 00 00 00 00 \
1039 "], [0], [dnl
1040 OFPST_PORT reply (xid=0x1): 4 ports
1041   port  3: rx pkts=19744, bytes=1007694, drop=0, errs=0, frame=0, over=0, crc=0
1042            tx pkts=5170, bytes=356796, drop=0, errs=0, coll=0
1043   port 65534: rx pkts=684, bytes=68748, drop=0, errs=0, frame=0, over=0, crc=0
1044            tx pkts=501, bytes=56092, drop=0, errs=0, coll=0
1045   port  2: rx pkts=1726, bytes=144564, drop=0, errs=0, frame=0, over=0, crc=0
1046            tx pkts=1412, bytes=140244, drop=0, errs=0, coll=0
1047   port  1: rx pkts=5138, bytes=303700, drop=0, errs=0, frame=0, over=0, crc=0
1048            tx pkts=5222, bytes=363038, drop=0, errs=0, coll=0
1049 ])
1050 AT_CLEANUP
1051
1052 AT_SETUP([OFPST_PORT reply - OF1.2])
1053 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1054 AT_CHECK([ovs-ofctl ofp-print "\
1055 03 13 01 48 00 00 00 02 00 04 00 00 00 00 00 00 \
1056 00 00 00 02 00 00 00 00 00 00 00 00 00 01 95 56 \
1057 00 00 00 00 00 00 00 88 00 00 00 00 02 5d 08 98 \
1058 00 00 00 00 00 00 2c f8 00 00 00 00 00 00 00 00 \
1059 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1061 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1062 00 00 00 00 00 00 00 00 ff ff ff fe 00 00 00 00 \
1063 00 00 00 00 00 00 00 44 00 00 00 00 00 00 9d 2c \
1064 00 00 00 00 00 00 16 7c 00 00 00 00 01 1e 36 44 \
1065 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1066 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1067 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1068 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1069 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 44 \
1070 00 00 00 00 00 00 9d 2c 00 00 00 00 00 00 16 7c \
1071 00 00 00 00 01 1e 36 44 00 00 00 00 00 00 00 00 \
1072 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1073 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1074 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1075 00 00 00 00 00 00 00 00 \
1076 "], [0], [dnl
1077 OFPST_PORT reply (OF1.2) (xid=0x2): 3 ports
1078   port  2: rx pkts=103766, bytes=39651480, drop=0, errs=0, frame=0, over=0, crc=0
1079            tx pkts=136, bytes=11512, drop=0, errs=0, coll=0
1080   port 65534: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1081            tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1082   port  1: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1083            tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1084 ])
1085 AT_CLEANUP
1086
1087 AT_SETUP([OFPST_QUEUE request - OF1.0])
1088 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1089 AT_CHECK([ovs-ofctl ofp-print "\
1090 01 10 00 14 00 00 00 01 00 05 00 00 ff fc 00 00 \
1091 ff ff ff ff \
1092 "], [0], [dnl
1093 OFPST_QUEUE request (xid=0x1):port=ALL queue=ALL
1094 ])
1095 AT_CLEANUP
1096
1097 AT_SETUP([OFPST_QUEUE request - OF1.1])
1098 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1099 AT_CHECK([ovs-ofctl ofp-print "\
1100 02 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
1101 ff ff ff fc ff ff ff ff \
1102 "], [0], [dnl
1103 OFPST_QUEUE request (OF1.1) (xid=0x2):port=ALL queue=ALL
1104 ])
1105 AT_CLEANUP
1106
1107 AT_SETUP([OFPST_QUEUE request - OF1.2])
1108 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1109 AT_CHECK([ovs-ofctl ofp-print "\
1110 03 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
1111 ff ff ff fc ff ff ff ff \
1112 "], [0], [dnl
1113 OFPST_QUEUE request (OF1.2) (xid=0x2):port=ALL queue=ALL
1114 ])
1115 AT_CLEANUP
1116
1117 AT_SETUP([OFPST_QUEUE reply - OF1.0])
1118 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1119 AT_CHECK([ovs-ofctl ofp-print "\
1120 01 11 00 cc 00 00 00 01 00 05 00 00 00 03 00 00 \
1121 00 00 00 01 00 00 00 00 00 00 01 2e 00 00 00 00 \
1122 00 00 00 01 00 00 00 00 00 00 00 00 00 03 00 00 \
1123 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
1124 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
1125 00 00 00 01 00 00 00 00 00 00 08 34 00 00 00 00 \
1126 00 00 00 14 00 00 00 00 00 00 00 00 00 02 00 00 \
1127 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
1128 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
1129 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 \
1130 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
1131 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
1132 00 00 00 00 00 00 00 00 00 00 00 00 \
1133 "], [0], [dnl
1134 OFPST_QUEUE reply (xid=0x1): 6 queues
1135   port 3 queue 1: bytes=302, pkts=1, errors=0
1136   port 3 queue 2: bytes=0, pkts=0, errors=0
1137   port 2 queue 1: bytes=2100, pkts=20, errors=0
1138   port 2 queue 2: bytes=0, pkts=0, errors=0
1139   port 1 queue 1: bytes=0, pkts=0, errors=0
1140   port 1 queue 2: bytes=0, pkts=0, errors=0
1141 ])
1142 AT_CLEANUP
1143
1144 AT_SETUP([OFPST_PORT_DESC request - OF1.0])
1145 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1146 AT_CHECK([ovs-ofctl ofp-print "0110000c00000001000d0000"], [0], [dnl
1147 OFPST_PORT_DESC request (xid=0x1):
1148 ])
1149 AT_CLEANUP
1150
1151 AT_SETUP([OFPST_QUEUE reply - OF1.1])
1152 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1153 AT_CHECK([ovs-ofctl ofp-print "\
1154 02 13 00 d0 00 00 00 01 00 05 00 00 00 00 00 00 \
1155 00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
1156 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
1157 00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
1158 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1159 00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
1160 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
1161 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
1162 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1163 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
1164 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1165 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
1166 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1167 "], [0], [dnl
1168 OFPST_QUEUE reply (OF1.1) (xid=0x1): 6 queues
1169   port 3 queue 1: bytes=302, pkts=1, errors=0
1170   port 3 queue 2: bytes=0, pkts=0, errors=0
1171   port 2 queue 1: bytes=2100, pkts=20, errors=0
1172   port 2 queue 2: bytes=0, pkts=0, errors=0
1173   port 1 queue 1: bytes=0, pkts=0, errors=0
1174   port 1 queue 2: bytes=0, pkts=0, errors=0
1175 ])
1176 AT_CLEANUP
1177
1178 AT_SETUP([OFPST_QUEUE reply - OF1.2])
1179 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1180 AT_CHECK([ovs-ofctl ofp-print "\
1181 03 13 00 d0 00 00 00 01 00 05 00 00 00 00 00 00 \
1182 00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
1183 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
1184 00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
1185 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1186 00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
1187 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
1188 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
1189 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1190 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
1191 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1192 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
1193 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1194 "], [0], [dnl
1195 OFPST_QUEUE reply (OF1.2) (xid=0x1): 6 queues
1196   port 3 queue 1: bytes=302, pkts=1, errors=0
1197   port 3 queue 2: bytes=0, pkts=0, errors=0
1198   port 2 queue 1: bytes=2100, pkts=20, errors=0
1199   port 2 queue 2: bytes=0, pkts=0, errors=0
1200   port 1 queue 1: bytes=0, pkts=0, errors=0
1201   port 1 queue 2: bytes=0, pkts=0, errors=0
1202 ])
1203 AT_CLEANUP
1204
1205 AT_SETUP([OFPST_PORT_DESC reply - OF1.0])
1206 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1207 AT_CHECK([ovs-ofctl ofp-print "\
1208 01 11 00 3c 00 00 00 00 00 0d 00 00 00 03 50 54 \
1209 00 00 00 01 65 74 68 30 00 00 00 00 00 00 00 00 \
1210 00 00 00 00 00 00 00 01 00 00 00 01 00 00 02 08 \
1211 00 00 02 8f 00 00 02 8f 00 00 00 00 \
1212 "], [0], [dnl
1213 OFPST_PORT_DESC reply (xid=0x0):
1214  3(eth0): addr:50:54:00:00:00:01
1215      config:     PORT_DOWN
1216      state:      LINK_DOWN
1217      current:    100MB-FD AUTO_NEG
1218      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
1219      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
1220      speed: 100 Mbps now, 100 Mbps max
1221 ])
1222 AT_CLEANUP
1223
1224 AT_SETUP([OFPT_BARRIER_REQUEST - OF1.0])
1225 AT_KEYWORDS([ofp-print])
1226 AT_CHECK([ovs-ofctl ofp-print '01 12 00 08 00 00 00 01'], [0], [dnl
1227 OFPT_BARRIER_REQUEST (xid=0x1):
1228 ])
1229 AT_CLEANUP
1230
1231 AT_SETUP([OFPT_BARRIER_REQUEST - OF1.1])
1232 AT_KEYWORDS([ofp-print])
1233 AT_CHECK([ovs-ofctl ofp-print '02 14 00 08 00 00 00 01'], [0], [dnl
1234 OFPT_BARRIER_REQUEST (OF1.1) (xid=0x1):
1235 ])
1236 AT_CLEANUP
1237
1238 AT_SETUP([OFPT_BARRIER_REQUEST - OF1.2])
1239 AT_KEYWORDS([ofp-print])
1240 AT_CHECK([ovs-ofctl ofp-print '03 14 00 08 00 00 00 01'], [0], [dnl
1241 OFPT_BARRIER_REQUEST (OF1.2) (xid=0x1):
1242 ])
1243 AT_CLEANUP
1244
1245 AT_SETUP([OFPT_BARRIER_REPLY - OF1.0])
1246 AT_KEYWORDS([ofp-print])
1247 AT_CHECK([ovs-ofctl ofp-print '01 13 00 08 00 00 00 01'], [0], [dnl
1248 OFPT_BARRIER_REPLY (xid=0x1):
1249 ])
1250 AT_CLEANUP
1251
1252 AT_SETUP([OFPT_BARRIER_REPLY] - OF1.1)
1253 AT_KEYWORDS([ofp-print])
1254 AT_CHECK([ovs-ofctl ofp-print '02 15 00 08 00 00 00 01'], [0], [dnl
1255 OFPT_BARRIER_REPLY (OF1.1) (xid=0x1):
1256 ])
1257 AT_CLEANUP
1258
1259 AT_SETUP([OFPT_BARRIER_REPLY] - OF1.2)
1260 AT_KEYWORDS([ofp-print])
1261 AT_CHECK([ovs-ofctl ofp-print '03 15 00 08 00 00 00 01'], [0], [dnl
1262 OFPT_BARRIER_REPLY (OF1.2) (xid=0x1):
1263 ])
1264 AT_CLEANUP
1265
1266 AT_SETUP([NXT_ROLE_REQUEST])
1267 AT_KEYWORDS([ofp-print])
1268 AT_CHECK([ovs-ofctl ofp-print "\
1269 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0a \
1270 00 00 00 01 \
1271 "], [0], [dnl
1272 NXT_ROLE_REQUEST (xid=0x2): role=master
1273 ])
1274 AT_CLEANUP
1275
1276 AT_SETUP([NXT_ROLE_REPLY])
1277 AT_KEYWORDS([ofp-print])
1278 AT_CHECK([ovs-ofctl ofp-print "\
1279 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0b \
1280 00 00 00 02 \
1281 "], [0], [dnl
1282 NXT_ROLE_REPLY (xid=0x2): role=slave
1283 ])
1284 AT_CLEANUP
1285
1286 AT_SETUP([NXT_SET_PACKET_IN])
1287 AT_KEYWORDS([ofp-print])
1288 AT_CHECK([ovs-ofctl ofp-print "\
1289 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 10 \
1290 00 00 00 01 \
1291 "], [0], [dnl
1292 NXT_SET_PACKET_IN_FORMAT (xid=0x2): format=nxm
1293 ])
1294 AT_CLEANUP
1295
1296 AT_SETUP([NXT_PACKET_IN])
1297 AT_KEYWORDS([ofp-print])
1298 AT_CHECK([ovs-ofctl ofp-print "\
1299 01 04 00 ba 00 00 00 00 00 00 23 20 00 00 00 11 \
1300 ff ff ff ff 00 40 01 07 00 00 00 00 00 00 00 09 \
1301 00 4e 00 00 00 00 00 00 00 00 00 02 00 01 00 01 \
1302 20 08 00 00 00 00 00 00 00 06 00 01 00 04 00 00 \
1303 00 01 00 01 02 04 00 00 00 02 00 01 04 04 00 00 \
1304 00 03 00 01 06 04 00 00 00 04 00 01 08 04 00 00 \
1305 00 05 80 00 05 10 5a 5a 5a 5a 5a 5a 5a 5a ff ff \
1306 ff ff ff ff ff ff 00 00 00 00 82 82 82 82 82 82 \
1307 80 81 81 81 81 81 81 00 00 50 08 00 45 00 00 28 \
1308 00 00 00 00 00 06 32 05 53 53 53 53 54 54 54 54 \
1309 00 55 00 56 00 00 00 00 00 00 00 00 50 00 00 00 \
1310 31 6d 00 00 00 00 00 00 00 00 \
1311 "], [0], [dnl
1312 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 in_port=1 tun_id=0x6 metadata=0x5a5a5a5a5a5a5a5a reg0=0x1 reg1=0x2 reg2=0x3 reg3=0x4 reg4=0x5 (via action) data_len=64 (unbuffered)
1313 priority=0,tcp,metadata=0,in_port=0,dl_vlan=80,dl_vlan_pcp=0,dl_src=80:81:81:81:81:81,dl_dst=82:82:82:82:82:82,nw_src=83.83.83.83,nw_dst=84.84.84.84,nw_tos=0,nw_ecn=0,nw_ttl=0,tp_src=85,tp_dst=86 tcp_csum:316d
1314 ])
1315 AT_CLEANUP
1316
1317 AT_SETUP([NXT_SET_ASYNC_CONFIG])
1318 AT_KEYWORDS([ofp-print])
1319 AT_CHECK([ovs-ofctl ofp-print "\
1320 01 04 00 28 00 00 00 00 00 00 23 20 00 00 00 13 \
1321 00 00 10 05 00 00 10 07 00 00 00 03 00 00 00 07 \
1322 00 00 00 00 00 00 00 03 \
1323 "], [0], [dnl
1324 NXT_SET_ASYNC_CONFIG (xid=0x0):
1325  master:
1326        PACKET_IN: no_match invalid_ttl 12
1327      PORT_STATUS: add delete
1328     FLOW_REMOVED: (off)
1329
1330  slave:
1331        PACKET_IN: no_match action invalid_ttl 12
1332      PORT_STATUS: add delete modify
1333     FLOW_REMOVED: idle hard
1334 ])
1335 AT_CLEANUP
1336
1337 AT_SETUP([NXT_SET_CONTROLLER_ID])
1338 AT_KEYWORDS([ofp-print])
1339 AT_CHECK([ovs-ofctl ofp-print "\
1340 01 04 00 18 00 00 00 03 00 00 23 20 00 00 00 14 \
1341 00 00 00 00 00 00 00 7b \
1342 "], [0], [dnl
1343 NXT_SET_CONTROLLER_ID (xid=0x3): id=123
1344 ])
1345 AT_CLEANUP
1346
1347 AT_SETUP([NXT_FLOW_MONITOR_CANCEL])
1348 AT_KEYWORDS([ofp-print])
1349 AT_CHECK([ovs-ofctl ofp-print "\
1350 01 04 00 14 00 00 00 03 00 00 23 20 00 00 00 15 \
1351 01 02 30 40 \
1352 "], [0], [dnl
1353 NXT_FLOW_MONITOR_CANCEL (xid=0x3): id=16920640
1354 ])
1355 AT_CLEANUP
1356
1357 AT_SETUP([NXT_FLOW_MONITOR_PAUSED])
1358 AT_KEYWORDS([ofp-print])
1359 AT_CHECK([ovs-ofctl ofp-print "\
1360 01 04 00 10 00 00 00 03 00 00 23 20 00 00 00 16 \
1361 "], [0], [dnl
1362 NXT_FLOW_MONITOR_PAUSED (xid=0x3):
1363 ])
1364 AT_CLEANUP
1365
1366 AT_SETUP([NXT_FLOW_MONITOR_RESUMED])
1367 AT_KEYWORDS([ofp-print])
1368 AT_CHECK([ovs-ofctl ofp-print "\
1369 01 04 00 10 00 00 00 03 00 00 23 20 00 00 00 17 \
1370 "], [0], [dnl
1371 NXT_FLOW_MONITOR_RESUMED (xid=0x3):
1372 ])
1373 AT_CLEANUP
1374
1375 AT_SETUP([NXT_SET_FLOW_FORMAT])
1376 AT_KEYWORDS([ofp-print])
1377 AT_CHECK([ovs-ofctl ofp-print "\
1378 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0c \
1379 00 00 00 02 \
1380 "], [0], [dnl
1381 NXT_SET_FLOW_FORMAT (xid=0x2): format=nxm
1382 ])
1383 AT_CLEANUP
1384
1385 # The flow is formatted with cls_rule_format() for the low-verbosity case.
1386 AT_SETUP([NXT_FLOW_MOD, low verbosity])
1387 AT_KEYWORDS([ofp-print])
1388 AT_CHECK([ovs-ofctl ofp-print "\
1389 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
1390 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
1391 ff ff ff ff 00 10 00 00 00 14 00 00 00 00 00 00 \
1392 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
1393 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
1394 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
1395 " 2], [0], [dnl
1396 NXT_FLOW_MOD (xid=0x2): ADD reg0=0x7b,tun_id=0x1c8 out_port:16 actions=load:0x5->NXM_NX_REG0[[]]
1397 ])
1398 AT_CLEANUP
1399
1400 # The flow is formatted with ofp10_match_to_string() for the
1401 # low-verbosity case.
1402 AT_SETUP([NXT_FLOW_MOD, high verbosity])
1403 AT_KEYWORDS([ofp-print])
1404 AT_CHECK([ovs-ofctl ofp-print "\
1405 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
1406 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
1407 ff ff ff ff 01 00 00 00 00 14 00 00 00 00 00 00 \
1408 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
1409 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
1410 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
1411 " 3], [0], [dnl
1412 NXT_FLOW_MOD (xid=0x2): ADD NXM_NX_TUN_ID(00000000000001c8), NXM_NX_REG0(0000007b) out_port:256 actions=load:0x5->NXM_NX_REG0[[]]
1413 ])
1414 AT_CLEANUP
1415
1416 AT_SETUP([NXT_FLOW_REMOVED])
1417 AT_KEYWORDS([ofp-print])
1418 AT_CHECK([ovs-ofctl ofp-print "\
1419 01 04 00 78 00 00 00 00 00 00 23 20 00 00 00 0e \
1420 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 06 \
1421 01 6e 36 00 00 05 00 3c 00 00 00 00 00 00 00 01 \
1422 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
1423 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
1424 00 05 00 00 06 02 08 06 00 00 08 02 00 00 00 00 \
1425 1e 02 00 02 00 00 20 04 c0 a8 00 01 00 00 22 04 \
1426 c0 a8 00 02 00 00 00 00 \
1427 "], [0], [dnl
1428 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,arp_spa=192.168.0.1,arp_tpa=192.168.0.2,arp_op=2 reason=idle duration6.024s idle5 pkts1 bytes60
1429 ])
1430 AT_CLEANUP
1431
1432 AT_SETUP([NXT_FLOW_MOD_TABLE_ID])
1433 AT_KEYWORDS([ofp-print])
1434 AT_CHECK([ovs-ofctl ofp-print "\
1435 01 04 00 18 01 02 03 04 00 00 23 20 00 00 00 0f \
1436 01 00 00 00 00 00 00 00 \
1437 "], [0], [dnl
1438 NXT_FLOW_MOD_TABLE_ID (xid=0x1020304): enable
1439 ])
1440 AT_CLEANUP
1441
1442 AT_SETUP([NXST_FLOW request])
1443 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1444 AT_CHECK([ovs-ofctl ofp-print "\
1445 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
1446 00 00 00 00 00 00 00 00 ff ff 00 00 ff 00 00 00 \
1447 "], [0], [dnl
1448 NXST_FLOW request (xid=0x4): @&t@
1449 ])
1450 AT_CLEANUP
1451
1452 AT_SETUP([NXST_FLOW reply])
1453 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1454 AT_CHECK([ovs-ofctl ofp-print "\
1455 01 11 08 18 00 00 00 04 ff ff 00 00 00 00 23 20 \
1456 00 00 00 00 00 00 00 00 00 88 00 00 00 00 00 01 \
1457 02 dc 6c 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
1458 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
1459 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
1460 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
1461 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
1462 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
1463 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e7 00 00 \
1464 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
1465 00 88 00 00 00 00 00 03 32 11 62 00 ff ff 00 05 \
1466 00 00 00 4c 00 03 00 00 00 00 00 00 00 00 00 00 \
1467 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
1468 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
1469 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
1470 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
1471 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
1472 00 00 12 02 09 e4 00 00 14 02 00 00 00 00 00 00 \
1473 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
1474 33 f9 aa 00 ff ff 00 05 00 00 00 4c 00 05 00 00 \
1475 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
1476 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
1477 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
1478 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
1479 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
1480 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
1481 14 02 09 e5 00 00 00 00 00 00 00 08 00 03 00 00 \
1482 00 88 00 00 00 00 00 04 2d 0f a5 00 ff ff 00 05 \
1483 00 00 00 4c 00 01 00 00 00 00 00 00 00 00 00 00 \
1484 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
1485 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
1486 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
1487 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
1488 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
1489 00 00 12 02 09 e3 00 00 14 02 00 00 00 00 00 00 \
1490 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
1491 34 73 bc 00 ff ff 00 05 00 0a 00 4c 00 03 00 03 \
1492 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
1493 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
1494 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
1495 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
1496 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
1497 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e5 00 00 \
1498 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
1499 00 88 00 00 00 00 00 05 28 0d e8 00 ff ff 00 05 \
1500 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
1501 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
1502 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
1503 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
1504 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
1505 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
1506 00 00 12 02 09 e2 00 00 14 02 00 00 00 00 00 00 \
1507 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 01 \
1508 02 62 5a 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
1509 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
1510 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
1511 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
1512 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
1513 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
1514 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
1515 14 02 09 e7 00 00 00 00 00 00 00 08 00 03 00 00 \
1516 00 88 00 00 00 00 00 01 38 be 5e 00 ff ff 00 05 \
1517 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
1518 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
1519 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
1520 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
1521 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
1522 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
1523 00 00 12 02 00 00 00 00 14 02 09 e6 00 00 00 00 \
1524 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 04 \
1525 27 d0 df 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
1526 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
1527 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
1528 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
1529 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
1530 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
1531 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
1532 14 02 09 e3 00 00 00 00 00 00 00 08 00 03 00 00 \
1533 00 88 00 00 00 00 00 03 2c d2 9c 00 ff ff 00 05 \
1534 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
1535 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
1536 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
1537 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
1538 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
1539 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
1540 00 00 12 02 00 00 00 00 14 02 09 e4 00 00 00 00 \
1541 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
1542 0a 40 83 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
1543 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
1544 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
1545 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
1546 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
1547 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
1548 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e8 00 00 \
1549 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
1550 00 88 00 00 00 00 00 05 25 31 7c 00 ff ff 00 05 \
1551 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
1552 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
1553 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
1554 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
1555 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
1556 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
1557 00 00 12 02 00 00 00 00 14 02 09 e2 00 00 00 00 \
1558 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
1559 04 c4 b4 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
1560 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
1561 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
1562 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
1563 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
1564 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
1565 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
1566 14 02 09 e8 00 00 00 00 00 00 00 08 00 03 00 00 \
1567 00 88 00 00 00 00 00 01 39 38 70 00 ff ff 00 05 \
1568 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
1569 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
1570 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
1571 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
1572 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
1573 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
1574 00 00 12 02 09 e6 00 00 14 02 00 00 00 00 00 00 \
1575 00 00 00 08 00 01 00 00 00 60 00 00 00 00 00 e4 \
1576 2e 7d db 00 80 00 00 00 00 00 00 14 00 00 00 00 \
1577 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1578 00 00 00 00 00 00 00 00 00 01 20 08 00 00 00 00 \
1579 00 00 01 c8 00 01 00 04 00 00 00 7b 00 00 00 00 \
1580 ff ff 00 18 00 00 23 20 00 07 00 1f 00 01 00 04 \
1581 00 00 00 00 00 00 00 05 \
1582 00 30 01 00 00 00 0e 10 00 07 a1 20 80 00 00 00 \
1583 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1584 00 00 00 00 00 00 00 64 00 00 00 00 00 00 19 00 \
1585 "], [0],
1586 [[NXST_FLOW reply (xid=0x4):
1587  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
1588  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
1589  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
1590  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
1591  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
1592  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
1593  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
1594  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
1595  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
1596  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
1597  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
1598  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
1599  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
1600  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
1601  cookie=0x0, duration=228.78s, table=0, n_packets=0, n_bytes=0, reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[]
1602  cookie=0x0, duration=3600.0005s, table=1, n_packets=100, n_bytes=6400, actions=drop
1603 ]])
1604 AT_CLEANUP
1605
1606 AT_SETUP([NXST_AGGREGATE request])
1607 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1608 AT_CHECK([ovs-ofctl ofp-print "\
1609 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
1610 00 00 00 01 00 00 00 00 ff ff 00 00 ff 00 00 00 \
1611 "], [0], [dnl
1612 NXST_AGGREGATE request (xid=0x4): @&t@
1613 ])
1614 AT_CLEANUP
1615
1616 AT_SETUP([NXST_AGGREGATE reply])
1617 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1618 AT_CHECK([ovs-ofctl ofp-print "\
1619 01 11 00 30 00 00 00 04 ff ff 00 00 00 00 23 20 \
1620 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 07 \
1621 00 00 00 00 00 00 01 a4 00 00 00 07 00 00 00 00 \
1622 "], [0], [dnl
1623 NXST_AGGREGATE reply (xid=0x4): packet_count=7 byte_count=420 flow_count=7
1624 ])
1625 AT_CLEANUP
1626
1627 AT_SETUP([NXST_FLOW_MONITOR request])
1628 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1629 AT_CHECK([ovs-ofctl ofp-print "\
1630 01 10 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 02 00 00 00 00 \
1631 00 00 40 00 00 3f ff fe 00 00 01 00 00 00 00 00 \
1632 00 00 20 00 00 04 ff ff 00 06 02 00 00 00 00 00 00 00 00 02 00 01 00 00 \
1633 "], [0], [dnl
1634 NXST_FLOW_MONITOR request (xid=0x4):
1635  id=16384 flags=initial,add,delete,modify,actions,own out_port=LOCAL table=1
1636  id=8192 flags=delete table=2 in_port=1
1637 ])
1638 AT_CLEANUP
1639
1640 AT_SETUP([NXST_FLOW_MONITOR reply])
1641 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1642 AT_CHECK([ovs-ofctl ofp-print "\
1643 01 11 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 02 00 00 00 00 \
1644 00 20 00 01 00 04 80 00 00 05 00 10 00 06 01 00 12 34 56 78 9a bc de f0 \
1645 00 00 00 02 00 01 00 00 \
1646 00 08 00 03 00 01 86 a0 \
1647 "], [0], [dnl
1648 NXST_FLOW_MONITOR reply (xid=0x4):
1649  event=DELETED reason=eviction table=1 idle_timeout=5 hard_timeout=16 cookie=0x123456789abcdef0 in_port=1
1650  event=ABBREV xid=0x186a0
1651 ])
1652 AT_CLEANUP