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