ofp-util: Report OFPMMFC_BAD_BAND for bad band type in meter mod decoding.
[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 AT_SETUP([OFPT_HELLO with higher than supported version])
88 AT_KEYWORDS([ofp-print])
89 AT_CHECK([ovs-ofctl ofp-print "0f 00 00 08 00 00 00 00"], [0],
90 [dnl
91 OFPT_HELLO (OF 0x0f) (xid=0x0):
92  version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f
93 ])
94 AT_CHECK([ovs-ofctl ofp-print "40 00 00 08 00 00 00 00"], [0],
95 [dnl
96 OFPT_HELLO (OF 0x40) (xid=0x0):
97  version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
98 ])
99 AT_CHECK([ovs-ofctl ofp-print "3f 00 00 18 00 00 00 00 00 01 00 0c aa aa aa aa aa aa aa aa 00 00 00 00"], [0],
100 [dnl
101 OFPT_HELLO (OF 0x3f) (xid=0x0):
102  version bitmap: 0x01, 0x03, 0x05, 0x07, 0x09, 0x0b, 0x0d, 0x0f, 0x11, 0x13, 0x15, 0x17, 0x19, 0x1b, 0x1d, 0x1f
103 ])
104 AT_CLEANUP
105
106 AT_SETUP([OFPT_HELLO with contradictory version bitmaps])
107 AT_KEYWORDS([ofp-print])
108 dnl Bitmap claims support for no versions at all.
109 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 00"], [0],
110 [OFPT_HELLO (xid=0x0):
111  version bitmap: 0x01
112  unknown data in hello:
113 00000000  01 00 00 10 00 00 00 00-00 01 00 08 00 00 00 00 |................|
114 ], [dnl
115 ofp_util|WARN|peer does not support any OpenFlow version (between 0x01 and 0x1f)
116 ])
117 dnl Bitmap claims support for only versions above 0x1f.
118 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "3f 00 00 18 00 00 00 00 00 01 00 0c 00 00 00 00 aa aa aa aa 00 00 00 00"], [0],
119 [OFPT_HELLO (OF 0x3f) (xid=0x0):
120  version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f
121  unknown data in hello:
122 00000000  3f 00 00 18 00 00 00 00-00 01 00 0c 00 00 00 00 |?...............|
123 00000010  aa aa aa aa 00 00 00 00-                        |........        |
124 ], [dnl
125 ofp_util|WARN|peer does not support any OpenFlow version (between 0x01 and 0x1f)
126 ])
127 dnl Bitmap claims support for nonexistent version 0x00.
128 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 f1"], [0], [dnl
129 OFPT_HELLO (xid=0x0):
130  version bitmap: 0x04, 0x05, 0x06, 0x07
131 ], [dnl
132 ofp_util|WARN|peer claims to support invalid OpenFlow version 0x00
133 ])
134 dnl Bitmap claims support for only nonexistent version 0x00.
135 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "01 00 00 10 00 00 00 00 00 01 00 08 00 00 00 01"], [0], [dnl
136 OFPT_HELLO (xid=0x0):
137  version bitmap: 0x01
138  unknown data in hello:
139 00000000  01 00 00 10 00 00 00 00-00 01 00 08 00 00 00 01 |................|
140 ], [dnl
141 ofp_util|WARN|peer claims to support invalid OpenFlow version 0x00
142 ofp_util|WARN|peer does not support any OpenFlow version (between 0x01 and 0x1f)
143 ])
144 AT_CLEANUP
145
146 dnl OFPT_ERROR tests are in ofp-errors.at.
147
148 AT_SETUP([OFPT_ECHO_REQUEST, empty payload])
149 AT_KEYWORDS([ofp-print])
150 AT_CHECK([ovs-ofctl ofp-print '01 02 00 08 00 00 00 01'], [0], [dnl
151 OFPT_ECHO_REQUEST (xid=0x1): 0 bytes of payload
152 ])
153 AT_CLEANUP
154
155 AT_SETUP([OFPT_ECHO_REQUEST, 5-byte payload])
156 AT_KEYWORDS([ofp-print])
157 AT_CHECK([ovs-ofctl ofp-print '0102000d00000001 25 53 54 1a 9d'], [0], [dnl
158 OFPT_ECHO_REQUEST (xid=0x1): 5 bytes of payload
159 00000000  25 53 54 1a 9d                                  |%ST..           |
160 ])
161 AT_CLEANUP
162
163 AT_SETUP([OFPT_ECHO_REPLY, empty payload])
164 AT_KEYWORDS([ofp-print])
165 AT_CHECK([ovs-ofctl ofp-print '01 03 00 08 00 00 00 01'], [0], [dnl
166 OFPT_ECHO_REPLY (xid=0x1): 0 bytes of payload
167 ])
168 AT_CLEANUP
169
170 AT_SETUP([OFPT_ECHO_REPLY, 5-byte payload])
171 AT_KEYWORDS([ofp-print])
172 AT_CHECK([ovs-ofctl ofp-print '0103000d0000000ba330efaf9e'], [0], [dnl
173 OFPT_ECHO_REPLY (xid=0xb): 5 bytes of payload
174 00000000  a3 30 ef af 9e                                  |.0...           |
175 ])
176 AT_CLEANUP
177
178 AT_SETUP([OFPT_FEATURES_REQUEST])
179 AT_KEYWORDS([ofp-print])
180 AT_CHECK([ovs-ofctl ofp-print '0105000800000001'], [0], [dnl
181 OFPT_FEATURES_REQUEST (xid=0x1):
182 ])
183 AT_CLEANUP
184
185 AT_SETUP([OFPT_FEATURES_REPLY - OF1.0])
186 AT_KEYWORDS([ofp-print])
187 AT_CHECK([ovs-ofctl ofp-print "\
188 01 06 00 e0 00 00 00 01 00 00 50 54 00 00 00 01 \
189 00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
190 ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
191 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
192 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
193 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
194 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
195 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
196 00 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
197 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
198 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
199 00 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
201 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
202 "], [0], [dnl
203 OFPT_FEATURES_REPLY (xid=0x1): dpid:0000505400000001
204 n_tables:2, n_buffers:256
205 capabilities: FLOW_STATS TABLE_STATS PORT_STATS ARP_MATCH_IP
206 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
207  1(eth1): addr:50:54:00:00:00:02
208      config:     0
209      state:      0
210      current:    100MB-FD AUTO_NEG
211      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
212      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
213      speed: 100 Mbps now, 100 Mbps max
214  2(eth2): addr:50:54:00:00:00:03
215      config:     0
216      state:      0
217      current:    100MB-FD AUTO_NEG
218      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
219      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
220      speed: 100 Mbps now, 100 Mbps max
221  3(eth0): addr:50:54:00:00:00:01
222      config:     0
223      state:      0
224      current:    100MB-FD AUTO_NEG
225      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
226      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
227      speed: 100 Mbps now, 100 Mbps max
228  LOCAL(br0): addr:50:54:00:00:00:01
229      config:     PORT_DOWN
230      state:      LINK_DOWN
231      speed: 0 Mbps now, 0 Mbps max
232 ])
233 AT_CLEANUP
234
235 AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.0])
236 AT_KEYWORDS([ofp-print])
237 AT_CHECK([ovs-ofctl ofp-print "\
238 01 06 00 dc 00 00 00 01 00 00 50 54 00 00 00 01 \
239 00 00 01 00 02 00 00 00 00 00 00 87 00 00 0f ff \
240 ff fe 50 54 00 00 00 01 62 72 30 00 00 00 00 00 \
241 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
242 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
243 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
244 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
245 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
246 00 02 50 54 00 00 00 03 65 74 68 32 00 00 00 00 \
247 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
248 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
249 00 01 50 54 00 00 00 02 65 74 68 31 00 00 00 00 \
250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
251 00 00 02 08 00 00 02 8f 00 00 02 8f \
252 "], [0], [dnl
253 ***decode error: OFPBRC_BAD_LEN***
254 00000000  01 06 00 dc 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
255 00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 0f ff |................|
256 00000020  ff fe 50 54 00 00 00 01-62 72 30 00 00 00 00 00 |..PT....br0.....|
257 00000030  00 00 00 00 00 00 00 00-00 00 00 01 00 00 00 01 |................|
258 00000040  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
259 00000050  00 03 50 54 00 00 00 01-65 74 68 30 00 00 00 00 |..PT....eth0....|
260 00000060  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
261 00000070  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
262 00000080  00 02 50 54 00 00 00 03-65 74 68 32 00 00 00 00 |..PT....eth2....|
263 00000090  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
264 000000a0  00 00 02 08 00 00 02 8f-00 00 02 8f 00 00 00 00 |................|
265 000000b0  00 01 50 54 00 00 00 02-65 74 68 31 00 00 00 00 |..PT....eth1....|
266 000000c0  00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |................|
267 000000d0  00 00 02 08 00 00 02 8f-00 00 02 8f             |............    |
268 ], [stderr])
269 AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
270 received OFPT_FEATURES_REPLY with incorrect length 220 (must be exactly 32 bytes or longer by an integer multiple of 48 bytes)
271 ])
272 AT_CLEANUP
273
274 AT_SETUP([OFPT_FEATURES_REPLY - OF1.1])
275 AT_KEYWORDS([ofp-print])
276 AT_CHECK([ovs-ofctl ofp-print "\
277 02 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
278 00 00 01 00 02 00 00 00 00 00 00 87 00 00 00 00 \
279 ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
280 62 72 30 00 00 00 00 00 00 00 00 00 00 00 00 00 \
281 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
282 00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
283 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
284 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
285 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
286 00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
287 "], [0], [dnl
288 OFPT_FEATURES_REPLY (OF1.1) (xid=0x1): dpid:0000505400000001
289 n_tables:2, n_buffers:256
290 capabilities: FLOW_STATS TABLE_STATS PORT_STATS ARP_MATCH_IP
291  3(eth0): addr:50:54:00:00:00:01
292      config:     0
293      state:      0
294      current:    100MB-FD AUTO_NEG
295      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
296      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
297      speed: 100 Mbps now, 100 Mbps max
298  LOCAL(br0): addr:50:54:00:00:00:01
299      config:     PORT_DOWN
300      state:      LINK_DOWN
301      speed: 100 Mbps now, 100 Mbps max
302 ])
303 AT_CLEANUP
304
305 AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.1])
306 AT_KEYWORDS([ofp-print])
307 AT_CHECK([ovs-ofctl ofp-print "\
308 02 06 00 90 00 00 00 01 00 00 50 54 00 00 00 01 \
309 00 00 01 00 02 00 00 00 00 00 00 87 00 00 00 00 \
310 ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
311 62 72 30 00 00 00 00 00 00 00 00 00 00 00 00 00 \
312 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
313 00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
314 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
315 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
316 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
317 "], [0], [dnl
318 ***decode error: OFPBRC_BAD_LEN***
319 00000000  02 06 00 90 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
320 00000010  00 00 01 00 02 00 00 00-00 00 00 87 00 00 00 00 |................|
321 00000020  ff ff ff fe 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
322 00000030  62 72 30 00 00 00 00 00-00 00 00 00 00 00 00 00 |br0.............|
323 00000040  00 00 00 01 00 00 00 01-00 00 00 00 00 00 00 00 |................|
324 00000050  00 00 00 00 00 00 00 00-00 01 86 a0 00 01 86 a0 |................|
325 00000060  00 00 00 03 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
326 00000070  65 74 68 30 00 00 00 00-00 00 00 00 00 00 00 00 |eth0............|
327 00000080  00 00 00 00 00 00 00 00-00 00 20 08 00 00 28 0f |.......... ...@{:@.|
328 ], [stderr])
329 AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
330 received OFPT_FEATURES_REPLY with incorrect length 144 (must be exactly 32 bytes or longer by an integer multiple of 64 bytes)
331 ])
332 AT_CLEANUP
333
334 AT_SETUP([OFPT_FEATURES_REPLY - OF1.2])
335 AT_KEYWORDS([ofp-print])
336 AT_CHECK([ovs-ofctl ofp-print "\
337 03 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
338 00 00 01 00 ff 00 00 00 00 00 01 77 00 00 00 00 \
339 ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
340 62 72 30 0a 00 00 00 00 00 00 00 00 00 00 00 00 \
341 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
342 00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
343 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
344 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
345 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
346 00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
347 "], [0], [dnl
348 OFPT_FEATURES_REPLY (OF1.2) (xid=0x1): dpid:0000505400000001
349 n_tables:255, n_buffers:256
350 capabilities: FLOW_STATS TABLE_STATS PORT_STATS IP_REASM QUEUE_STATS PORT_BLOCKED
351  3(eth0): addr:50:54:00:00:00:01
352      config:     0
353      state:      0
354      current:    100MB-FD AUTO_NEG
355      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
356      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
357      speed: 100 Mbps now, 100 Mbps max
358  LOCAL(br0): addr:50:54:00:00:00:01
359      config:     PORT_DOWN
360      state:      LINK_DOWN
361      speed: 100 Mbps now, 100 Mbps max
362 ])
363 AT_CLEANUP
364
365 AT_SETUP([OFPT_FEATURES_REPLY cut off mid-port - OF1.2])
366 AT_KEYWORDS([ofp-print])
367 AT_CHECK([ovs-ofctl ofp-print "\
368 03 06 00 a0 00 00 00 01 00 00 50 54 00 00 00 01 \
369 00 00 01 00 ff 00 00 00 00 00 01 77 00 00 00 00 \
370 ff ff ff fe 00 00 00 00 50 54 00 00 00 01 00 00 \
371 62 72 30 0a 00 00 00 00 00 00 00 00 00 00 00 00 \
372 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
373 00 00 00 00 00 00 00 00 00 01 86 a0 00 01 86 a0 \
374 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
375 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
376 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
377 "], [0], [dnl
378 OFPT_FEATURES_REPLY (OF1.2) (xid=0x1):
379 (***truncated to 144 bytes from 160***)
380 00000000  03 06 00 a0 00 00 00 01-00 00 50 54 00 00 00 01 |..........PT....|
381 00000010  00 00 01 00 ff 00 00 00-00 00 01 77 00 00 00 00 |...........w....|
382 00000020  ff ff ff fe 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
383 00000030  62 72 30 0a 00 00 00 00-00 00 00 00 00 00 00 00 |br0.............|
384 00000040  00 00 00 01 00 00 00 01-00 00 00 00 00 00 00 00 |................|
385 00000050  00 00 00 00 00 00 00 00-00 01 86 a0 00 01 86 a0 |................|
386 00000060  00 00 00 03 00 00 00 00-50 54 00 00 00 01 00 00 |........PT......|
387 00000070  65 74 68 30 00 00 00 00-00 00 00 00 00 00 00 00 |eth0............|
388 00000080  00 00 00 00 00 00 00 00-00 00 20 08 00 00 28 0f |.......... ...@{:@.|
389 ], [stderr])
390 AT_CHECK([sed 's/.*|//' stderr], [0], [dnl
391 ])
392 AT_CLEANUP
393
394 AT_SETUP([OFPT_FEATURES_REPLY - OF1.3])
395 AT_KEYWORDS([ofp-print])
396 AT_CHECK([ovs-ofctl ofp-print "\
397 04 06 00 20 00 00 00 01 00 00 50 54 00 00 00 01 \
398 00 00 01 00 ff 00 00 00 00 00 01 77 00 00 00 00 \
399 "], [0], [dnl
400 OFPT_FEATURES_REPLY (OF1.3) (xid=0x1): dpid:0000505400000001
401 n_tables:255, n_buffers:256
402 capabilities: FLOW_STATS TABLE_STATS PORT_STATS IP_REASM QUEUE_STATS PORT_BLOCKED
403 ])
404 AT_CLEANUP
405
406 AT_SETUP([OFPT_FEATURES_REPLY - with auxiliary_id - OF1.3])
407 AT_KEYWORDS([ofp-print])
408 AT_CHECK([ovs-ofctl ofp-print "\
409 04 06 00 20 00 00 00 01 00 00 50 54 00 00 00 01 \
410 00 00 01 00 ff 01 00 00 00 00 01 77 00 00 00 00 \
411 "], [0], [dnl
412 OFPT_FEATURES_REPLY (OF1.3) (xid=0x1): dpid:0000505400000001
413 n_tables:255, n_buffers:256, auxiliary_id:1
414 capabilities: FLOW_STATS TABLE_STATS PORT_STATS IP_REASM QUEUE_STATS PORT_BLOCKED
415 ])
416 AT_CLEANUP
417
418 AT_SETUP([OFPT_GET_CONFIG_REQUEST])
419 AT_KEYWORDS([ofp-print])
420 AT_CHECK([ovs-ofctl ofp-print '0107000800000001'], [0], [dnl
421 OFPT_GET_CONFIG_REQUEST (xid=0x1):
422 ])
423 AT_CLEANUP
424
425 AT_SETUP([OFPT_GET_CONFIG_REPLY, most common form])
426 AT_KEYWORDS([ofp-print])
427 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 00 00 00'], [0], [dnl
428 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=normal miss_send_len=0
429 ])
430 AT_CLEANUP
431
432
433 AT_SETUP([OFPT_GET_CONFIG_REPLY, frags and miss_send_len])
434 AT_KEYWORDS([ofp-print])
435 AT_CHECK([ovs-ofctl ofp-print '01 08 00 0c 00 00 00 03 00 02 00 ff'], [0], [dnl
436 OFPT_GET_CONFIG_REPLY (xid=0x3): frags=reassemble miss_send_len=255
437 ])
438 AT_CLEANUP
439
440 AT_SETUP([OFPT_PACKET_IN - OF1.0])
441 AT_KEYWORDS([ofp-print])
442 AT_CHECK([ovs-ofctl ofp-print "\
443 01 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
444 00 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
445 45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
446 c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
447 50 02 02 00 26 e8 00 00 00 00 00 00 00 00 \
448 "], [0], [dnl
449 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
450 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_flags=0x002 tcp_csum:26e8
451 ])
452 AT_CLEANUP
453
454 AT_SETUP([OFPT_PACKET_IN - OF1.0, with hex output of packet data)])
455 AT_KEYWORDS([ofp-print])
456 AT_CHECK([ovs-ofctl ofp-print "\
457 01 0a 00 4e 00 00 00 00 00 00 01 11 00 3c 00 03 \
458 00 00 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
459 45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
460 c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
461 50 10 02 00 26 e8 00 00 00 00 00 00 00 00 \
462 " 3], [0], [dnl
463 OFPT_PACKET_IN (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
464 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_flags=0x010 tcp_csum:26e8
465 00000000  50 54 00 00 00 06 50 54-00 00 00 05 08 00 45 00
466 00000010  00 28 bd 12 00 00 40 06-3c 6a c0 a8 00 01 c0 a8
467 00000020  00 02 27 2f 00 00 78 50-cc 5b 57 af 42 1e 50 10
468 00000030  02 00 26 e8 00 00 00 00-00 00 00 00
469 ])
470 AT_CLEANUP
471
472 AT_SETUP([OFPT_PACKET_IN - OF1.2])
473 AT_KEYWORDS([ofp-print])
474 AT_CHECK([ovs-ofctl ofp-print "\
475 03 0a 00 4c 00 00 00 00 ff ff ff 00 00 2a 00 00 \
476 00 01 00 0c 80 00 00 04 ff ff ff fe 00 00 00 00 \
477 00 00 ff ff ff ff ff ff 00 23 20 83 c1 5f 80 35 \
478 00 01 08 00 06 04 00 01 00 23 20 83 c1 5f 00 00 \
479 00 00 00 23 20 83 c1 5f 00 00 00 00 \
480 "], [0], [dnl
481 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
482 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=1,arp_sha=00:23:20:83:c1:5f,arp_tha=00:23:20:83:c1:5f
483 ])
484 AT_CLEANUP
485
486 AT_SETUP([OFPT_PACKET_IN - OF1.2, with hex output of packet data])
487 AT_KEYWORDS([ofp-print])
488 AT_CHECK([ovs-ofctl ofp-print "\
489 03 0a 00 4c 00 00 00 00 ff ff ff 00 00 2a 00 00 \
490 00 01 00 0c 80 00 00 04 ff ff ff fe 00 00 00 00 \
491 00 00 ff ff ff ff ff ff 00 23 20 83 c1 5f 80 35 \
492 00 01 08 00 06 04 00 03 00 23 20 83 c1 5f 00 00 \
493 00 00 00 23 20 83 c1 5f 00 00 00 00 \
494 " 3], [0], [dnl
495 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
496 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
497 00000000  ff ff ff ff ff ff 00 23-20 83 c1 5f 80 35 00 01
498 00000010  08 00 06 04 00 03 00 23-20 83 c1 5f 00 00 00 00
499 00000020  00 23 20 83 c1 5f 00 00-00 00
500 ])
501 AT_CLEANUP
502
503 AT_SETUP([OFPT_PACKET_IN - OF1.3])
504 AT_KEYWORDS([ofp-print])
505 AT_CHECK([ovs-ofctl ofp-print "\
506 04 0a 00 54 00 00 00 00 ff ff ff 00 00 2a 00 00 \
507 01 02 03 04 05 06 07 08 00 01 00 0c 80 00 00 04 \
508 ff ff ff fe 00 00 00 00 00 00 ff ff ff ff ff ff \
509 00 23 20 83 c1 5f 80 35 00 01 08 00 06 04 00 03 \
510 00 23 20 83 c1 5f 00 00 00 00 00 23 20 83 c1 5f \
511 00 00 00 00 \
512 "], [0], [dnl
513 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x102030405060708 total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
514 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
515 ])
516 AT_CLEANUP
517
518 AT_SETUP([OFPT_PACKET_IN - OF1.3, with hex output of packet data])
519 AT_KEYWORDS([ofp-print])
520 AT_CHECK([ovs-ofctl ofp-print "\
521 04 0a 00 54 00 00 00 00 ff ff ff 00 00 2a 00 00 \
522 01 02 03 04 05 06 07 08 00 01 00 0c 80 00 00 04 \
523 ff ff ff fe 00 00 00 00 00 00 ff ff ff ff ff ff \
524 00 23 20 83 c1 5f 80 35 00 01 08 00 06 04 00 03 \
525 00 23 20 83 c1 5f 00 00 00 00 00 23 20 83 c1 5f \
526 00 00 00 00 \
527 " 3], [0], [dnl
528 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x102030405060708 total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
529 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
530 00000000  ff ff ff ff ff ff 00 23-20 83 c1 5f 80 35 00 01
531 00000010  08 00 06 04 00 03 00 23-20 83 c1 5f 00 00 00 00
532 00000020  00 23 20 83 c1 5f 00 00-00 00
533 ])
534 AT_CLEANUP
535
536 AT_SETUP([OFPT_FLOW_REMOVED - OF1.0])
537 AT_KEYWORDS([ofp-print])
538 AT_CHECK([ovs-ofctl ofp-print "\
539 01 0b 00 58 00 00 00 00 00 00 00 00 00 03 50 54 \
540 00 00 00 05 50 54 00 00 00 06 ff ff 00 00 08 06 \
541 00 02 00 00 c0 a8 00 01 c0 a8 00 02 00 00 00 00 \
542 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 05 \
543 30 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \
544 00 00 00 00 00 00 00 3c \
545 "], [0], [dnl
546 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
547 ])
548 AT_CLEANUP
549
550 AT_SETUP([OFPT_FLOW_REMOVED - OF1.2])
551 AT_KEYWORDS([ofp-print])
552 AT_CHECK([ovs-ofctl ofp-print "\
553 03 0b 00 40 00 00 00 00 fe dc ba 98 76 54 32 10 \
554 80 00 01 05 00 00 00 01 00 98 96 80 00 3c 00 78 \
555 00 00 00 00 00 12 d6 87 00 00 00 00 6f 68 ba 66 \
556 00 01 00 0a 80 00 0c 02 10 09 00 00 00 00 00 00"], [0], [dnl
557 OFPT_FLOW_REMOVED (OF1.2) (xid=0x0): dl_vlan=9 reason=hard table_id=5 cookie:0xfedcba9876543210 duration1.01s idle60 hard120 pkts1234567 bytes1869134438
558 ])
559 AT_CLEANUP
560
561 AT_SETUP([OFPT_FLOW_REMOVED - OF1.3])
562 AT_KEYWORDS([ofp-print])
563 AT_CHECK([ovs-ofctl ofp-print "\
564 04 0b 00 40 00 00 00 00 fe dc ba 98 76 54 32 10 \
565 80 00 01 05 00 00 00 01 00 98 96 80 00 3c 00 78 \
566 00 00 00 00 00 12 d6 87 00 00 00 00 6f 68 ba 66 \
567 00 01 00 0a 80 00 0c 02 10 09 00 00 00 00 00 00"], [0], [dnl
568 OFPT_FLOW_REMOVED (OF1.3) (xid=0x0): dl_vlan=9 reason=hard table_id=5 cookie:0xfedcba9876543210 duration1.01s idle60 hard120 pkts1234567 bytes1869134438
569 ])
570 AT_CLEANUP
571
572 AT_SETUP([OFPT_PORT_STATUS - OF1.0])
573 AT_KEYWORDS([ofp-print])
574 AT_CHECK([ovs-ofctl ofp-print "\
575 01 0c 00 40 00 00 00 00 02 00 00 00 00 00 00 00 \
576 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
577 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
578 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
579 "], [0], [dnl
580 OFPT_PORT_STATUS (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
581      config:     PORT_DOWN
582      state:      LINK_DOWN
583      current:    100MB-FD AUTO_NEG
584      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
585      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
586      speed: 100 Mbps now, 100 Mbps max
587 ])
588 AT_CLEANUP
589
590 AT_SETUP([OFPT_PORT_STATUS - OF1.1])
591 AT_KEYWORDS([ofp-print])
592 AT_CHECK([ovs-ofctl ofp-print "\
593 02 0c 00 50 00 00 00 00 02 00 00 00 00 00 00 00 \
594 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
595 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
596 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
597 00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
598 "], [0], [dnl
599 OFPT_PORT_STATUS (OF1.1) (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
600      config:     0
601      state:      0
602      current:    100MB-FD AUTO_NEG
603      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
604      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
605      speed: 100 Mbps now, 100 Mbps max
606 ])
607 AT_CLEANUP
608
609 AT_SETUP([OFPT_PACKET_OUT - OF1.0])
610 AT_KEYWORDS([ofp-print])
611 AT_CHECK([ovs-ofctl ofp-print "\
612 01 0d 00 54 00 00 00 00 00 00 01 14 00 01 00 08 \
613 00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
614 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
615 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
616 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
617 00 00 00 00 \
618 "], [0], [dnl
619 OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 buffer=0x00000114
620 ])
621 AT_CLEANUP
622
623 AT_SETUP([OFPT_PACKET_OUT - OF1.0, with packet])
624 AT_KEYWORDS([ofp-print])
625 AT_CHECK([ovs-ofctl ofp-print "\
626 01 0d 00 54 00 00 00 00 ff ff ff ff 00 01 00 08 \
627 00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
628 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
629 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
630 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
631 00 00 00 00 \
632 "], [0], [dnl
633 OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 data_len=60
634 tcp,metadata=0,in_port=0,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,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=11104,tcp_flags=0x014 tcp_csum:6d75
635 ])
636 AT_CLEANUP
637
638 AT_SETUP([OFPT_PACKET_OUT - OF1.0, with hex output of packet data])
639 AT_KEYWORDS([ofp-print])
640 AT_CHECK([ovs-ofctl ofp-print "\
641 01 0d 00 54 00 00 00 00 ff ff ff ff 00 01 00 08 \
642 00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
643 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
644 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
645 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
646 00 00 00 00 \
647 " 3], [0], [dnl
648 OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 data_len=60
649 tcp,metadata=0,in_port=0,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,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=11104,tcp_flags=0x014 tcp_csum:6d75
650 00000000  50 54 00 00 00 05 50 54-00 00 00 06 08 00 45 00
651 00000010  00 28 00 00 40 00 40 06-b9 7c c0 a8 00 02 c0 a8
652 00000020  00 01 00 00 2b 60 00 00-00 00 6a 4f 2b 58 50 14
653 00000030  00 00 6d 75 00 00 00 00-00 00 00 00
654 ])
655 AT_CLEANUP
656
657 AT_SETUP([OFPT_PACKET_OUT - OF1.1])
658 AT_KEYWORDS([ofp-print])
659 AT_CHECK([ovs-ofctl ofp-print "\
660 03 0d 00 28 88 58 df c5 ff ff ff 00 ff ff ff fe \
661 00 10 00 00 00 00 00 00 00 00 00 10 ff ff ff fb \
662 05 dc 00 00 00 00 00 00 \
663 "], [0], [dnl
664 OFPT_PACKET_OUT (OF1.2) (xid=0x8858dfc5): in_port=LOCAL actions=FLOOD buffer=0xffffff00
665 ])
666 AT_CLEANUP
667
668 AT_SETUP([OFPT_PACKET_OUT - OF1.1, with packet])
669 AT_KEYWORDS([ofp-print])
670 AT_CHECK([ovs-ofctl ofp-print "\
671 03 0d 00 64 88 58 df c5 ff ff ff ff ff ff ff fe \
672 00 10 00 00 00 00 00 00 00 00 00 10 ff ff ff fb \
673 05 dc 00 00 00 00 00 00 50 54 00 00 00 05 50 54 \
674 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
675 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
676 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
677 00 00 00 00 \
678 "], [0], [dnl
679 OFPT_PACKET_OUT (OF1.2) (xid=0x8858dfc5): in_port=LOCAL actions=FLOOD data_len=60
680 tcp,metadata=0,in_port=0,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,nw_ecn=0,nw_ttl=64,tp_src=0,tp_dst=11104,tcp_flags=0x014 tcp_csum:6d75
681 ])
682 AT_CLEANUP
683
684 # The flow is formatted with cls_rule_format() for the low-verbosity case.
685 AT_SETUP([OFPT_FLOW_MOD - OF1.0 - low verbosity])
686 AT_KEYWORDS([ofp-print])
687 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
688 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
689 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
690 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
691 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
692 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
693 " 2], [0], [dnl
694 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
695 ], [dnl
696 ofp_util|INFO|normalization changed ofp_match, details:
697 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
698 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
699 ])
700 AT_CLEANUP
701
702 # The flow is formatted with cls_rule_format() for the low-verbosity case.
703 AT_SETUP([OFPT_FLOW_MOD - OF1.1 - low verbosity])
704 AT_KEYWORDS([ofp-print])
705 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
706 020e 0090 01020304 \
707 da1aa3e035d87158 ffffffffffffffff \
708 02 01 003c 0078 9c40 ffffffff ffffffff ffffffff 0003 \
709 0000 \
710 \
711 0000 0058 00000000 000003f7 \
712 000000000000ffffffffffff 000000000000ffffffffffff \
713 0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 \
714 00000000 00 000000 0000000000000000ffffffffffffffff \
715 \
716 0001 0008 03 000000 \
717 " 2], [0], [dnl
718 OFPT_FLOW_MOD (OF1.1) (xid=0x1020304): MOD table:2 priority=40000,arp,arp_spa=192.168.128.0/24 cookie:0xda1aa3e035d87158/0xffffffffffffffff idle:60 hard:120 send_flow_rem check_overlap actions=goto_table:3
719 ])
720 AT_CLEANUP
721
722 # The flow is formatted with cls_rule_format() for the low-verbosity case.
723 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
724 AT_KEYWORDS([ofp-print])
725 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
726 03 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
727 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
728 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
729 00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
730 50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
731 80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
732 00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
733 00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
734 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
735 " 2], [0], [dnl
736 OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:1 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
737 ], [dnl
738 ])
739 AT_CLEANUP
740
741 # The flow is formatted with ofp10_match_to_string() for the
742 # high-verbosity case.
743 AT_SETUP([OFPT_FLOW_MOD - OF1.0 - high verbosity])
744 AT_KEYWORDS([ofp-print])
745 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
746 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
747 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
748 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
749 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
750 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
751 " 3], [0], [dnl
752 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
753 ], [dnl
754 ofp_util|INFO|normalization changed ofp_match, details:
755 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
756 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
757 ])
758 AT_CLEANUP
759
760 # The flow is formatted with cls_rule_format() for the low-verbosity case.
761 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
762 AT_KEYWORDS([ofp-print])
763 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
764 03 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
765 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
766 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
767 00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
768 50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
769 80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
770 00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
771 00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
772 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
773 " 2], [0], [dnl
774 OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD table:1 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
775 ], [dnl
776 ])
777 AT_CLEANUP
778
779 # The flow is formatted with cls_rule_format() for the low-verbosity case.
780 AT_SETUP([OFPT_FLOW_MOD - OF1.3 - flags - low verbosity])
781 AT_KEYWORDS([ofp-print])
782 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
783 04 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
784 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
785 ff ff ff ff ff ff ff ff ff ff ff ff 00 1f 00 00 \
786 00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
787 50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
788 80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
789 00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
790 00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
791 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
792 " 2], [0], [dnl
793 OFPT_FLOW_MOD (OF1.3) (xid=0x2): ADD table:1 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 send_flow_rem check_overlap reset_counts no_packet_counts no_byte_counts actions=output:3
794 ], [dnl
795 ])
796 AT_CLEANUP
797
798 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field ip_src])
799 AT_KEYWORDS([ofp-print])
800 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
801 03 0e 00 58 52 33 45 02 00 00 00 00 00 00 00 00 \
802 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
803 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
804 00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
805 00 04 00 18 00 00 00 00 00 19 00 10 80 00 16 04 \
806 c0 a8 03 5c 00 00 00 00                         \
807 " 2], [0], [dnl
808 OFPT_FLOW_MOD (OF1.2) (xid=0x52334502): ADD priority=255,ip actions=set_field:192.168.3.92->ip_src
809 ], [dnl
810 ])
811 AT_CLEANUP
812
813 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field ip_dst])
814 AT_KEYWORDS([ofp-print])
815 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
816 03 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
817 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
818 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
819 00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
820 00 04 00 18 00 00 00 00 00 19 00 10 80 00 18 04 \
821 c0 a8 4a 7a 00 00 00 00                         \
822 " 2], [0], [dnl
823 OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,ip actions=set_field:192.168.74.122->ip_dst
824 ], [dnl
825 ])
826 AT_CLEANUP
827
828 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field sctp_src])
829 AT_KEYWORDS([ofp-print])
830 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
831 03 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
832 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
833 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
834 00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
835 00 04 00 18 00 00 00 00 00 19 00 10 80 00 22 02 \
836 0d 06 00 00 00 00 00 00                         \
837 " 2], [0], [dnl
838 OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,sctp actions=set_field:3334->sctp_src
839 ], [dnl
840 ])
841 AT_CLEANUP
842
843 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field sctp_dst])
844 AT_KEYWORDS([ofp-print])
845 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
846 03 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
847 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
848 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
849 00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
850 00 04 00 18 00 00 00 00 00 19 00 10 80 00 24 02 \
851 11 5d 00 00 00 00 00 00                         \
852 " 2], [0], [dnl
853 OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,sctp actions=set_field:4445->sctp_dst
854 ], [dnl
855 ])
856 AT_CLEANUP
857
858 dnl This triggered a buggy "instructions out of order" message earlier.
859 AT_SETUP([OFPT_FLOW_MOD - OF1.3 - meter])
860 AT_KEYWORDS([ofp-print])
861 AT_CHECK([ovs-ofctl ofp-print "\
862 04 0e 00 40 cf fe 6b 86 00 00 00 00 00 00 00 00 \
863 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 e8 \
864 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
865 00 01 00 04 00 00 00 00 00 06 00 08 00 00 00 01"], [0], [dnl
866 OFPT_FLOW_MOD (OF1.3) (xid=0xcffe6b86): ADD priority=1000 actions=meter:1
867 ])
868 AT_CLEANUP
869
870 AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field ip_src])
871 AT_KEYWORDS([ofp-print])
872 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
873 03 13 00 68 52 33 45 04 00 01 00 00 00 00 00 00 \
874 00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
875 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
876 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
877 00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
878 00 04 00 18 00 00 00 00 00 19 00 10 80 00 16 04 \
879 c0 a8 03 5c 00 00 00 00                         \
880 " 2], [0], [dnl
881 OFPST_FLOW reply (OF1.2) (xid=0x52334504):
882  cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,ip actions=set_field:192.168.3.92->ip_src
883 ], [dnl
884 ])
885 AT_CLEANUP
886
887 AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field ip_dst])
888 AT_KEYWORDS([ofp-print])
889 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
890 03 13 00 68 52 33 45 09 00 01 00 00 00 00 00 00 \
891 00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
892 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
893 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
894 00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
895 00 04 00 18 00 00 00 00 00 19 00 10 80 00 18 04 \
896 c0 a8 4a 7a 00 00 00 00                         \
897 " 2], [0], [dnl
898 OFPST_FLOW reply (OF1.2) (xid=0x52334509):
899  cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,ip actions=set_field:192.168.74.122->ip_dst
900 ], [dnl
901 ])
902 AT_CLEANUP
903
904 AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field sctp_src])
905 AT_KEYWORDS([ofp-print])
906 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
907 03 13 00 68 52 33 45 04 00 01 00 00 00 00 00 00 \
908 00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
909 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
910 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
911 00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
912 00 04 00 18 00 00 00 00 00 19 00 10 80 00 22 02 \
913 0d 06 00 00 00 00 00 00                         \
914 " 2], [0], [dnl
915 OFPST_FLOW reply (OF1.2) (xid=0x52334504):
916  cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,sctp actions=set_field:3334->sctp_src
917 ], [dnl
918 ])
919 AT_CLEANUP
920
921 AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field sctp_dst])
922 AT_KEYWORDS([ofp-print])
923 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
924 03 13 00 68 52 33 45 09 00 01 00 00 00 00 00 00 \
925 00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
926 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
927 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
928 00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
929 00 04 00 18 00 00 00 00 00 19 00 10 80 00 24 02 \
930 11 5d 00 00 00 00 00 00                         \
931 " 2], [0], [dnl
932 OFPST_FLOW reply (OF1.2) (xid=0x52334509):
933  cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,sctp actions=set_field:4445->sctp_dst
934 ], [dnl
935 ])
936 AT_CLEANUP
937
938 AT_SETUP([OFPT_PORT_MOD - OF1.0])
939 AT_KEYWORDS([ofp-print])
940 AT_CHECK([ovs-ofctl ofp-print "\
941 01 0f 00 20 00 00 00 03 00 03 50 54 00 00 00 01 \
942 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
943 " 3], [0], [dnl
944 OFPT_PORT_MOD (xid=0x3):port: 3: addr:50:54:00:00:00:01
945      config: PORT_DOWN
946      mask:   PORT_DOWN
947      advertise: UNCHANGED
948 ])
949 AT_CLEANUP
950
951 AT_SETUP([OFPT_PORT_MOD - OF1.1])
952 AT_KEYWORDS([ofp-print])
953 AT_CHECK([ovs-ofctl ofp-print "\
954 02 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
955 50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
956 00 00 00 00 00 00 00 00 \
957 " 3], [0], [dnl
958 OFPT_PORT_MOD (OF1.1) (xid=0x3):port: 3: addr:50:54:00:00:00:01
959      config: PORT_DOWN
960      mask:   PORT_DOWN
961      advertise: UNCHANGED
962 ])
963 AT_CLEANUP
964
965 AT_SETUP([OFPT_PORT_MOD - OF1.2])
966 AT_KEYWORDS([ofp-print])
967 AT_CHECK([ovs-ofctl ofp-print "\
968 03 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
969 50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
970 00 00 00 00 00 00 00 00 \
971 " 3], [0], [dnl
972 OFPT_PORT_MOD (OF1.2) (xid=0x3):port: 3: addr:50:54:00:00:00:01
973      config: PORT_DOWN
974      mask:   PORT_DOWN
975      advertise: UNCHANGED
976 ])
977 AT_CLEANUP
978
979 AT_SETUP([OFPT_PORT_MOD - OF1.3])
980 AT_KEYWORDS([ofp-print])
981 AT_CHECK([ovs-ofctl ofp-print "\
982 04 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
983 50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
984 00 00 00 00 00 00 00 00 \
985 " 3], [0], [dnl
986 OFPT_PORT_MOD (OF1.3) (xid=0x3):port: 3: addr:50:54:00:00:00:01
987      config: PORT_DOWN
988      mask:   PORT_DOWN
989      advertise: UNCHANGED
990 ])
991 AT_CLEANUP
992
993 AT_SETUP([OFPT_TABLE_MOD - OF1.1])
994 AT_KEYWORDS([ofp-print])
995 AT_CHECK([ovs-ofctl ofp-print "\
996 02 11 00 10 00 00 00 02 02 00 00 00 00 00 00 02 \
997 " 3], [0], [dnl
998 OFPT_TABLE_MOD (OF1.1) (xid=0x2): table_id=2, flow_miss_config=drop
999 ])
1000 AT_CLEANUP
1001
1002 AT_SETUP([OFPT_TABLE_MOD - OF1.2])
1003 AT_KEYWORDS([ofp-print])
1004 AT_CHECK([ovs-ofctl ofp-print "\
1005 03 11 00 10 00 00 00 02 02 00 00 00 00 00 00 01 \
1006 " 3], [0], [dnl
1007 OFPT_TABLE_MOD (OF1.2) (xid=0x2): table_id=2, flow_miss_config=continue
1008 ])
1009 AT_CLEANUP
1010
1011 # ofp_table_mod.config is actually "reserved for future use" in OF1.3.
1012 AT_SETUP([OFPT_TABLE_MOD - OF1.3])
1013 AT_KEYWORDS([ofp-print])
1014 AT_CHECK([ovs-ofctl ofp-print "\
1015 04 11 00 10 00 00 00 02 02 00 00 00 00 00 00 00 \
1016 " 3], [0], [dnl
1017 OFPT_TABLE_MOD (OF1.3) (xid=0x2): table_id=2, flow_miss_config=controller
1018 ])
1019 AT_CLEANUP
1020
1021 AT_SETUP([OFPST_DESC request])
1022 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1023 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100000000"], [0], [dnl
1024 OFPST_DESC request (xid=0x1):
1025 ])
1026 AT_CLEANUP
1027
1028 AT_SETUP([OFPST_DESC reply])
1029 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1030 AT_CHECK([ovs-ofctl ofp-print "\
1031 01 11 04 2c 00 00 00 01 00 00 00 00 4e 69 63 69 \
1032 72 61 2c 20 49 6e 63 2e 00 00 00 00 00 00 00 00 \
1033 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1034 00 00 00 00 00 00 00 00 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 00 00 00 00 00 00 00 00 \
1039 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
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 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1046 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1047 00 00 00 00 00 00 00 00 00 00 00 00 4f 70 65 6e \
1048 20 76 53 77 69 74 63 68 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 00 00 00 00 00 00 00 00 \
1052 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1053 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1054 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1055 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1056 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1057 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1058 00 00 00 00 00 00 00 00 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 00 00 00 00 00 00 00 00 \
1063 00 00 00 00 00 00 00 00 00 00 00 00 31 2e 31 2e \
1064 30 70 72 65 32 00 00 00 00 00 00 00 00 00 00 00 \
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 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1071 00 00 00 00 00 00 00 00 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 00 00 00 00 00 00 00 00 \
1076 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1077 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1078 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1079 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
1080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1081 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
1082 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1083 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1084 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1085 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1086 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1087 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1088 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1089 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1091 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1092 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1093 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1094 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1095 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1096 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1097 00 00 00 00 00 00 00 00 00 00 00 00 \
1098 "], [0], [dnl
1099 OFPST_DESC reply (xid=0x1):
1100 Manufacturer: Nicira, Inc.
1101 Hardware: Open vSwitch
1102 Software: 1.1.0pre2
1103 Serial Num: None
1104 DP Description: None
1105 ])
1106 AT_CLEANUP
1107
1108 AT_SETUP([OFPST_FLOW request - OF1.0])
1109 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1110 AT_CHECK([ovs-ofctl ofp-print "\
1111 01 10 00 38 00 00 00 04 00 01 00 00 00 38 20 ff \
1112 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1113 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1114 00 00 00 00 ff 00 ff ff \
1115 "], [0], [dnl
1116 OFPST_FLOW request (xid=0x4): @&t@
1117 ])
1118 AT_CLEANUP
1119
1120 AT_SETUP([OFPST_FLOW request - OF1.2])
1121 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1122 AT_CHECK([ovs-ofctl ofp-print "\
1123 03 12 00 38 00 00 00 02 00 01 00 00 00 00 00 00 \
1124 ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
1125 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1126 00 01 00 04 00 00 00 00 \
1127 "], [0], [dnl
1128 OFPST_FLOW request (OF1.2) (xid=0x2): @&t@
1129 ])
1130 AT_CLEANUP
1131
1132 AT_SETUP([OFPST_FLOW request - OF1.3])
1133 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1134 AT_CHECK([ovs-ofctl ofp-print "\
1135 04 12 00 38 00 00 00 02 00 01 00 00 00 00 00 00 \
1136 ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
1137 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1138 00 01 00 04 00 00 00 00 \
1139 "], [0], [dnl
1140 OFPST_FLOW request (OF1.3) (xid=0x2): @&t@
1141 ])
1142 AT_CLEANUP
1143
1144 AT_SETUP([OFPST_FLOW reply - OF1.0])
1145 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1146 AT_CHECK([ovs-ofctl ofp-print "\
1147 01 11 01 e4 00 00 00 04 00 01 00 00 00 60 00 00 \
1148 00 00 00 00 00 03 50 54 00 00 00 05 50 54 00 00 \
1149 00 06 ff ff 00 00 08 06 00 02 00 00 c0 a8 00 01 \
1150 c0 a8 00 02 00 00 00 00 00 00 00 04 0b eb c2 00 \
1151 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
1152 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
1153 00 00 00 3c 00 00 00 08 00 01 00 00 00 60 00 00 \
1154 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
1155 00 05 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 02 \
1156 c0 a8 00 01 00 00 00 00 00 00 00 08 35 a4 e9 00 \
1157 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
1158 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
1159 00 00 04 fa 00 00 00 08 00 03 00 00 00 60 00 00 \
1160 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
1161 00 05 ff ff 00 00 08 06 00 01 00 00 c0 a8 00 02 \
1162 c0 a8 00 01 00 00 00 00 00 00 00 04 10 b0 76 00 \
1163 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
1164 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
1165 00 00 00 3c 00 00 00 08 00 03 00 00 00 60 00 00 \
1166 00 00 00 01 00 03 50 54 00 00 00 05 50 54 00 00 \
1167 00 06 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 01 \
1168 c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \
1169 80 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
1170 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
1171 00 00 04 fa 00 00 00 08 00 01 00 00 \
1172 00 58 02 00 00 3f ff ff 00 00 00 00 00 00 00 00 \
1173 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1174 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1175 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 \
1176 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1177 00 00 00 00 00 00 00 00 \
1178 "], [0], [dnl
1179 OFPST_FLOW reply (xid=0x4):
1180  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
1181  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
1182  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
1183  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
1184  cookie=0x0, duration=0s, table=2, n_packets=0, n_bytes=0, actions=drop
1185 ])
1186 AT_CLEANUP
1187
1188 AT_SETUP([OFPST_FLOW reply - OF1.2])
1189 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1190 AT_CHECK([ovs-ofctl ofp-print "\
1191 03 13 01 78 00 00 00 02 00 01 00 00 00 00 00 00 \
1192 00 78 00 00 00 00 00 03 01 5e f3 c0 80 00 00 00 \
1193 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1194 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 62 \
1195 00 01 00 2d 80 00 00 04 00 00 00 02 80 00 06 06 \
1196 ca da ad d6 0d 37 80 00 0a 02 08 00 80 00 10 01 \
1197 00 80 00 04 08 00 00 00 00 00 00 00 00 00 00 00 \
1198 00 04 00 18 00 00 00 00 00 00 00 10 00 00 00 02 \
1199 05 dc 00 00 00 00 00 00 00 78 00 00 00 00 00 04 \
1200 20 7c 0a 40 80 00 00 00 00 00 00 00 00 00 00 00 \
1201 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 \
1202 00 00 00 00 00 00 00 8c 00 01 00 2d 80 00 00 04 \
1203 00 00 00 02 80 00 06 06 52 54 00 c3 00 89 80 00 \
1204 0a 02 08 00 80 00 10 01 00 80 00 04 08 00 00 00 \
1205 00 00 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
1206 00 00 00 10 00 00 00 02 05 dc 00 00 00 00 00 00 \
1207 00 78 00 00 00 00 00 04 20 a9 d1 00 80 00 00 00 \
1208 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1209 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 2a \
1210 00 01 00 2d 80 00 00 04 00 00 00 02 80 00 06 06 \
1211 52 54 00 97 00 69 80 00 0a 02 08 00 80 00 10 01 \
1212 00 80 00 04 08 00 00 00 00 00 00 00 00 00 00 00 \
1213 00 04 00 18 00 00 00 00 00 00 00 10 00 00 00 02 \
1214 05 dc 00 00 00 00 00 00 \
1215 "], [0], [dnl
1216 OFPST_FLOW reply (OF1.2) (xid=0x2):
1217  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
1218  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
1219  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
1220 ])
1221 AT_CLEANUP
1222
1223 AT_SETUP([OFPST_AGGREGATE request - OF1.0])
1224 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1225 AT_CHECK([ovs-ofctl ofp-print "\
1226 01 10 00 38 00 00 00 04 00 02 00 00 00 38 20 ff \
1227 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1228 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1229 00 00 00 00 ff 00 ff ff \
1230 "], [0], [dnl
1231 OFPST_AGGREGATE request (xid=0x4): @&t@
1232 ])
1233 AT_CLEANUP
1234
1235 AT_SETUP([OFPST_AGGREGATE request - OF1.2])
1236 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1237 AT_CHECK([ovs-ofctl ofp-print "\
1238 03 12 00 38 00 00 00 02 00 02 00 00 00 00 00 00 \
1239 ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
1240 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1241 00 01 00 04 00 00 00 00 \
1242 "], [0], [dnl
1243 OFPST_AGGREGATE request (OF1.2) (xid=0x2): @&t@
1244 ])
1245 AT_CLEANUP
1246
1247 AT_SETUP([OFPST_AGGREGATE request - OF1.3])
1248 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1249 AT_CHECK([ovs-ofctl ofp-print "\
1250 04 12 00 38 00 00 00 02 00 02 00 00 00 00 00 00 \
1251 ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
1252 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1253 00 01 00 04 00 00 00 00 \
1254 "], [0], [dnl
1255 OFPST_AGGREGATE request (OF1.3) (xid=0x2): @&t@
1256 ])
1257 AT_CLEANUP
1258
1259 AT_SETUP([OFPST_AGGREGATE reply - OF1.0])
1260 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1261 AT_CHECK([ovs-ofctl ofp-print "\
1262 01 11 00 24 00 00 00 04 00 02 00 00 00 00 00 00 \
1263 00 00 01 82 00 00 00 00 00 00 93 78 00 00 00 04 \
1264 00 00 00 00 \
1265 "], [0], [dnl
1266 OFPST_AGGREGATE reply (xid=0x4): packet_count=386 byte_count=37752 flow_count=4
1267 ])
1268 AT_CLEANUP
1269
1270 AT_SETUP([OFPST_AGGREGATE reply - OF1.2])
1271 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1272 AT_CHECK([ovs-ofctl ofp-print "\
1273 03 13 00 28 00 00 00 02 00 02 00 00 00 00 00 00 \
1274 00 00 00 00 00 00 00 79 00 00 00 00 00 00 4b 4f \
1275 00 00 00 03 00 00 00 00 \
1276 "], [0], [dnl
1277 OFPST_AGGREGATE reply (OF1.2) (xid=0x2): packet_count=121 byte_count=19279 flow_count=3
1278 ])
1279 AT_CLEANUP
1280
1281 AT_SETUP([OFPST_AGGREGATE reply - OF1.3])
1282 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1283 AT_CHECK([ovs-ofctl ofp-print "\
1284 04 13 00 28 00 00 00 02 00 02 00 00 00 00 00 00 \
1285 00 00 00 00 00 00 00 79 00 00 00 00 00 00 4b 4f \
1286 00 00 00 03 00 00 00 00 \
1287 "], [0], [dnl
1288 OFPST_AGGREGATE reply (OF1.3) (xid=0x2): packet_count=121 byte_count=19279 flow_count=3
1289 ])
1290 AT_CLEANUP
1291
1292 AT_SETUP([OFPST_TABLE request - OF1.0])
1293 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1294 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100030000"], [0], [dnl
1295 OFPST_TABLE request (xid=0x1):
1296 ])
1297 AT_CLEANUP
1298
1299 AT_SETUP([OFPST_TABLE request - OF1.1])
1300 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1301 AT_CHECK([ovs-ofctl ofp-print "02120010000000020003000000000000"], [0], [dnl
1302 OFPST_TABLE request (OF1.1) (xid=0x2):
1303 ])
1304 AT_CLEANUP
1305
1306 AT_SETUP([OFPST_TABLE request - OF1.2])
1307 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1308 AT_CHECK([ovs-ofctl ofp-print "03120010000000020003000000000000"], [0], [dnl
1309 OFPST_TABLE request (OF1.2) (xid=0x2):
1310 ])
1311 AT_CLEANUP
1312
1313 AT_SETUP([OFPST_TABLE request - OF1.3])
1314 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1315 AT_CHECK([ovs-ofctl ofp-print "04120010000000020003000000000000"], [0], [dnl
1316 OFPST_TABLE request (OF1.3) (xid=0x2):
1317 ])
1318 AT_CLEANUP
1319
1320 AT_SETUP([OFPST_TABLE reply - OF1.0])
1321 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1322 AT_CHECK([ovs-ofctl ofp-print "\
1323 01 11 00 4c 00 00 00 01 00 03 00 00 00 00 00 00 \
1324 63 6c 61 73 73 69 66 69 65 72 00 00 00 00 00 00 \
1325 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1326 00 3f ff ff 00 10 00 00 00 00 00 0b 00 00 00 00 \
1327 00 00 00 00 00 00 00 00 00 00 00 00 \
1328 "], [0], [dnl
1329 OFPST_TABLE reply (xid=0x1): 1 tables
1330   0: classifier: wild=0x3fffff, max=1048576, active=11
1331                lookup=0, matched=0
1332 ])
1333 AT_CLEANUP
1334
1335 AT_SETUP([OFPST_TABLE reply - OF1.2])
1336 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1337 (mid="wild=0xfffffffff, max=1000000,"
1338  tail="
1339                match=0xfffffffff, instructions=0x00000007, config=0x00000000
1340                write_actions=0x00000000, apply_actions=0x00000000
1341                write_setfields=0x0000000fffffffff
1342                apply_setfields=0x0000000fffffffff
1343                metadata_match=0x0000000000000000
1344                metadata_write=0x0000000000000000"
1345  echo "OFPST_TABLE reply (OF1.2) (xid=0x2): 255 tables
1346   0: classifier: $mid active=1
1347                lookup=74614, matched=106024$tail"
1348  x=1
1349  while test $x -lt 254; do
1350    printf "  %d: %-8s: $mid active=0
1351                lookup=0, matched=0$tail
1352 " $x table$x
1353    x=`expr $x + 1`
1354  done
1355  echo "  254: table254: $mid active=2
1356                lookup=0, matched=0$tail") > expout
1357
1358 (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"
1359  pad7="00 00 00 00 00 00 00 "
1360  mid="00 00 00 0f ff ff ff ff \
1361 00 00 00 0f ff ff ff ff 00 00 00 00 00 00 00 00 \
1362 00 00 00 0f ff ff ff ff 00 00 00 0f ff ff ff ff \
1363 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1364 00 00 00 07 00 00 00 00 00 0f 42 40 "
1365  tail="00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
1366
1367  echo -n "03 13 7f 90 00 00 00 02 00 03 00 00 00 00 00 00 "
1368
1369  x=0
1370  printf "%02x $pad7" $x
1371  printf "%s$pad32" "classifier" | od -A n -t x1 -v -N 32 | tr '\n' ' '
1372  echo -n "$mid 00 00 00 01  "
1373  echo -n "00 00 00 00 00 01 23 76 00 00 00 00 00 01 9e 28 "
1374
1375  x=1
1376  while test $x -lt 254; do
1377    printf "%02x $pad7" $x
1378    printf "%s$pad32" "table$x" | od -A n -t x1 -v -N 32 | tr '\n' ' '
1379    echo -n "$mid 00 00 00 00 $tail "
1380    x=`expr $x + 1`
1381  done
1382
1383  x=254
1384  printf "%02x $pad7" $x
1385  printf "%s$pad32" "table$x" | od -A n -t x1 -v -N 32 | tr '\n' ' '
1386  echo -n "$mid 00 00 00 02 $tail") > in
1387 AT_CHECK([ovs-ofctl ofp-print "$(cat in)"], [0], [expout])
1388 AT_CLEANUP
1389
1390 AT_SETUP([OFPST_TABLE reply - OF1.3])
1391 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1392 AT_CHECK([ovs-ofctl ofp-print "\
1393 04 13 00 40 00 00 00 01 00 03 00 00 00 00 00 00 \
1394 00 00 00 00 00 00 00 0b 00 00 00 00 00 00 02 00 \
1395 00 00 00 00 00 00 01 00 01 00 00 00 00 00 00 0c \
1396 00 00 00 00 00 00 02 01 00 00 00 00 00 00 01 01 \
1397 "], [0], [dnl
1398 OFPST_TABLE reply (OF1.3) (xid=0x1): 2 tables
1399   0: active=11, lookup=512, matched=256
1400   1: active=12, lookup=513, matched=257
1401 ])
1402 AT_CLEANUP
1403
1404 AT_SETUP([OFPST_PORT request - 1.0])
1405 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1406 AT_CHECK([ovs-ofctl ofp-print "\
1407 01 10 00 14 00 00 00 01 00 04 00 00 ff ff 00 00 \
1408 00 00 00 00 \
1409 "], [0], [dnl
1410 OFPST_PORT request (xid=0x1): port_no=ANY
1411 ])
1412 AT_CLEANUP
1413
1414 AT_SETUP([OFPST_PORT request - 1.1])
1415 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1416 AT_CHECK([ovs-ofctl ofp-print "\
1417 02 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
1418 ff ff ff ff 00 00 00 00 \
1419 "], [0], [dnl
1420 OFPST_PORT request (OF1.1) (xid=0x2): port_no=ANY
1421 ])
1422 AT_CLEANUP
1423
1424 AT_SETUP([OFPST_PORT request - 1.2])
1425 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1426 AT_CHECK([ovs-ofctl ofp-print "\
1427 03 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
1428 ff ff ff ff 00 00 00 00 \
1429 "], [0], [dnl
1430 OFPST_PORT request (OF1.2) (xid=0x2): port_no=ANY
1431 ])
1432 AT_CLEANUP
1433
1434 AT_SETUP([OFPST_PORT request - 1.3])
1435 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1436 AT_CHECK([ovs-ofctl ofp-print "\
1437 04 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
1438 ff ff ff ff 00 00 00 00 \
1439 "], [0], [dnl
1440 OFPST_PORT request (OF1.3) (xid=0x2): port_no=ANY
1441 ])
1442 AT_CLEANUP
1443
1444 AT_SETUP([OFPST_PORT reply - OF1.0])
1445 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1446 AT_CHECK([ovs-ofctl ofp-print "\
1447 01 11 01 ac 00 00 00 01 00 04 00 00 00 03 00 00 \
1448 00 00 00 00 00 00 00 00 00 00 4d 20 00 00 00 00 \
1449 00 00 14 32 00 00 00 00 00 0f 60 4e 00 00 00 00 \
1450 00 05 71 bc 00 00 00 00 00 00 00 00 00 00 00 00 \
1451 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1452 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1453 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1454 00 00 00 00 ff fe 00 00 00 00 00 00 00 00 00 00 \
1455 00 00 02 ac 00 00 00 00 00 00 01 f5 00 00 00 00 \
1456 00 01 0c 8c 00 00 00 00 00 00 db 1c 00 00 00 00 \
1457 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1458 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1459 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1460 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
1461 00 00 00 00 00 00 00 00 00 00 06 be 00 00 00 00 \
1462 00 00 05 84 00 00 00 00 00 02 34 b4 00 00 00 00 \
1463 00 02 23 d4 00 00 00 00 00 00 00 00 00 00 00 00 \
1464 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1465 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1466 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1467 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 \
1468 00 00 14 12 00 00 00 00 00 00 14 66 00 00 00 00 \
1469 00 04 a2 54 00 00 00 00 00 05 8a 1e 00 00 00 00 \
1470 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1471 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1472 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1473 00 00 00 00 00 00 00 00 00 00 00 00 \
1474 "], [0], [dnl
1475 OFPST_PORT reply (xid=0x1): 4 ports
1476   port  3: rx pkts=19744, bytes=1007694, drop=0, errs=0, frame=0, over=0, crc=0
1477            tx pkts=5170, bytes=356796, drop=0, errs=0, coll=0
1478   port LOCAL: rx pkts=684, bytes=68748, drop=0, errs=0, frame=0, over=0, crc=0
1479            tx pkts=501, bytes=56092, drop=0, errs=0, coll=0
1480   port  2: rx pkts=1726, bytes=144564, drop=0, errs=0, frame=0, over=0, crc=0
1481            tx pkts=1412, bytes=140244, drop=0, errs=0, coll=0
1482   port  1: rx pkts=5138, bytes=303700, drop=0, errs=0, frame=0, over=0, crc=0
1483            tx pkts=5222, bytes=363038, drop=0, errs=0, coll=0
1484 ])
1485 AT_CLEANUP
1486
1487 AT_SETUP([OFPST_PORT reply - OF1.2])
1488 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1489 AT_CHECK([ovs-ofctl ofp-print "\
1490 03 13 01 48 00 00 00 02 00 04 00 00 00 00 00 00 \
1491 00 00 00 02 00 00 00 00 00 00 00 00 00 01 95 56 \
1492 00 00 00 00 00 00 00 88 00 00 00 00 02 5d 08 98 \
1493 00 00 00 00 00 00 2c f8 00 00 00 00 00 00 00 00 \
1494 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1495 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1496 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1497 00 00 00 00 00 00 00 00 ff ff ff fe 00 00 00 00 \
1498 00 00 00 00 00 00 00 44 00 00 00 00 00 00 9d 2c \
1499 00 00 00 00 00 00 16 7c 00 00 00 00 01 1e 36 44 \
1500 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1501 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1502 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1503 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1504 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 44 \
1505 00 00 00 00 00 00 9d 2c 00 00 00 00 00 00 16 7c \
1506 00 00 00 00 01 1e 36 44 00 00 00 00 00 00 00 00 \
1507 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1508 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1509 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1510 00 00 00 00 00 00 00 00 \
1511 "], [0], [dnl
1512 OFPST_PORT reply (OF1.2) (xid=0x2): 3 ports
1513   port  2: rx pkts=103766, bytes=39651480, drop=0, errs=0, frame=0, over=0, crc=0
1514            tx pkts=136, bytes=11512, drop=0, errs=0, coll=0
1515   port LOCAL: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1516            tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1517   port  1: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1518            tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1519 ])
1520 AT_CLEANUP
1521
1522 AT_SETUP([OFPST_PORT reply - OF1.3])
1523 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1524 AT_CHECK([ovs-ofctl ofp-print "\
1525 04 13 01 60 00 00 00 02 00 04 00 00 00 00 00 00 \
1526 00 00 00 02 00 00 00 00 00 00 00 00 00 01 95 56 \
1527 00 00 00 00 00 00 00 88 00 00 00 00 02 5d 08 98 \
1528 00 00 00 00 00 00 2c f8 00 00 00 00 00 00 00 00 \
1529 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1530 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1531 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1532 00 00 00 00 00 00 00 00 00 00 00 01 00 0f 42 40 \
1533 ff ff ff fe 00 00 00 00 \
1534 00 00 00 00 00 00 00 44 00 00 00 00 00 00 9d 2c \
1535 00 00 00 00 00 00 16 7c 00 00 00 00 01 1e 36 44 \
1536 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1537 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1538 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1539 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1540 ff ff ff ff ff ff ff ff \
1541 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 44 \
1542 00 00 00 00 00 00 9d 2c 00 00 00 00 00 00 16 7c \
1543 00 00 00 00 01 1e 36 44 00 00 00 00 00 00 00 00 \
1544 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1545 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1546 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1547 00 00 00 00 00 00 00 00 00 00 00 00 07 54 d4 c0 \
1548 "], [0], [dnl
1549 OFPST_PORT reply (OF1.3) (xid=0x2): 3 ports
1550   port  2: rx pkts=103766, bytes=39651480, drop=0, errs=0, frame=0, over=0, crc=0
1551            tx pkts=136, bytes=11512, drop=0, errs=0, coll=0
1552            duration=1.001s
1553   port LOCAL: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1554            tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1555   port  1: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1556            tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1557            duration=0.123s
1558 ])
1559 AT_CLEANUP
1560
1561 AT_SETUP([OFPST_QUEUE request - OF1.0])
1562 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1563 AT_CHECK([ovs-ofctl ofp-print "\
1564 01 10 00 14 00 00 00 01 00 05 00 00 ff fc 00 00 \
1565 ff ff ff ff \
1566 "], [0], [dnl
1567 OFPST_QUEUE request (xid=0x1):port=ANY queue=ALL
1568 ])
1569 AT_CLEANUP
1570
1571 AT_SETUP([OFPST_QUEUE request - OF1.1])
1572 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1573 AT_CHECK([ovs-ofctl ofp-print "\
1574 02 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
1575 ff ff ff ff ff ff ff ff \
1576 "], [0], [dnl
1577 OFPST_QUEUE request (OF1.1) (xid=0x2):port=ANY queue=ALL
1578 ])
1579 AT_CLEANUP
1580
1581 AT_SETUP([OFPST_QUEUE request - OF1.2])
1582 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1583 AT_CHECK([ovs-ofctl ofp-print "\
1584 03 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
1585 ff ff ff ff ff ff ff ff \
1586 "], [0], [dnl
1587 OFPST_QUEUE request (OF1.2) (xid=0x2):port=ANY queue=ALL
1588 ])
1589 AT_CLEANUP
1590
1591 AT_SETUP([OFPST_QUEUE request - OF1.3])
1592 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1593 AT_CHECK([ovs-ofctl ofp-print "\
1594 04 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
1595 ff ff ff ff ff ff ff ff \
1596 "], [0], [dnl
1597 OFPST_QUEUE request (OF1.3) (xid=0x2):port=ANY queue=ALL
1598 ])
1599 AT_CLEANUP
1600
1601 AT_SETUP([OFPST_QUEUE reply - OF1.0])
1602 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1603 AT_CHECK([ovs-ofctl ofp-print "\
1604 01 11 00 cc 00 00 00 01 00 05 00 00 00 03 00 00 \
1605 00 00 00 01 00 00 00 00 00 00 01 2e 00 00 00 00 \
1606 00 00 00 01 00 00 00 00 00 00 00 00 00 03 00 00 \
1607 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
1608 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
1609 00 00 00 01 00 00 00 00 00 00 08 34 00 00 00 00 \
1610 00 00 00 14 00 00 00 00 00 00 00 00 00 02 00 00 \
1611 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
1612 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
1613 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 \
1614 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
1615 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
1616 00 00 00 00 00 00 00 00 00 00 00 00 \
1617 "], [0], [dnl
1618 OFPST_QUEUE reply (xid=0x1): 6 queues
1619   port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
1620   port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
1621   port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
1622   port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
1623   port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
1624   port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
1625 ])
1626 AT_CLEANUP
1627
1628 AT_SETUP([OFPST_QUEUE reply - OF1.1])
1629 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1630 AT_CHECK([ovs-ofctl ofp-print "\
1631 02 13 00 d0 00 00 00 01 00 05 00 00 00 00 00 00 \
1632 00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
1633 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
1634 00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
1635 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1636 00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
1637 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
1638 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
1639 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1640 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
1641 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1642 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
1643 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1644 "], [0], [dnl
1645 OFPST_QUEUE reply (OF1.1) (xid=0x1): 6 queues
1646   port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
1647   port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
1648   port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
1649   port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
1650   port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
1651   port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
1652 ])
1653 AT_CLEANUP
1654
1655 AT_SETUP([OFPST_QUEUE reply - OF1.2])
1656 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1657 AT_CHECK([ovs-ofctl ofp-print "\
1658 03 13 00 d0 00 00 00 01 00 05 00 00 00 00 00 00 \
1659 00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
1660 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
1661 00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
1662 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1663 00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
1664 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
1665 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
1666 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1667 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
1668 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1669 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
1670 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1671 "], [0], [dnl
1672 OFPST_QUEUE reply (OF1.2) (xid=0x1): 6 queues
1673   port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
1674   port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
1675   port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
1676   port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
1677   port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
1678   port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
1679 ])
1680 AT_CLEANUP
1681
1682 AT_SETUP([OFPST_QUEUE reply - OF1.3])
1683 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1684 AT_CHECK([ovs-ofctl ofp-print "\
1685 04 13 01 00 00 00 00 01 00 05 00 00 00 00 00 00 \
1686 00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
1687 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
1688 00 00 00 64 1d cd 65 00 \
1689 00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
1690 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1691 00 00 00 64 1d cd 65 00 \
1692 00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
1693 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
1694 00 00 00 64 1d cd 65 00 \
1695 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
1696 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1697 00 00 00 64 1d cd 65 00 \
1698 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
1699 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1700 00 00 00 64 1d cd 65 00 \
1701 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
1702 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1703 ff ff ff ff ff ff ff ff \
1704 "], [0], [dnl
1705 OFPST_QUEUE reply (OF1.3) (xid=0x1): 6 queues
1706   port 3 queue 1: bytes=302, pkts=1, errors=0, duration=100.5s
1707   port 3 queue 2: bytes=0, pkts=0, errors=0, duration=100.5s
1708   port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=100.5s
1709   port 2 queue 2: bytes=0, pkts=0, errors=0, duration=100.5s
1710   port 1 queue 1: bytes=0, pkts=0, errors=0, duration=100.5s
1711   port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
1712 ])
1713 AT_CLEANUP
1714
1715 AT_SETUP([OFPST_GROUP request])
1716 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1717 AT_CHECK([ovs-ofctl ofp-print "\
1718 02 12 00 18 00 00 00 02 00 06 00 00 00 00 00 00 \
1719 ff ff ff ff 00 00 00 00 \
1720 "], [0], [OFPST_GROUP request (OF1.1) (xid=0x2): group_id=ANY
1721 ])
1722 AT_CLEANUP
1723
1724 AT_SETUP([OFPST_GROUP reply - OF1.1])
1725 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1726 AT_CHECK([ovs-ofctl ofp-print "\
1727 02 13 00 a0 00 00 00 02 00 06 00 00 00 00 00 00 \
1728 00 50 00 00 87 65 43 21 00 00 00 04 00 00 00 00 \
1729 00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
1730 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1731 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1732 00 00 00 00 00 00 66 66 00 00 00 00 00 33 33 33 \
1733 00 40 00 00 00 00 00 05 00 00 00 02 00 00 00 00 \
1734 00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
1735 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1736 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1737 "], [0], [dnl
1738 OFPST_GROUP reply (OF1.1) (xid=0x2):
1739  group_id=2271560481,ref_count=4,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962,bucket2:packet_count=26214,byte_count=3355443
1740  group_id=5,ref_count=2,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962
1741 ])
1742 AT_CLEANUP
1743
1744 AT_SETUP([OFPST_GROUP reply - OF1.3])
1745 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1746 AT_CHECK([ovs-ofctl ofp-print "\
1747 04 13 00 b0 00 00 00 02 00 06 00 00 00 00 00 00 \
1748 00 58 00 00 87 65 43 21 00 00 00 04 00 00 00 00 \
1749 00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
1750 00 00 00 12 1d cd 65 00 \
1751 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1752 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1753 00 00 00 00 00 00 66 66 00 00 00 00 00 33 33 33 \
1754 00 48 00 00 00 00 00 05 00 00 00 02 00 00 00 00 \
1755 00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
1756 00 00 00 10 1d cd 65 00 \
1757 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1758 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1759 "], [0], [dnl
1760 OFPST_GROUP reply (OF1.3) (xid=0x2):
1761  group_id=2271560481,duration=18.5s,ref_count=4,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962,bucket2:packet_count=26214,byte_count=3355443
1762  group_id=5,duration=16.5s,ref_count=2,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962
1763 ])
1764 AT_CLEANUP
1765
1766 AT_SETUP([OFPST_GROUP_DESC request])
1767 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1768 AT_CHECK([ovs-ofctl ofp-print "\
1769 02 12 00 10 00 00 00 02 00 07 00 00 00 00 00 00 \
1770 "], [0], [OFPST_GROUP_DESC request (OF1.1) (xid=0x2):
1771 ])
1772 AT_CLEANUP
1773
1774 AT_SETUP([OFPST_GROUP_DESC reply])
1775 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1776 AT_CHECK([ovs-ofctl ofp-print "\
1777 02 13 00 78 00 00 00 02 00 07 00 00 00 00 00 00 \
1778 00 68 01 00 00 00 20 00 \
1779 00 20 00 64 00 00 00 01 ff ff ff ff 00 00 00 00 \
1780 00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
1781 00 20 00 c8 00 00 00 02 ff ff ff ff 00 00 00 00 \
1782 00 00 00 10 00 00 00 02 00 00 00 00 00 00 00 00 \
1783 00 20 00 c8 00 00 00 03 ff ff ff ff 00 00 00 00 \
1784 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
1785 "], [0], [dnl
1786 OFPST_GROUP_DESC reply (OF1.1) (xid=0x2):
1787  group_id=8192,type=select,bucket=weight:100,watch_port:1,actions=output:1,bucket=weight:200,watch_port:2,actions=output:2,bucket=weight:200,watch_port:3,actions=output:3
1788 ])
1789 AT_CLEANUP
1790
1791 AT_SETUP([OFPST_GROUP_FEATURES request])
1792 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1793 AT_CHECK([ovs-ofctl ofp-print "\
1794 03 12 00 10 00 00 00 02 00 08 00 00 00 00 00 00 \
1795 "], [0], [OFPST_GROUP_FEATURES request (OF1.2) (xid=0x2):
1796 ])
1797 AT_CLEANUP
1798
1799 AT_SETUP([OFPST_GROUP_FEATURES reply])
1800 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1801 AT_CHECK([ovs-ofctl ofp-print "\
1802 03 13 00 38 00 00 00 02 00 08 00 00 00 00 00 00 \
1803 00 00 00 0f 00 00 00 0f \
1804 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 \
1805 00 00 00 01 00 00 00 03 00 00 00 07 00 00 00 0f \
1806 "], [0], [dnl
1807 OFPST_GROUP_FEATURES reply (OF1.2) (xid=0x2):
1808  Group table:
1809     Types:  0xf
1810     Capabilities:  0xf
1811     All group :
1812         max_groups = 0x1 actions=0x00000001
1813     Select group :
1814         max_groups = 0x2 actions=0x00000003
1815     Indirect group :
1816         max_groups = 0x3 actions=0x00000007
1817     Fast Failover group :
1818         max_groups = 0x4 actions=0x0000000f
1819 ])
1820 AT_CLEANUP
1821
1822 AT_SETUP([OFPST_PORT_DESC request - OF1.0])
1823 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1824 AT_CHECK([ovs-ofctl ofp-print "0110000c00000001000d0000"], [0], [dnl
1825 OFPST_PORT_DESC request (xid=0x1):
1826 ])
1827 AT_CLEANUP
1828
1829 AT_SETUP([OFPST_PORT_DESC reply - OF1.0])
1830 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1831 AT_CHECK([ovs-ofctl ofp-print "\
1832 01 11 00 3c 00 00 00 00 00 0d 00 00 00 03 50 54 \
1833 00 00 00 01 65 74 68 30 00 00 00 00 00 00 00 00 \
1834 00 00 00 00 00 00 00 01 00 00 00 01 00 00 02 08 \
1835 00 00 02 8f 00 00 02 8f 00 00 00 00 \
1836 "], [0], [dnl
1837 OFPST_PORT_DESC reply (xid=0x0):
1838  3(eth0): addr:50:54:00:00:00:01
1839      config:     PORT_DOWN
1840      state:      LINK_DOWN
1841      current:    100MB-FD AUTO_NEG
1842      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
1843      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
1844      speed: 100 Mbps now, 100 Mbps max
1845 ])
1846 AT_CLEANUP
1847
1848 AT_SETUP([OFPT_METER_MOD request - OF1.3])
1849 AT_KEYWORDS([ofp-print])
1850 AT_CHECK([ovs-ofctl ofp-print "\
1851 04 1d 00 20 00 00 00 02 00 00 00 0d 00 00 00 05 \
1852 00 01 00 10 00 00 04 00 00 00 00 80 00 00 00 00 \
1853 "], [0], [dnl
1854 OFPT_METER_MOD (OF1.3) (xid=0x2): ADD meter=5 kbps burst stats bands=
1855 type=drop rate=1024 burst_size=128
1856 ])
1857 AT_CLEANUP
1858
1859 AT_SETUP([OFPT_METER_MOD request - bad band - OF1.3])
1860 AT_KEYWORDS([ofp-print])
1861 AT_CHECK([ovs-ofctl ofp-print "\
1862 04 1d 00 20 85 01 d7 38 00 00 00 00 00 00 00 01
1863 00 05 00 10 00 00 00 02 00 00 00 02 00 00 00 00
1864 "], [0], [dnl
1865 OFPT_METER_MOD (OF1.3) (xid=0x8501d738): ***decode error: OFPMMFC_BAD_BAND***
1866 ])
1867 AT_CLEANUP
1868
1869 AT_SETUP([OFPST_METER request - OF1.3])
1870 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1871 AT_CHECK([ovs-ofctl ofp-print "041200180000000200090000000000000000000100000000"], [0], [dnl
1872 OFPST_METER request (OF1.3) (xid=0x2): meter=1
1873 ])
1874 AT_CLEANUP
1875
1876 AT_SETUP([OFPST_METER_CONFIG request - OF1.3])
1877 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1878 AT_CHECK([ovs-ofctl ofp-print "0412001800000002000a0000000000000000000100000000"], [0], [dnl
1879 OFPST_METER_CONFIG request (OF1.3) (xid=0x2): meter=1
1880 ])
1881 AT_CLEANUP
1882
1883 AT_SETUP([OFPST_METER_FEATURES request - OF1.3])
1884 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1885 AT_CHECK([ovs-ofctl ofp-print "0412001000000002000b000000000000"], [0], [dnl
1886 OFPST_METER_FEATURES request (OF1.3) (xid=0x2):
1887 ])
1888 AT_CLEANUP
1889
1890 AT_SETUP([OFPST_METER_FEATURES reply - OF1.3])
1891 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1892 AT_CHECK([ovs-ofctl ofp-print "\
1893 04 13 00 20 00 00 00 02 00 0b 00 00 00 00 00 00 \
1894 00 01 00 00 00 00 00 06 00 00 00 0F 10 02 00 00 \
1895 "], [0], [dnl
1896 OFPST_METER_FEATURES reply (OF1.3) (xid=0x2):
1897 max_meter:65536 max_bands:16 max_color:2
1898 band_types: drop dscp_remark
1899 capabilities: kbps pktps burst stats
1900 ])
1901 AT_CLEANUP
1902
1903 AT_SETUP([OFPST_METER_CONFIG reply - OF1.3])
1904 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1905 AT_CHECK([ovs-ofctl ofp-print "\
1906 04 13 00 50 00 00 00 02 00 0a 00 00 00 00 00 00 \
1907 00 28 00 05 00 00 00 01 \
1908 00 01 00 10 00 01 00 00 00 00 05 00 00 00 00 00 \
1909 00 02 00 10 00 10 00 00 00 00 f0 00 00 00 00 00 \
1910 00 18 00 09 00 00 00 02 \
1911 00 01 00 10 00 02 00 00 00 00 00 00 00 00 00 00 \
1912 "], [0], [dnl
1913 OFPST_METER_CONFIG reply (OF1.3) (xid=0x2):
1914 meter=1 kbps burst bands=
1915 type=drop rate=65536 burst_size=1280
1916 type=dscp_remark rate=1048576 burst_size=61440 prec_level=0
1917
1918 meter=2 kbps stats bands=
1919 type=drop rate=131072
1920 ])
1921 AT_CLEANUP
1922
1923 AT_SETUP([OFPST_METER reply - OF1.3])
1924 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1925 AT_CHECK([ovs-ofctl ofp-print "\
1926 04 13 00 90 00 00 00 02 00 09 00 00 00 00 00 00 \
1927 00 00 00 01 00 48 00 00 00 00 00 00 00 00 00 05 \
1928 00 00 00 00 00 00 10 00 00 00 00 00 00 02 30 00 \
1929 00 00 01 8a 0a 6e 23 44 \
1930 00 00 00 00 00 00 00 7e 00 00 00 00 00 00 34 33 \
1931 00 00 00 00 00 00 00 e7 00 00 00 00 00 00 94 2e \
1932 00 00 00 02 00 38 00 00 00 00 00 00 00 00 00 02 \
1933 00 00 00 00 00 00 02 00 00 00 00 00 00 00 30 00 \
1934 00 00 01 87 0a 23 6e 44 \
1935 00 00 00 00 00 00 00 2a 00 00 00 00 00 00 04 33 \
1936 "], [0], [dnl
1937 OFPST_METER reply (OF1.3) (xid=0x2):
1938 meter:1 flow_count:5 packet_in_count:4096 byte_in_count:143360 duration:394.174990148s bands:
1939 0: packet_count:126 byte_count:13363
1940 1: packet_count:231 byte_count:37934
1941
1942 meter:2 flow_count:2 packet_in_count:512 byte_in_count:12288 duration:391.170094148s bands:
1943 0: packet_count:42 byte_count:1075
1944 ])
1945 AT_CLEANUP
1946
1947 AT_SETUP([OFPT_BARRIER_REQUEST - OF1.0])
1948 AT_KEYWORDS([ofp-print])
1949 AT_CHECK([ovs-ofctl ofp-print '01 12 00 08 00 00 00 01'], [0], [dnl
1950 OFPT_BARRIER_REQUEST (xid=0x1):
1951 ])
1952 AT_CLEANUP
1953
1954 AT_SETUP([OFPT_BARRIER_REQUEST - OF1.1])
1955 AT_KEYWORDS([ofp-print])
1956 AT_CHECK([ovs-ofctl ofp-print '02 14 00 08 00 00 00 01'], [0], [dnl
1957 OFPT_BARRIER_REQUEST (OF1.1) (xid=0x1):
1958 ])
1959 AT_CLEANUP
1960
1961 AT_SETUP([OFPT_BARRIER_REQUEST - OF1.2])
1962 AT_KEYWORDS([ofp-print])
1963 AT_CHECK([ovs-ofctl ofp-print '03 14 00 08 00 00 00 01'], [0], [dnl
1964 OFPT_BARRIER_REQUEST (OF1.2) (xid=0x1):
1965 ])
1966 AT_CLEANUP
1967
1968 AT_SETUP([OFPT_BARRIER_REQUEST - OF1.3])
1969 AT_KEYWORDS([ofp-print])
1970 AT_CHECK([ovs-ofctl ofp-print '04 14 00 08 00 00 00 01'], [0], [dnl
1971 OFPT_BARRIER_REQUEST (OF1.3) (xid=0x1):
1972 ])
1973 AT_CLEANUP
1974
1975 AT_SETUP([OFPT_BARRIER_REPLY - OF1.0])
1976 AT_KEYWORDS([ofp-print])
1977 AT_CHECK([ovs-ofctl ofp-print '01 13 00 08 00 00 00 01'], [0], [dnl
1978 OFPT_BARRIER_REPLY (xid=0x1):
1979 ])
1980 AT_CLEANUP
1981
1982 AT_SETUP([OFPT_BARRIER_REPLY - OF1.1])
1983 AT_KEYWORDS([ofp-print])
1984 AT_CHECK([ovs-ofctl ofp-print '02 15 00 08 00 00 00 01'], [0], [dnl
1985 OFPT_BARRIER_REPLY (OF1.1) (xid=0x1):
1986 ])
1987 AT_CLEANUP
1988
1989 AT_SETUP([OFPT_BARRIER_REPLY - OF1.2])
1990 AT_KEYWORDS([ofp-print])
1991 AT_CHECK([ovs-ofctl ofp-print '03 15 00 08 00 00 00 01'], [0], [dnl
1992 OFPT_BARRIER_REPLY (OF1.2) (xid=0x1):
1993 ])
1994 AT_CLEANUP
1995
1996 AT_SETUP([OFPT_BARRIER_REPLY - OF1.3])
1997 AT_KEYWORDS([ofp-print])
1998 AT_CHECK([ovs-ofctl ofp-print '04 15 00 08 00 00 00 01'], [0], [dnl
1999 OFPT_BARRIER_REPLY (OF1.3) (xid=0x1):
2000 ])
2001 AT_CLEANUP
2002
2003 AT_SETUP([OFPT_QUEUE_GET_CONFIG_REQUEST - OF1.0])
2004 AT_KEYWORDS([ofp-print])
2005 AT_CHECK([ovs-ofctl ofp-print "01 16 00 0c 00 00 00 01 00 01 00 00"], [0], [dnl
2006 OFPT_QUEUE_GET_CONFIG_REQUEST (xid=0x1): port=1
2007 ])
2008 AT_CLEANUP
2009
2010 AT_SETUP([OFPT_QUEUE_GET_CONFIG_REQUEST - OF1.2])
2011 AT_KEYWORDS([ofp-print])
2012 AT_CHECK([ovs-ofctl ofp-print "\
2013 03 16 00 10 00 00 00 01 00 00 00 01 00 00 00 00"], [0], [dnl
2014 OFPT_QUEUE_GET_CONFIG_REQUEST (OF1.2) (xid=0x1): port=1
2015 ])
2016 AT_CLEANUP
2017
2018 AT_SETUP([OFPT_QUEUE_GET_CONFIG_REPLY - OF1.0])
2019 AT_KEYWORDS([ofp-print])
2020 AT_CHECK([ovs-ofctl ofp-print "01 17 00 40 00 00 00 01 \
2021 00 01 00 00 00 00 00 00 \
2022 00 00 55 55 00 28 00 00 \
2023 00 01 00 10 00 00 00 00 01 f4 00 00 00 00 00 00 \
2024 00 02 00 10 00 00 00 00 02 ee 00 00 00 00 00 00 \
2025 00 00 44 44 00 08 00 00 \
2026 "], [0], [dnl
2027 OFPT_QUEUE_GET_CONFIG_REPLY (xid=0x1): port=1
2028 queue 21845: min_rate:50.0% max_rate:75.0%
2029 queue 17476:
2030 ])
2031 AT_CLEANUP
2032
2033 AT_SETUP([OFPT_QUEUE_GET_CONFIG_REPLY - OF1.2])
2034 AT_KEYWORDS([ofp-print])
2035 AT_CHECK([ovs-ofctl ofp-print "03 17 00 50 00 00 00 01 \
2036 00 00 00 01 00 00 00 00 \
2037 00 00 55 55 00 00 00 01 00 30 00 00 00 00 00 00 \
2038 00 01 00 10 00 00 00 00 01 f4 00 00 00 00 00 00 \
2039 00 02 00 10 00 00 00 00 02 ee 00 00 00 00 00 00 \
2040 00 00 44 44 00 08 00 01 00 10 00 00 00 00 00 00 \
2041 "], [0], [dnl
2042 OFPT_QUEUE_GET_CONFIG_REPLY (OF1.2) (xid=0x1): port=1
2043 queue 21845: min_rate:50.0% max_rate:75.0%
2044 queue 17476:
2045 ])
2046 AT_CLEANUP
2047
2048 AT_SETUP([OFPT_SET_ASYNC - OF1.3])
2049 AT_KEYWORDS([ofp-print])
2050 AT_CHECK([ovs-ofctl ofp-print "\
2051 04 1c 00 20 00 00 00 00 00 00 10 05 00 00 10 07 \
2052 00 00 00 03 00 00 00 07 00 00 00 00 00 00 00 03 \
2053 "], [0], [dnl
2054 OFPT_SET_ASYNC (OF1.3) (xid=0x0):
2055  master:
2056        PACKET_IN: no_match invalid_ttl 12
2057      PORT_STATUS: add delete
2058     FLOW_REMOVED: (off)
2059
2060  slave:
2061        PACKET_IN: no_match action invalid_ttl 12
2062      PORT_STATUS: add delete modify
2063     FLOW_REMOVED: idle hard
2064 ])
2065 AT_CLEANUP
2066
2067 AT_SETUP([OFPT_ROLE_REQUEST - OF1.2])
2068 AT_KEYWORDS([ofp-print])
2069 AT_CHECK([ovs-ofctl ofp-print "\
2070 03 18 00 18 00 00 00 02 00 00 00 02 00 00 00 00 \
2071 00 00 00 00 00 00 00 03 \
2072 "], [0], [dnl
2073 OFPT_ROLE_REQUEST (OF1.2) (xid=0x2): role=master generation_id=3
2074 ])
2075 AT_CLEANUP
2076
2077 AT_SETUP([OFPT_ROLE_REQUEST - nochange - OF1.2])
2078 AT_KEYWORDS([ofp-print])
2079 AT_CHECK([ovs-ofctl ofp-print "\
2080 03 18 00 18 00 00 00 02 00 00 00 00 00 00 00 00 \
2081 00 00 00 00 00 00 00 00 \
2082 "], [0], [dnl
2083 OFPT_ROLE_REQUEST (OF1.2) (xid=0x2): role=nochange
2084 ])
2085 AT_CLEANUP
2086
2087 AT_SETUP([NXT_ROLE_REQUEST])
2088 AT_KEYWORDS([ofp-print])
2089 AT_CHECK([ovs-ofctl ofp-print "\
2090 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0a \
2091 00 00 00 01 \
2092 "], [0], [dnl
2093 NXT_ROLE_REQUEST (xid=0x2): role=master
2094 ])
2095 AT_CLEANUP
2096
2097 AT_SETUP([OFPT_ROLE_REPLY - OF1.2])
2098 AT_KEYWORDS([ofp-print])
2099 AT_CHECK([ovs-ofctl ofp-print "\
2100 03 19 00 18 00 00 00 02 00 00 00 03 00 00 00 00 \
2101 12 34 56 78 ab cd ef 90 \
2102 "], [0], [dnl
2103 OFPT_ROLE_REPLY (OF1.2) (xid=0x2): role=slave generation_id=1311768467750121360
2104 ])
2105 AT_CLEANUP
2106
2107 AT_SETUP([NXT_ROLE_REPLY])
2108 AT_KEYWORDS([ofp-print])
2109 AT_CHECK([ovs-ofctl ofp-print "\
2110 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0b \
2111 00 00 00 02 \
2112 "], [0], [dnl
2113 NXT_ROLE_REPLY (xid=0x2): role=slave
2114 ])
2115 AT_CLEANUP
2116
2117 AT_SETUP([OFP_ROLE_STATUS - master, experimenter - OF1.4])
2118 AT_KEYWORDS([ofp-print])
2119 AT_CHECK([ovs-ofctl ofp-print "\
2120 05 1e 00 18 00 00 00 0a \
2121 00 00 00 02 02 00 00 00 ff ff ff ff ff ff ff ff \
2122 "], [0], [dnl
2123 OFPT_ROLE_STATUS (OF 0x05) (xid=0xa): role=master reason=experimenter_data_changed
2124 ])
2125 AT_CLEANUP
2126
2127 AT_SETUP([OFP_ROLE_STATUS - master, config - OF1.4])
2128 AT_KEYWORDS([ofp-print])
2129 AT_CHECK([ovs-ofctl ofp-print "\
2130 05 1e 00 18 00 00 00 0a \
2131 00 00 00 02 01 00 00 00 ff ff ff ff ff ff ff ff \
2132 "], [0], [dnl
2133 OFPT_ROLE_STATUS (OF 0x05) (xid=0xa): role=master reason=configuration_changed
2134 ])
2135 AT_CLEANUP
2136
2137 AT_SETUP([OFP_ROLE_STATUS - master, config,generation - OF1.4])
2138 AT_KEYWORDS([ofp-print])
2139 AT_CHECK([ovs-ofctl ofp-print "\
2140 05 1e 00 18 00 00 00 0a \
2141 00 00 00 02 01 00 00 00 00 00 00 00 00 00 00 10 \
2142 "], [0], [dnl
2143 OFPT_ROLE_STATUS (OF 0x05) (xid=0xa): role=master generation_id=16 reason=configuration_changed
2144 ])
2145 AT_CLEANUP
2146
2147 AT_SETUP([NXT_SET_PACKET_IN])
2148 AT_KEYWORDS([ofp-print])
2149 AT_CHECK([ovs-ofctl ofp-print "\
2150 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 10 \
2151 00 00 00 01 \
2152 "], [0], [dnl
2153 NXT_SET_PACKET_IN_FORMAT (xid=0x2): format=nxm
2154 ])
2155 AT_CLEANUP
2156
2157 AT_SETUP([NXT_PACKET_IN])
2158 AT_KEYWORDS([ofp-print])
2159 AT_CHECK([ovs-ofctl ofp-print "\
2160 01 04 00 ba 00 00 00 00 00 00 23 20 00 00 00 11 \
2161 ff ff ff ff 00 40 01 07 00 00 00 00 00 00 00 09 \
2162 00 4e 00 00 00 00 00 00 00 00 00 02 00 01 00 01 \
2163 20 08 00 00 00 00 00 00 00 06 00 01 00 04 00 00 \
2164 00 01 00 01 02 04 00 00 00 02 00 01 04 04 00 00 \
2165 00 03 00 01 06 04 00 00 00 04 00 01 08 04 00 00 \
2166 00 05 80 00 05 10 5a 5a 5a 5a 5a 5a 5a 5a ff ff \
2167 ff ff ff ff ff ff 00 00 00 00 82 82 82 82 82 82 \
2168 80 81 81 81 81 81 81 00 00 50 08 00 45 00 00 28 \
2169 00 00 00 00 00 06 32 05 53 53 53 53 54 54 54 54 \
2170 00 55 00 56 00 00 00 00 00 00 00 00 50 02 00 00 \
2171 31 6d 00 00 00 00 00 00 00 00 \
2172 "], [0], [dnl
2173 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)
2174 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_flags=0x002 tcp_csum:316d
2175 ])
2176 AT_CLEANUP
2177
2178 AT_SETUP([NXT_PACKET_IN, with hex output of packet data])
2179 AT_KEYWORDS([ofp-print])
2180 AT_CHECK([ovs-ofctl ofp-print "\
2181 01 04 00 ba 00 00 00 00 00 00 23 20 00 00 00 11 \
2182 ff ff ff ff 00 40 01 07 00 00 00 00 00 00 00 09 \
2183 00 4e 00 00 00 00 00 00 00 00 00 02 00 01 00 01 \
2184 20 08 00 00 00 00 00 00 00 06 00 01 00 04 00 00 \
2185 00 01 00 01 02 04 00 00 00 02 00 01 04 04 00 00 \
2186 00 03 00 01 06 04 00 00 00 04 00 01 08 04 00 00 \
2187 00 05 80 00 05 10 5a 5a 5a 5a 5a 5a 5a 5a ff ff \
2188 ff ff ff ff ff ff 00 00 00 00 82 82 82 82 82 82 \
2189 80 81 81 81 81 81 81 00 00 50 08 00 45 00 00 28 \
2190 00 00 00 00 00 06 32 05 53 53 53 53 54 54 54 54 \
2191 00 55 00 56 00 00 00 00 00 00 00 00 50 01 00 00 \
2192 31 6d 00 00 00 00 00 00 00 00 \
2193 " 3], [0], [dnl
2194 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)
2195 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_flags=0x001 tcp_csum:316d
2196 00000000  82 82 82 82 82 82 80 81-81 81 81 81 81 00 00 50
2197 00000010  08 00 45 00 00 28 00 00-00 00 00 06 32 05 53 53
2198 00000020  53 53 54 54 54 54 00 55-00 56 00 00 00 00 00 00
2199 00000030  00 00 50 01 00 00 31 6d-00 00 00 00 00 00 00 00
2200 ])
2201 AT_CLEANUP
2202
2203 AT_SETUP([NXT_SET_ASYNC_CONFIG])
2204 AT_KEYWORDS([ofp-print])
2205 AT_CHECK([ovs-ofctl ofp-print "\
2206 01 04 00 28 00 00 00 00 00 00 23 20 00 00 00 13 \
2207 00 00 10 05 00 00 10 07 00 00 00 03 00 00 00 07 \
2208 00 00 00 00 00 00 00 03 \
2209 "], [0], [dnl
2210 NXT_SET_ASYNC_CONFIG (xid=0x0):
2211  master:
2212        PACKET_IN: no_match invalid_ttl 12
2213      PORT_STATUS: add delete
2214     FLOW_REMOVED: (off)
2215
2216  slave:
2217        PACKET_IN: no_match action invalid_ttl 12
2218      PORT_STATUS: add delete modify
2219     FLOW_REMOVED: idle hard
2220 ])
2221 AT_CLEANUP
2222
2223 AT_SETUP([NXT_SET_CONTROLLER_ID])
2224 AT_KEYWORDS([ofp-print])
2225 AT_CHECK([ovs-ofctl ofp-print "\
2226 01 04 00 18 00 00 00 03 00 00 23 20 00 00 00 14 \
2227 00 00 00 00 00 00 00 7b \
2228 "], [0], [dnl
2229 NXT_SET_CONTROLLER_ID (xid=0x3): id=123
2230 ])
2231 AT_CLEANUP
2232
2233 AT_SETUP([NXT_FLOW_MONITOR_CANCEL])
2234 AT_KEYWORDS([ofp-print])
2235 AT_CHECK([ovs-ofctl ofp-print "\
2236 01 04 00 14 00 00 00 03 00 00 23 20 00 00 00 15 \
2237 01 02 30 40 \
2238 "], [0], [dnl
2239 NXT_FLOW_MONITOR_CANCEL (xid=0x3): id=16920640
2240 ])
2241 AT_CLEANUP
2242
2243 AT_SETUP([NXT_FLOW_MONITOR_PAUSED])
2244 AT_KEYWORDS([ofp-print])
2245 AT_CHECK([ovs-ofctl ofp-print "\
2246 01 04 00 10 00 00 00 03 00 00 23 20 00 00 00 16 \
2247 "], [0], [dnl
2248 NXT_FLOW_MONITOR_PAUSED (xid=0x3):
2249 ])
2250 AT_CLEANUP
2251
2252 AT_SETUP([NXT_FLOW_MONITOR_RESUMED])
2253 AT_KEYWORDS([ofp-print])
2254 AT_CHECK([ovs-ofctl ofp-print "\
2255 01 04 00 10 00 00 00 03 00 00 23 20 00 00 00 17 \
2256 "], [0], [dnl
2257 NXT_FLOW_MONITOR_RESUMED (xid=0x3):
2258 ])
2259 AT_CLEANUP
2260
2261 AT_SETUP([NXT_SET_FLOW_FORMAT])
2262 AT_KEYWORDS([ofp-print])
2263 AT_CHECK([ovs-ofctl ofp-print "\
2264 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0c \
2265 00 00 00 02 \
2266 "], [0], [dnl
2267 NXT_SET_FLOW_FORMAT (xid=0x2): format=nxm
2268 ])
2269 AT_CLEANUP
2270
2271 # The flow is formatted with cls_rule_format() for the low-verbosity case.
2272 AT_SETUP([NXT_FLOW_MOD, low verbosity])
2273 AT_KEYWORDS([ofp-print])
2274 AT_CHECK([ovs-ofctl ofp-print "\
2275 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
2276 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
2277 ff ff ff ff 00 10 00 00 00 14 00 00 00 00 00 00 \
2278 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
2279 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
2280 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
2281 " 2], [0], [dnl
2282 NXT_FLOW_MOD (xid=0x2): ADD reg0=0x7b,tun_id=0x1c8 out_port:16 actions=load:0x5->NXM_NX_REG0[[]]
2283 ])
2284 AT_CLEANUP
2285
2286 # The flow is formatted with ofp10_match_to_string() for the
2287 # low-verbosity case.
2288 AT_SETUP([NXT_FLOW_MOD, high verbosity])
2289 AT_KEYWORDS([ofp-print])
2290 AT_CHECK([ovs-ofctl ofp-print "\
2291 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
2292 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
2293 ff ff ff ff 01 00 00 00 00 14 00 00 00 00 00 00 \
2294 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
2295 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
2296 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
2297 " 3], [0], [dnl
2298 NXT_FLOW_MOD (xid=0x2): ADD NXM_NX_TUN_ID(00000000000001c8), NXM_NX_REG0(0000007b) out_port:256 actions=load:0x5->NXM_NX_REG0[[]]
2299 ])
2300 AT_CLEANUP
2301
2302 AT_SETUP([OFPT_GROUP_MOD])
2303 AT_KEYWORDS([ofp-print])
2304 AT_CHECK([ovs-ofctl ofp-print "\
2305 02 0f 00 70 11 22 33 44 00 00 01 00 87 65 43 21 \
2306 00 20 00 64 00 00 00 01 ff ff ff ff 00 00 00 00 \
2307 00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
2308 00 20 00 c8 00 00 00 02 ff ff ff ff 00 00 00 00 \
2309 00 00 00 10 00 00 00 02 00 00 00 00 00 00 00 00 \
2310 00 20 00 c8 00 00 00 03 ff ff ff ff 00 00 00 00 \
2311 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
2312 "], [0], [dnl
2313 OFPT_GROUP_MOD (OF1.1) (xid=0x11223344):
2314  ADD group_id=2271560481,type=select,bucket=weight:100,watch_port:1,actions=output:1,bucket=weight:200,watch_port:2,actions=output:2,bucket=weight:200,watch_port:3,actions=output:3
2315 ])
2316 AT_CLEANUP
2317
2318 AT_SETUP([NXT_FLOW_REMOVED])
2319 AT_KEYWORDS([ofp-print])
2320 AT_CHECK([ovs-ofctl ofp-print "\
2321 01 04 00 78 00 00 00 00 00 00 23 20 00 00 00 0e \
2322 00 00 00 00 00 00 00 00 ff ff 00 02 00 00 00 06 \
2323 01 6e 36 00 00 05 00 3c 00 00 00 00 00 00 00 01 \
2324 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
2325 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
2326 00 05 00 00 06 02 08 06 00 00 08 02 00 00 00 00 \
2327 1e 02 00 02 00 00 20 04 c0 a8 00 01 00 00 22 04 \
2328 c0 a8 00 02 00 00 00 00 \
2329 "], [0], [dnl
2330 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 table_id=1 duration6.024s idle5 pkts1 bytes60
2331 ])
2332 AT_CLEANUP
2333
2334 AT_SETUP([NXT_FLOW_MOD_TABLE_ID])
2335 AT_KEYWORDS([ofp-print])
2336 AT_CHECK([ovs-ofctl ofp-print "\
2337 01 04 00 18 01 02 03 04 00 00 23 20 00 00 00 0f \
2338 01 00 00 00 00 00 00 00 \
2339 "], [0], [dnl
2340 NXT_FLOW_MOD_TABLE_ID (xid=0x1020304): enable
2341 ])
2342 AT_CLEANUP
2343
2344 AT_SETUP([NXST_FLOW request])
2345 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2346 AT_CHECK([ovs-ofctl ofp-print "\
2347 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
2348 00 00 00 00 00 00 00 00 ff ff 00 00 ff 00 00 00 \
2349 "], [0], [dnl
2350 NXST_FLOW request (xid=0x4): @&t@
2351 ])
2352 AT_CLEANUP
2353
2354 AT_SETUP([NXST_FLOW reply])
2355 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2356 AT_CHECK([ovs-ofctl ofp-print "\
2357 01 11 08 18 00 00 00 04 ff ff 00 00 00 00 23 20 \
2358 00 00 00 00 00 00 00 00 00 88 00 00 00 00 00 01 \
2359 02 dc 6c 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
2360 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
2361 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
2362 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
2363 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
2364 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
2365 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e7 00 00 \
2366 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
2367 00 88 00 00 00 00 00 03 32 11 62 00 ff ff 00 05 \
2368 00 00 00 4c 00 03 00 00 00 00 00 00 00 00 00 00 \
2369 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
2370 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
2371 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
2372 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2373 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
2374 00 00 12 02 09 e4 00 00 14 02 00 00 00 00 00 00 \
2375 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
2376 33 f9 aa 00 ff ff 00 05 00 00 00 4c 00 05 00 00 \
2377 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
2378 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
2379 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
2380 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
2381 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
2382 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
2383 14 02 09 e5 00 00 00 00 00 00 00 08 00 03 00 00 \
2384 00 88 00 00 00 00 00 04 2d 0f a5 00 ff ff 00 05 \
2385 00 00 00 4c 00 01 00 00 00 00 00 00 00 00 00 00 \
2386 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
2387 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
2388 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
2389 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2390 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
2391 00 00 12 02 09 e3 00 00 14 02 00 00 00 00 00 00 \
2392 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
2393 34 73 bc 00 ff ff 00 05 00 0a 00 4c 00 03 00 03 \
2394 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
2395 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
2396 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
2397 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
2398 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
2399 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e5 00 00 \
2400 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
2401 00 88 00 00 00 00 00 05 28 0d e8 00 ff ff 00 05 \
2402 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
2403 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
2404 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
2405 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
2406 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2407 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
2408 00 00 12 02 09 e2 00 00 14 02 00 00 00 00 00 00 \
2409 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 01 \
2410 02 62 5a 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
2411 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
2412 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
2413 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
2414 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
2415 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
2416 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
2417 14 02 09 e7 00 00 00 00 00 00 00 08 00 03 00 00 \
2418 00 88 00 00 00 00 00 01 38 be 5e 00 ff ff 00 05 \
2419 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
2420 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
2421 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
2422 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
2423 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2424 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
2425 00 00 12 02 00 00 00 00 14 02 09 e6 00 00 00 00 \
2426 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 04 \
2427 27 d0 df 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
2428 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
2429 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
2430 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
2431 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
2432 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
2433 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
2434 14 02 09 e3 00 00 00 00 00 00 00 08 00 03 00 00 \
2435 00 88 00 00 00 00 00 03 2c d2 9c 00 ff ff 00 05 \
2436 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
2437 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
2438 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
2439 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
2440 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2441 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
2442 00 00 12 02 00 00 00 00 14 02 09 e4 00 00 00 00 \
2443 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
2444 0a 40 83 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
2445 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
2446 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
2447 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
2448 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
2449 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
2450 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e8 00 00 \
2451 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
2452 00 88 00 00 00 00 00 05 25 31 7c 00 ff ff 00 05 \
2453 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
2454 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
2455 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
2456 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
2457 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2458 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
2459 00 00 12 02 00 00 00 00 14 02 09 e2 00 00 00 00 \
2460 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
2461 04 c4 b4 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
2462 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
2463 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
2464 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
2465 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
2466 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
2467 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
2468 14 02 09 e8 00 00 00 00 00 00 00 08 00 03 00 00 \
2469 00 88 00 00 00 00 00 01 39 38 70 00 ff ff 00 05 \
2470 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
2471 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
2472 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
2473 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
2474 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
2475 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
2476 00 00 12 02 09 e6 00 00 14 02 00 00 00 00 00 00 \
2477 00 00 00 08 00 01 00 00 00 60 00 00 00 00 00 e4 \
2478 2e 7d db 00 80 00 00 00 00 00 00 14 00 00 00 00 \
2479 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
2480 00 00 00 00 00 00 00 00 00 01 20 08 00 00 00 00 \
2481 00 00 01 c8 00 01 00 04 00 00 00 7b 00 00 00 00 \
2482 ff ff 00 18 00 00 23 20 00 07 00 1f 00 01 00 04 \
2483 00 00 00 00 00 00 00 05 \
2484 00 30 01 00 00 00 0e 10 00 07 a1 20 80 00 00 00 \
2485 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
2486 00 00 00 00 00 00 00 64 00 00 00 00 00 00 19 00 \
2487 "], [0],
2488 [[NXST_FLOW reply (xid=0x4):
2489  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
2490  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
2491  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
2492  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
2493  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
2494  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
2495  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
2496  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
2497  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
2498  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
2499  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
2500  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
2501  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
2502  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
2503  cookie=0x0, duration=228.78s, table=0, n_packets=0, n_bytes=0, reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[]
2504  cookie=0x0, duration=3600.0005s, table=1, n_packets=100, n_bytes=6400, actions=drop
2505 ]])
2506 AT_CLEANUP
2507
2508 AT_SETUP([NXST_AGGREGATE request])
2509 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2510 AT_CHECK([ovs-ofctl ofp-print "\
2511 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
2512 00 00 00 01 00 00 00 00 ff ff 00 00 ff 00 00 00 \
2513 "], [0], [dnl
2514 NXST_AGGREGATE request (xid=0x4): @&t@
2515 ])
2516 AT_CLEANUP
2517
2518 AT_SETUP([NXST_AGGREGATE reply])
2519 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2520 AT_CHECK([ovs-ofctl ofp-print "\
2521 01 11 00 30 00 00 00 04 ff ff 00 00 00 00 23 20 \
2522 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 07 \
2523 00 00 00 00 00 00 01 a4 00 00 00 07 00 00 00 00 \
2524 "], [0], [dnl
2525 NXST_AGGREGATE reply (xid=0x4): packet_count=7 byte_count=420 flow_count=7
2526 ])
2527 AT_CLEANUP
2528
2529 AT_SETUP([NXST_FLOW_MONITOR request])
2530 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2531 AT_CHECK([ovs-ofctl ofp-print "\
2532 01 10 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 02 00 00 00 00 \
2533 00 00 40 00 00 3f ff fe 00 00 01 00 00 00 00 00 \
2534 00 00 20 00 00 04 ff ff 00 06 02 00 00 00 00 00 00 00 00 02 00 01 00 00 \
2535 "], [0], [dnl
2536 NXST_FLOW_MONITOR request (xid=0x4):
2537  id=16384 flags=initial,add,delete,modify,actions,own out_port=LOCAL table=1
2538  id=8192 flags=delete table=2 in_port=1
2539 ])
2540 AT_CLEANUP
2541
2542 AT_SETUP([NXST_FLOW_MONITOR reply])
2543 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2544 AT_CHECK([ovs-ofctl ofp-print "\
2545 01 11 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 02 00 00 00 00 \
2546 00 20 00 01 00 05 80 00 00 05 00 10 00 06 01 00 12 34 56 78 9a bc de f0 \
2547 00 00 00 02 00 01 00 00 \
2548 00 08 00 03 00 01 86 a0 \
2549 "], [0], [dnl
2550 NXST_FLOW_MONITOR reply (xid=0x4):
2551  event=DELETED reason=eviction table=1 idle_timeout=5 hard_timeout=16 cookie=0x123456789abcdef0 in_port=1
2552  event=ABBREV xid=0x186a0
2553 ])
2554 AT_CLEANUP