24e602e7fd68d88e4b46fd65b33e5c04e30b658f
[cascardo/ovs.git] / tests / ofp-print.at
1 AT_BANNER([ofp-print])
2
3 AT_SETUP([empty])
4 AT_KEYWORDS([ofp-print])
5 AT_CHECK([ovs-ofctl ofp-print ''], [0], [OpenFlow message is empty
6 ])
7 AT_CLEANUP
8
9 AT_SETUP([too short])
10 AT_KEYWORDS([ofp-print])
11 AT_CHECK([ovs-ofctl ofp-print aabb], [0], [dnl
12 OpenFlow packet too short (only 2 bytes):
13 00000000  aa bb                                           |..              |
14 ])
15 AT_CLEANUP
16
17 AT_SETUP([wrong OpenFlow version])
18 AT_KEYWORDS([ofp-print])
19 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print 00bb0008eeff0011],
20   [0], [dnl
21 ***decode error: OFPBRC_BAD_TYPE***
22 00000000  00 bb 00 08 ee ff 00 11-                        |........        |
23 ], [ofp_msgs|WARN|unknown OpenFlow message (version 0, type 187)
24 ])
25 AT_CLEANUP
26
27 AT_SETUP([truncated message])
28 AT_KEYWORDS([ofp-print])
29 AT_CHECK([ovs-ofctl ofp-print 0110ccddeeff0011], [0], [dnl
30 (***truncated to 8 bytes from 52445***)
31 00000000  01 10 cc dd ee ff 00 11-                        |........        |
32 ])
33 AT_CLEANUP
34
35 AT_SETUP([message only uses part of buffer])
36 AT_KEYWORDS([ofp-print])
37 AT_CHECK([ovs-ofctl ofp-print 01100009eeff00112233], [0], [dnl
38 (***only uses 9 bytes out of 10***)
39 00000000  01 10 00 09 ee ff 00 11-22 33                   |........"3      |
40 ])
41 # "
42 AT_CLEANUP
43
44 AT_SETUP([OFPT_HELLO - ordinary])
45 AT_KEYWORDS([ofp-print])
46 AT_CHECK([ovs-ofctl ofp-print 0100000800000000], [0], [dnl
47 OFPT_HELLO (xid=0x0):
48  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 enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst
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,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=syn 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,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=ack 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.1])
473 AT_KEYWORDS([ofp-print])
474 AT_CHECK([ovs-ofctl ofp-print "\
475 02 0a 00 54 00 00 00 00 00 00 01 11 00 00 00 03 \
476 00 00 00 03 00 3c 00 00 \
477 50 54 00 00 00 06 50 54 00 00 00 05 08 00 \
478 45 00 00 28 bd 12 00 00 40 06 3c 6a c0 a8 00 01 \
479 c0 a8 00 02 27 2f 00 00 78 50 cc 5b 57 af 42 1e \
480 50 02 02 00 26 e8 00 00 00 00 00 00 00 00 \
481 "], [0], [dnl
482 OFPT_PACKET_IN (OF1.1) (xid=0x0): total_len=60 in_port=3 (via no_match) data_len=60 buffer=0x00000111
483 tcp,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=syn tcp_csum:26e8
484 ])
485 AT_CLEANUP
486
487 AT_SETUP([OFPT_PACKET_IN - OF1.2])
488 AT_KEYWORDS([ofp-print])
489 AT_CHECK([ovs-ofctl ofp-print "\
490 03 0a 00 4c 00 00 00 00 ff ff ff 00 00 2a 00 00 \
491 00 01 00 0c 80 00 00 04 ff ff ff fe 00 00 00 00 \
492 00 00 ff ff ff ff ff ff 00 23 20 83 c1 5f 80 35 \
493 00 01 08 00 06 04 00 01 00 23 20 83 c1 5f 00 00 \
494 00 00 00 23 20 83 c1 5f 00 00 00 00 \
495 "], [0], [dnl
496 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
497 rarp,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
498 ])
499 AT_CLEANUP
500
501 AT_SETUP([OFPT_PACKET_IN - OF1.2, with hex output of packet data])
502 AT_KEYWORDS([ofp-print])
503 AT_CHECK([ovs-ofctl ofp-print "\
504 03 0a 00 4c 00 00 00 00 ff ff ff 00 00 2a 00 00 \
505 00 01 00 0c 80 00 00 04 ff ff ff fe 00 00 00 00 \
506 00 00 ff ff ff ff ff ff 00 23 20 83 c1 5f 80 35 \
507 00 01 08 00 06 04 00 03 00 23 20 83 c1 5f 00 00 \
508 00 00 00 23 20 83 c1 5f 00 00 00 00 \
509 " 3], [0], [dnl
510 OFPT_PACKET_IN (OF1.2) (xid=0x0): total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
511 rarp,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
512 00000000  ff ff ff ff ff ff 00 23-20 83 c1 5f 80 35 00 01
513 00000010  08 00 06 04 00 03 00 23-20 83 c1 5f 00 00 00 00
514 00000020  00 23 20 83 c1 5f 00 00-00 00
515 ])
516 AT_CLEANUP
517
518 AT_SETUP([OFPT_PACKET_IN - OF1.3])
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 "], [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,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 ])
531 AT_CLEANUP
532
533 AT_SETUP([OFPT_PACKET_IN - OF1.4])
534 AT_KEYWORDS([ofp-print])
535 AT_CHECK([ovs-ofctl ofp-print "\
536 05 0a 00 54 00 00 00 00 ff ff ff 00 00 2a 00 00 \
537 01 02 03 04 05 06 07 08 00 01 00 0c 80 00 00 04 \
538 ff ff ff fe 00 00 00 00 00 00 ff ff ff ff ff ff \
539 00 23 20 83 c1 5f 80 35 00 01 08 00 06 04 00 03 \
540 00 23 20 83 c1 5f 00 00 00 00 00 23 20 83 c1 5f \
541 00 00 00 00 \
542 "], [0], [dnl
543 OFPT_PACKET_IN (OF1.4) (xid=0x0): cookie=0x102030405060708 total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
544 rarp,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
545 ])
546 AT_CLEANUP
547
548 AT_SETUP([OFPT_PACKET_IN - OF1.5])
549 AT_KEYWORDS([ofp-print])
550 AT_CHECK([ovs-ofctl ofp-print "\
551 06 0a 00 54 00 00 00 00 ff ff ff 00 00 2a 00 00 \
552 01 02 03 04 05 06 07 08 00 01 00 0c 80 00 00 04 \
553 ff ff ff fe 00 00 00 00 00 00 ff ff ff ff ff ff \
554 00 23 20 83 c1 5f 80 35 00 01 08 00 06 04 00 03 \
555 00 23 20 83 c1 5f 00 00 00 00 00 23 20 83 c1 5f \
556 00 00 00 00 \
557 "], [0], [dnl
558 OFPT_PACKET_IN (OF1.5) (xid=0x0): cookie=0x102030405060708 total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
559 rarp,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
560 ])
561 AT_CLEANUP
562
563 AT_SETUP([OFPT_PACKET_IN - OF1.3, with hex output of packet data])
564 AT_KEYWORDS([ofp-print])
565 AT_CHECK([ovs-ofctl ofp-print "\
566 04 0a 00 54 00 00 00 00 ff ff ff 00 00 2a 00 00 \
567 01 02 03 04 05 06 07 08 00 01 00 0c 80 00 00 04 \
568 ff ff ff fe 00 00 00 00 00 00 ff ff ff ff ff ff \
569 00 23 20 83 c1 5f 80 35 00 01 08 00 06 04 00 03 \
570 00 23 20 83 c1 5f 00 00 00 00 00 23 20 83 c1 5f \
571 00 00 00 00 \
572 " 3], [0], [dnl
573 OFPT_PACKET_IN (OF1.3) (xid=0x0): cookie=0x102030405060708 total_len=42 in_port=LOCAL (via no_match) data_len=42 buffer=0xffffff00
574 rarp,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
575 00000000  ff ff ff ff ff ff 00 23-20 83 c1 5f 80 35 00 01
576 00000010  08 00 06 04 00 03 00 23-20 83 c1 5f 00 00 00 00
577 00000020  00 23 20 83 c1 5f 00 00-00 00
578 ])
579 AT_CLEANUP
580
581 AT_SETUP([OFPT_FLOW_REMOVED - OF1.0])
582 AT_KEYWORDS([ofp-print])
583 AT_CHECK([ovs-ofctl ofp-print "\
584 01 0b 00 58 00 00 00 00 00 00 00 00 00 03 50 54 \
585 00 00 00 05 50 54 00 00 00 06 ff ff 00 00 08 06 \
586 00 02 00 00 c0 a8 00 01 c0 a8 00 02 00 00 00 00 \
587 00 00 00 00 00 00 00 00 ff ff 00 00 00 00 00 05 \
588 30 e0 35 00 00 05 00 00 00 00 00 00 00 00 00 01 \
589 00 00 00 00 00 00 00 3c \
590 "], [0], [dnl
591 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.820s idle5 pkts1 bytes60
592 ])
593 AT_CLEANUP
594
595 AT_SETUP([OFPT_FLOW_REMOVED - OF1.2])
596 AT_KEYWORDS([ofp-print])
597 AT_CHECK([ovs-ofctl ofp-print "\
598 03 0b 00 40 00 00 00 00 fe dc ba 98 76 54 32 10 \
599 80 00 01 05 00 00 00 01 00 98 96 80 00 3c 00 78 \
600 00 00 00 00 00 12 d6 87 00 00 00 00 6f 68 ba 66 \
601 00 01 00 0a 80 00 0c 02 10 09 00 00 00 00 00 00"], [0], [dnl
602 OFPT_FLOW_REMOVED (OF1.2) (xid=0x0): dl_vlan=9 reason=hard table_id=5 cookie:0xfedcba9876543210 duration1.010s idle60 hard120 pkts1234567 bytes1869134438
603 ])
604 AT_CLEANUP
605
606 AT_SETUP([OFPT_FLOW_REMOVED - OF1.3])
607 AT_KEYWORDS([ofp-print])
608 AT_CHECK([ovs-ofctl ofp-print "\
609 04 0b 00 40 00 00 00 00 fe dc ba 98 76 54 32 10 \
610 80 00 01 05 00 00 00 01 00 98 96 80 00 3c 00 78 \
611 00 00 00 00 00 12 d6 87 00 00 00 00 6f 68 ba 66 \
612 00 01 00 0a 80 00 0c 02 10 09 00 00 00 00 00 00"], [0], [dnl
613 OFPT_FLOW_REMOVED (OF1.3) (xid=0x0): dl_vlan=9 reason=hard table_id=5 cookie:0xfedcba9876543210 duration1.010s idle60 hard120 pkts1234567 bytes1869134438
614 ])
615 AT_CLEANUP
616
617 AT_SETUP([OFPT_PORT_STATUS - OF1.0])
618 AT_KEYWORDS([ofp-print])
619 AT_CHECK([ovs-ofctl ofp-print "\
620 01 0c 00 40 00 00 00 00 02 00 00 00 00 00 00 00 \
621 00 03 50 54 00 00 00 01 65 74 68 30 00 00 00 00 \
622 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 01 \
623 00 00 02 08 00 00 02 8f 00 00 02 8f 00 00 00 00 \
624 "], [0], [dnl
625 OFPT_PORT_STATUS (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
626      config:     PORT_DOWN
627      state:      LINK_DOWN
628      current:    100MB-FD AUTO_NEG
629      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
630      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
631      speed: 100 Mbps now, 100 Mbps max
632 ])
633 AT_CLEANUP
634
635 AT_SETUP([OFPT_PORT_STATUS - OF1.1])
636 AT_KEYWORDS([ofp-print])
637 AT_CHECK([ovs-ofctl ofp-print "\
638 02 0c 00 50 00 00 00 00 02 00 00 00 00 00 00 00 \
639 00 00 00 03 00 00 00 00 50 54 00 00 00 01 00 00 \
640 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
641 00 00 00 00 00 00 00 00 00 00 20 08 00 00 28 0f \
642 00 00 28 0f 00 00 00 00 00 01 86 a0 00 01 86 a0 \
643 "], [0], [dnl
644 OFPT_PORT_STATUS (OF1.1) (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
645      config:     0
646      state:      0
647      current:    100MB-FD AUTO_NEG
648      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
649      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
650      speed: 100 Mbps now, 100 Mbps max
651 ])
652 AT_CLEANUP
653
654 AT_SETUP([OFPT_PORT_STATUS - OF1.4])
655 AT_KEYWORDS([ofp-print])
656 AT_CHECK([ovs-ofctl ofp-print "\
657 05 0c 00 58 00 00 00 00 02 00 00 00 00 00 00 00 \
658 00 00 00 03 00 48 00 00 50 54 00 00 00 01 00 00 \
659 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
660 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 \
661 00 00 20 08 00 00 28 0f 00 00 28 0f 00 00 00 00 \
662 00 01 86 a0 00 01 86 a0 \
663 "], [0], [dnl
664 OFPT_PORT_STATUS (OF1.4) (xid=0x0): MOD: 3(eth0): addr:50:54:00:00:00:01
665      config:     0
666      state:      0
667      current:    100MB-FD AUTO_NEG
668      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
669      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
670      speed: 100 Mbps now, 100 Mbps max
671 ])
672 AT_CLEANUP
673
674 AT_SETUP([OFPT_PACKET_OUT - OF1.0])
675 AT_KEYWORDS([ofp-print])
676 AT_CHECK([ovs-ofctl ofp-print "\
677 01 0d 00 54 00 00 00 00 00 00 01 14 00 01 00 08 \
678 00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
679 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
680 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
681 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
682 00 00 00 00 \
683 "], [0], [dnl
684 OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 buffer=0x00000114
685 ])
686 AT_CLEANUP
687
688 AT_SETUP([OFPT_PACKET_OUT - OF1.0, with packet])
689 AT_KEYWORDS([ofp-print])
690 AT_CHECK([ovs-ofctl ofp-print "\
691 01 0d 00 54 00 00 00 00 ff ff ff ff 00 01 00 08 \
692 00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
693 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
694 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
695 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
696 00 00 00 00 \
697 "], [0], [dnl
698 OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 data_len=60
699 tcp,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=rst|ack tcp_csum:6d75
700 ])
701 AT_CLEANUP
702
703 AT_SETUP([OFPT_PACKET_OUT - OF1.0, with hex output of packet data])
704 AT_KEYWORDS([ofp-print])
705 AT_CHECK([ovs-ofctl ofp-print "\
706 01 0d 00 54 00 00 00 00 ff ff ff ff 00 01 00 08 \
707 00 00 00 08 00 03 00 00 50 54 00 00 00 05 50 54 \
708 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
709 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
710 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
711 00 00 00 00 \
712 " 3], [0], [dnl
713 OFPT_PACKET_OUT (xid=0x0): in_port=1 actions=output:3 data_len=60
714 tcp,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=rst|ack tcp_csum:6d75
715 00000000  50 54 00 00 00 05 50 54-00 00 00 06 08 00 45 00
716 00000010  00 28 00 00 40 00 40 06-b9 7c c0 a8 00 02 c0 a8
717 00000020  00 01 00 00 2b 60 00 00-00 00 6a 4f 2b 58 50 14
718 00000030  00 00 6d 75 00 00 00 00-00 00 00 00
719 ])
720 AT_CLEANUP
721
722 AT_SETUP([OFPT_PACKET_OUT - OF1.1])
723 AT_KEYWORDS([ofp-print])
724 AT_CHECK([ovs-ofctl ofp-print "\
725 03 0d 00 28 88 58 df c5 ff ff ff 00 ff ff ff fe \
726 00 10 00 00 00 00 00 00 00 00 00 10 ff ff ff fb \
727 05 dc 00 00 00 00 00 00 \
728 "], [0], [dnl
729 OFPT_PACKET_OUT (OF1.2) (xid=0x8858dfc5): in_port=LOCAL actions=FLOOD buffer=0xffffff00
730 ])
731 AT_CLEANUP
732
733 AT_SETUP([OFPT_PACKET_OUT - OF1.1, with packet])
734 AT_KEYWORDS([ofp-print])
735 AT_CHECK([ovs-ofctl ofp-print "\
736 03 0d 00 64 88 58 df c5 ff ff ff ff ff ff ff fe \
737 00 10 00 00 00 00 00 00 00 00 00 10 ff ff ff fb \
738 05 dc 00 00 00 00 00 00 50 54 00 00 00 05 50 54 \
739 00 00 00 06 08 00 45 00 00 28 00 00 40 00 40 06 \
740 b9 7c c0 a8 00 02 c0 a8 00 01 00 00 2b 60 00 00 \
741 00 00 6a 4f 2b 58 50 14 00 00 6d 75 00 00 00 00 \
742 00 00 00 00 \
743 "], [0], [dnl
744 OFPT_PACKET_OUT (OF1.2) (xid=0x8858dfc5): in_port=LOCAL actions=FLOOD data_len=60
745 tcp,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=rst|ack tcp_csum:6d75
746 ])
747 AT_CLEANUP
748
749 # The flow is formatted with cls_rule_format() for the low-verbosity case.
750 AT_SETUP([OFPT_FLOW_MOD - OF1.0 - low verbosity])
751 AT_KEYWORDS([ofp-print])
752 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
753 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
754 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
755 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
756 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
757 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
758 " 2], [0], [dnl
759 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
760 ], [dnl
761 ofp_util|INFO|normalization changed ofp_match, details:
762 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
763 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
764 ])
765 AT_CLEANUP
766
767 # The flow is formatted with cls_rule_format() for the low-verbosity case.
768 AT_SETUP([OFPT_FLOW_MOD - OF1.1 - low verbosity])
769 AT_KEYWORDS([ofp-print])
770 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
771 020e 0090 01020304 \
772 da1aa3e035d87158 ffffffffffffffff \
773 02 01 003c 0078 9c40 ffffffff ffffffff ffffffff 0003 \
774 0000 \
775 \
776 0000 0058 00000000 000003f7 \
777 000000000000ffffffffffff 000000000000ffffffffffff \
778 0000 00 00 0806 00 00 c0a88000000000ff 00000000ffffffff 0000 0000 \
779 00000000 00 000000 0000000000000000ffffffffffffffff \
780 \
781 0001 0008 03 000000 \
782 " 2], [0], [dnl
783 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
784 ])
785 AT_CLEANUP
786
787 # The flow is formatted with cls_rule_format() for the low-verbosity case.
788 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
789 AT_KEYWORDS([ofp-print])
790 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
791 03 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
792 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
793 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
794 00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
795 50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
796 80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
797 00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
798 00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
799 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
800 " 2], [0], [dnl
801 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
802 ], [dnl
803 ])
804 AT_CLEANUP
805
806 # The flow is formatted with ofp10_match_to_string() for the
807 # high-verbosity case.
808 AT_SETUP([OFPT_FLOW_MOD - OF1.0 - high verbosity])
809 AT_KEYWORDS([ofp-print])
810 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
811 01 0e 00 50 00 00 00 00 00 00 00 00 00 01 50 54 \
812 00 00 00 06 50 54 00 00 00 05 ff ff 00 00 08 06 \
813 00 02 00 00 c0 a8 00 02 c0 a8 00 01 00 00 00 00 \
814 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 00 \
815 00 00 01 0e 00 00 00 00 00 00 00 08 00 03 00 00 \
816 " 3], [0], [dnl
817 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
818 ], [dnl
819 ofp_util|INFO|normalization changed ofp_match, details:
820 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
821 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
822 ])
823 AT_CLEANUP
824
825 # The flow is formatted with cls_rule_format() for the low-verbosity case.
826 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - low verbosity])
827 AT_KEYWORDS([ofp-print])
828 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
829 03 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
830 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
831 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
832 00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
833 50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
834 80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
835 00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
836 00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
837 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
838 " 2], [0], [dnl
839 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
840 ], [dnl
841 ])
842 AT_CLEANUP
843
844 # The flow is formatted with cls_rule_format() for the low-verbosity case.
845 AT_SETUP([OFPT_FLOW_MOD - OF1.3 - flags - low verbosity])
846 AT_KEYWORDS([ofp-print])
847 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
848 04 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
849 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
850 ff ff ff ff ff ff ff ff ff ff ff ff 00 1f 00 00 \
851 00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
852 50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
853 80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
854 00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
855 00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
856 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
857 " 2], [0], [dnl
858 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
859 ], [dnl
860 ])
861 AT_CLEANUP
862
863 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field ip_src])
864 AT_KEYWORDS([ofp-print])
865 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
866 03 0e 00 58 52 33 45 02 00 00 00 00 00 00 00 00 \
867 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
868 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
869 00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
870 00 04 00 18 00 00 00 00 00 19 00 10 80 00 16 04 \
871 c0 a8 03 5c 00 00 00 00                         \
872 " 2], [0], [dnl
873 OFPT_FLOW_MOD (OF1.2) (xid=0x52334502): ADD priority=255,ip actions=set_field:192.168.3.92->ip_src
874 ], [dnl
875 ])
876 AT_CLEANUP
877
878 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field ip_dst])
879 AT_KEYWORDS([ofp-print])
880 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
881 03 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
882 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
883 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
884 00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
885 00 04 00 18 00 00 00 00 00 19 00 10 80 00 18 04 \
886 c0 a8 4a 7a 00 00 00 00                         \
887 " 2], [0], [dnl
888 OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,ip actions=set_field:192.168.74.122->ip_dst
889 ], [dnl
890 ])
891 AT_CLEANUP
892
893 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field sctp_src])
894 AT_KEYWORDS([ofp-print])
895 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
896 03 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
897 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
898 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
899 00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
900 00 04 00 18 00 00 00 00 00 19 00 10 80 00 22 02 \
901 0d 06 00 00 00 00 00 00                         \
902 " 2], [0], [dnl
903 OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,sctp actions=set_field:3334->sctp_src
904 ], [dnl
905 ])
906 AT_CLEANUP
907
908 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field sctp_dst])
909 AT_KEYWORDS([ofp-print])
910 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
911 03 0e 00 58 52 33 45 07 00 00 00 00 00 00 00 00 \
912 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
913 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
914 00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
915 00 04 00 18 00 00 00 00 00 19 00 10 80 00 24 02 \
916 11 5d 00 00 00 00 00 00                         \
917 " 2], [0], [dnl
918 OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,sctp actions=set_field:4445->sctp_dst
919 ], [dnl
920 ])
921 AT_CLEANUP
922
923 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - experimenter OXM])
924 AT_KEYWORDS([ofp-print])
925 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
926 03 0e 00 48 52 33 45 07 00 00 00 00 00 00 00 00 \
927 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
928 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
929 00 01 00 14 ff ff 01 0c 00 00 23 20 01 23 45 67 \
930 0f ff ff ff 00 00 00 00
931 " 2], [0], [dnl
932 OFPT_FLOW_MOD (OF1.2) (xid=0x52334507): ADD priority=255,dp_hash=0x1234567/0xfffffff actions=drop
933 ], [dnl
934 ])
935 AT_CLEANUP
936
937 AT_SETUP([OFPT_FLOW_MOD - OF1.2 - set-field nd_target, nd_sll])
938 AT_KEYWORDS([ofp-print])
939 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
940 03 0e 00 78 00 00 00 02 00 00 00 00 00 00 00 00 \
941 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff \
942 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
943 00 01 00 14 80 00 0a 02 86 dd 80 00 14 01 3a 80 \
944 00 3a 01 87 00 00 00 00 00 04 00 30 00 00 00 00 \
945 00 19 00 18 80 00 3e 10 00 00 00 00 00 00 00 00 \
946 00 00 00 00 00 00 00 01 00 19 00 10 80 00 40 06 \
947 aa aa aa aa aa aa 00 00
948 " 2], [0], [dnl
949 OFPT_FLOW_MOD (OF1.2) (xid=0x2): ADD priority=255,icmp6,icmp_type=135 actions=set_field:::1->nd_target,set_field:aa:aa:aa:aa:aa:aa->nd_sll
950 ], [dnl
951 ])
952 AT_CLEANUP
953
954 dnl This triggered a buggy "instructions out of order" message earlier.
955 AT_SETUP([OFPT_FLOW_MOD - OF1.3 - meter])
956 AT_KEYWORDS([ofp-print])
957 AT_CHECK([ovs-ofctl ofp-print "\
958 04 0e 00 40 cf fe 6b 86 00 00 00 00 00 00 00 00 \
959 00 00 00 00 00 00 00 00 00 00 00 00 00 00 03 e8 \
960 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
961 00 01 00 04 00 00 00 00 00 06 00 08 00 00 00 01"], [0], [dnl
962 OFPT_FLOW_MOD (OF1.3) (xid=0xcffe6b86): ADD priority=1000 actions=meter:1
963 ])
964 AT_CLEANUP
965
966 AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field ip_src])
967 AT_KEYWORDS([ofp-print])
968 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
969 03 13 00 68 52 33 45 04 00 01 00 00 00 00 00 00 \
970 00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
971 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
972 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
973 00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
974 00 04 00 18 00 00 00 00 00 19 00 10 80 00 16 04 \
975 c0 a8 03 5c 00 00 00 00                         \
976 " 2], [0], [dnl
977 OFPST_FLOW reply (OF1.2) (xid=0x52334504):
978  cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,ip actions=set_field:192.168.3.92->ip_src
979 ], [dnl
980 ])
981 AT_CLEANUP
982
983 AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field ip_dst])
984 AT_KEYWORDS([ofp-print])
985 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
986 03 13 00 68 52 33 45 09 00 01 00 00 00 00 00 00 \
987 00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
988 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
989 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
990 00 01 00 0a 80 00 0a 02 08 00 00 00 00 00 00 00 \
991 00 04 00 18 00 00 00 00 00 19 00 10 80 00 18 04 \
992 c0 a8 4a 7a 00 00 00 00                         \
993 " 2], [0], [dnl
994 OFPST_FLOW reply (OF1.2) (xid=0x52334509):
995  cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,ip actions=set_field:192.168.74.122->ip_dst
996 ], [dnl
997 ])
998 AT_CLEANUP
999
1000 AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field sctp_src])
1001 AT_KEYWORDS([ofp-print])
1002 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
1003 03 13 00 68 52 33 45 04 00 01 00 00 00 00 00 00 \
1004 00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
1005 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1006 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1007 00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
1008 00 04 00 18 00 00 00 00 00 19 00 10 80 00 22 02 \
1009 0d 06 00 00 00 00 00 00                         \
1010 " 2], [0], [dnl
1011 OFPST_FLOW reply (OF1.2) (xid=0x52334504):
1012  cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,sctp actions=set_field:3334->sctp_src
1013 ], [dnl
1014 ])
1015 AT_CLEANUP
1016
1017 AT_SETUP([OFPT_FLOW reply - OF1.2 - set-field sctp_dst])
1018 AT_KEYWORDS([ofp-print])
1019 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
1020 03 13 00 68 52 33 45 09 00 01 00 00 00 00 00 00 \
1021 00 58 00 00 00 00 00 00 00 00 00 00 00 ff 00 00 \
1022 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1023 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1024 00 01 00 0f 80 00 0a 02 08 00 80 00 14 01 84 00 \
1025 00 04 00 18 00 00 00 00 00 19 00 10 80 00 24 02 \
1026 11 5d 00 00 00 00 00 00                         \
1027 " 2], [0], [dnl
1028 OFPST_FLOW reply (OF1.2) (xid=0x52334509):
1029  cookie=0x0, duration=0s, table=0, n_packets=0, n_bytes=0, priority=255,sctp actions=set_field:4445->sctp_dst
1030 ], [dnl
1031 ])
1032 AT_CLEANUP
1033
1034 AT_SETUP([OFPT_PORT_MOD - OF1.0])
1035 AT_KEYWORDS([ofp-print])
1036 AT_CHECK([ovs-ofctl ofp-print "\
1037 01 0f 00 20 00 00 00 03 00 03 50 54 00 00 00 01 \
1038 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
1039 " 3], [0], [dnl
1040 OFPT_PORT_MOD (xid=0x3): port: 3: addr:50:54:00:00:00:01
1041      config: PORT_DOWN
1042      mask:   PORT_DOWN
1043      advertise: UNCHANGED
1044 ])
1045 AT_CLEANUP
1046
1047 AT_SETUP([OFPT_PORT_MOD - OF1.1])
1048 AT_KEYWORDS([ofp-print])
1049 AT_CHECK([ovs-ofctl ofp-print "\
1050 02 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
1051 50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
1052 00 00 00 00 00 00 00 00 \
1053 " 3], [0], [dnl
1054 OFPT_PORT_MOD (OF1.1) (xid=0x3): port: 3: addr:50:54:00:00:00:01
1055      config: PORT_DOWN
1056      mask:   PORT_DOWN
1057      advertise: UNCHANGED
1058 ])
1059 AT_CLEANUP
1060
1061 AT_SETUP([OFPT_PORT_MOD - OF1.2])
1062 AT_KEYWORDS([ofp-print])
1063 AT_CHECK([ovs-ofctl ofp-print "\
1064 03 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
1065 50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
1066 00 00 00 00 00 00 00 00 \
1067 " 3], [0], [dnl
1068 OFPT_PORT_MOD (OF1.2) (xid=0x3): port: 3: addr:50:54:00:00:00:01
1069      config: PORT_DOWN
1070      mask:   PORT_DOWN
1071      advertise: UNCHANGED
1072 ])
1073 AT_CLEANUP
1074
1075 AT_SETUP([OFPT_PORT_MOD - OF1.3])
1076 AT_KEYWORDS([ofp-print])
1077 AT_CHECK([ovs-ofctl ofp-print "\
1078 04 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
1079 50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
1080 00 00 00 00 00 00 00 00 \
1081 " 3], [0], [dnl
1082 OFPT_PORT_MOD (OF1.3) (xid=0x3): port: 3: addr:50:54:00:00:00:01
1083      config: PORT_DOWN
1084      mask:   PORT_DOWN
1085      advertise: UNCHANGED
1086 ])
1087 AT_CLEANUP
1088
1089 AT_SETUP([OFPT_PORT_MOD - OF1.4])
1090 AT_KEYWORDS([ofp-print])
1091 AT_CHECK([ovs-ofctl ofp-print "\
1092 05 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
1093 50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
1094 00 00 00 08 00 00 00 01
1095 " 3], [0], [dnl
1096 OFPT_PORT_MOD (OF1.4) (xid=0x3): port: 3: addr:50:54:00:00:00:01
1097      config: PORT_DOWN
1098      mask:   PORT_DOWN
1099      advertise: 10MB-HD
1100 ])
1101 AT_CLEANUP
1102
1103 AT_SETUP([OFPT_TABLE_MOD - OF1.1])
1104 AT_KEYWORDS([ofp-print])
1105 AT_CHECK([ovs-ofctl ofp-print "\
1106 02 11 00 10 00 00 00 02 02 00 00 00 00 00 00 02 \
1107 " 3], [0], [dnl
1108 OFPT_TABLE_MOD (OF1.1) (xid=0x2): table_id=2, flow_miss_config=drop
1109 ])
1110 AT_CLEANUP
1111
1112 AT_SETUP([OFPT_TABLE_MOD - OF1.2])
1113 AT_KEYWORDS([ofp-print])
1114 AT_CHECK([ovs-ofctl ofp-print "\
1115 03 11 00 10 00 00 00 02 02 00 00 00 00 00 00 01 \
1116 " 3], [0], [dnl
1117 OFPT_TABLE_MOD (OF1.2) (xid=0x2): table_id=2, flow_miss_config=continue
1118 ])
1119 AT_CLEANUP
1120
1121 AT_SETUP([OFPT_TABLE_MOD - OF1.3])
1122 AT_KEYWORDS([ofp-print])
1123 AT_CHECK([ovs-ofctl ofp-print "\
1124 04 11 00 10 00 00 00 02 02 00 00 00 00 00 00 00 \
1125 " 3], [0], [dnl
1126 OFPT_TABLE_MOD (OF1.3) (xid=0x2): table_id=2
1127 ])
1128 AT_CLEANUP
1129
1130 AT_SETUP([OFPT_TABLE_MOD - OF1.4])
1131 AT_KEYWORDS([ofp-print])
1132 AT_CHECK([ovs-ofctl ofp-print "\
1133 05 11 00 10 00 00 00 02 02 00 00 00 00 00 00 00 \
1134 " 3], [0], [dnl
1135 OFPT_TABLE_MOD (OF1.4) (xid=0x2): table_id=2, eviction=off, vacancy=off
1136 ])
1137 AT_CLEANUP
1138
1139 AT_SETUP([OFPST_DESC request])
1140 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1141 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100000000"], [0], [dnl
1142 OFPST_DESC request (xid=0x1):
1143 ])
1144 AT_CLEANUP
1145
1146 AT_SETUP([OFPST_DESC reply])
1147 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1148 AT_CHECK([ovs-ofctl ofp-print "\
1149 01 11 04 2c 00 00 00 01 00 00 00 00 4e 69 63 69 \
1150 72 61 2c 20 49 6e 63 2e 00 00 00 00 00 00 00 00 \
1151 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1152 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1153 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1154 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1155 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1156 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1157 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1158 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1159 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1161 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1162 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1163 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1164 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1165 00 00 00 00 00 00 00 00 00 00 00 00 4f 70 65 6e \
1166 20 76 53 77 69 74 63 68 00 00 00 00 00 00 00 00 \
1167 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1168 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1169 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1171 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1172 00 00 00 00 00 00 00 00 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 00 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 00 00 00 00 00 00 00 00 \
1178 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1179 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1181 00 00 00 00 00 00 00 00 00 00 00 00 31 2e 31 2e \
1182 30 70 72 65 32 00 00 00 00 00 00 00 00 00 00 00 \
1183 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1184 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1185 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1186 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1187 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1188 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1189 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1191 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1192 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1193 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1194 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1195 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1196 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1197 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
1198 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1199 00 00 00 00 00 00 00 00 00 00 00 00 4e 6f 6e 65 \
1200 00 00 00 00 00 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 00 \
1202 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1203 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1204 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1205 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1206 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1207 00 00 00 00 00 00 00 00 00 00 00 00 00 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 00 00 00 00 00 00 00 00 00 \
1210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1211 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1212 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1213 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1214 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1215 00 00 00 00 00 00 00 00 00 00 00 00 \
1216 "], [0], [dnl
1217 OFPST_DESC reply (xid=0x1):
1218 Manufacturer: Nicira, Inc.
1219 Hardware: Open vSwitch
1220 Software: 1.1.0pre2
1221 Serial Num: None
1222 DP Description: None
1223 ])
1224 AT_CLEANUP
1225
1226 AT_SETUP([OFPST_FLOW request - OF1.0])
1227 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1228 AT_CHECK([ovs-ofctl ofp-print "\
1229 01 10 00 38 00 00 00 04 00 01 00 00 00 38 20 ff \
1230 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1231 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1232 00 00 00 00 ff 00 ff ff \
1233 "], [0], [dnl
1234 OFPST_FLOW request (xid=0x4): @&t@
1235 ])
1236 AT_CLEANUP
1237
1238 AT_SETUP([OFPST_FLOW request - OF1.2])
1239 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1240 AT_CHECK([ovs-ofctl ofp-print "\
1241 03 12 00 38 00 00 00 02 00 01 00 00 00 00 00 00 \
1242 ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
1243 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1244 00 01 00 04 00 00 00 00 \
1245 "], [0], [dnl
1246 OFPST_FLOW request (OF1.2) (xid=0x2): @&t@
1247 ])
1248 AT_CLEANUP
1249
1250 AT_SETUP([OFPST_FLOW request - OF1.3])
1251 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1252 AT_CHECK([ovs-ofctl ofp-print "\
1253 04 12 00 38 00 00 00 02 00 01 00 00 00 00 00 00 \
1254 ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
1255 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1256 00 01 00 04 00 00 00 00 \
1257 "], [0], [dnl
1258 OFPST_FLOW request (OF1.3) (xid=0x2): @&t@
1259 ])
1260 AT_CLEANUP
1261
1262 AT_SETUP([OFPST_FLOW reply - OF1.0])
1263 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1264 AT_CHECK([ovs-ofctl ofp-print "\
1265 01 11 01 e4 00 00 00 04 00 01 00 00 00 60 00 00 \
1266 00 00 00 00 00 03 50 54 00 00 00 05 50 54 00 00 \
1267 00 06 ff ff 00 00 08 06 00 02 00 00 c0 a8 00 01 \
1268 c0 a8 00 02 00 00 00 00 00 00 00 04 0b eb c2 00 \
1269 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
1270 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
1271 00 00 00 3c 00 00 00 08 00 01 00 00 00 60 00 00 \
1272 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
1273 00 05 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 02 \
1274 c0 a8 00 01 00 00 00 00 00 00 00 08 35 a4 e9 00 \
1275 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
1276 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
1277 00 00 04 fa 00 00 00 08 00 03 00 00 00 60 00 00 \
1278 00 00 00 00 00 01 50 54 00 00 00 06 50 54 00 00 \
1279 00 05 ff ff 00 00 08 06 00 01 00 00 c0 a8 00 02 \
1280 c0 a8 00 01 00 00 00 00 00 00 00 04 10 b0 76 00 \
1281 ff ff 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
1282 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 \
1283 00 00 00 3c 00 00 00 08 00 03 00 00 00 60 00 00 \
1284 00 00 00 01 00 03 50 54 00 00 00 05 50 54 00 00 \
1285 00 06 ff ff 00 00 08 00 00 01 00 00 c0 a8 00 01 \
1286 c0 a8 00 02 00 08 00 00 00 00 00 09 05 b8 d8 00 \
1287 80 00 00 05 00 00 00 00 00 00 00 00 00 00 00 00 \
1288 00 00 00 00 00 00 00 00 00 00 00 0d 00 00 00 00 \
1289 00 00 04 fa 00 00 00 08 00 01 00 00 \
1290 00 58 02 00 00 3f ff ff 00 00 00 00 00 00 00 00 \
1291 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1292 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1293 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 \
1294 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1295 00 00 00 00 00 00 00 00 \
1296 "], [0], [dnl
1297 OFPST_FLOW reply (xid=0x4):
1298  cookie=0x0, duration=4.200s, 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
1299  cookie=0x0, duration=8.900s, 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
1300  cookie=0x0, duration=4.280s, 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
1301  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
1302  cookie=0x0, duration=0s, table=2, n_packets=0, n_bytes=0, actions=drop
1303 ])
1304 AT_CLEANUP
1305
1306 AT_SETUP([OFPST_FLOW reply - OF1.2])
1307 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1308 AT_CHECK([ovs-ofctl ofp-print "\
1309 03 13 01 78 00 00 00 02 00 01 00 00 00 00 00 00 \
1310 00 78 00 00 00 00 00 03 01 5e f3 c0 80 00 00 00 \
1311 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1312 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 62 \
1313 00 01 00 2d 80 00 00 04 00 00 00 02 80 00 06 06 \
1314 ca da ad d6 0d 37 80 00 0a 02 08 00 80 00 10 01 \
1315 00 80 00 04 08 00 00 00 00 00 00 00 00 00 00 00 \
1316 00 04 00 18 00 00 00 00 00 00 00 10 00 00 00 02 \
1317 05 dc 00 00 00 00 00 00 00 78 00 00 00 00 00 04 \
1318 20 7c 0a 40 80 00 00 00 00 00 00 00 00 00 00 00 \
1319 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 \
1320 00 00 00 00 00 00 00 8c 00 01 00 2d 80 00 00 04 \
1321 00 00 00 02 80 00 06 06 52 54 00 c3 00 89 80 00 \
1322 0a 02 08 00 80 00 10 01 00 80 00 04 08 00 00 00 \
1323 00 00 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
1324 00 00 00 10 00 00 00 02 05 dc 00 00 00 00 00 00 \
1325 00 78 00 00 00 00 00 04 20 a9 d1 00 80 00 00 00 \
1326 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1327 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 2a \
1328 00 01 00 2d 80 00 00 04 00 00 00 02 80 00 06 06 \
1329 52 54 00 97 00 69 80 00 0a 02 08 00 80 00 10 01 \
1330 00 80 00 04 08 00 00 00 00 00 00 00 00 00 00 00 \
1331 00 04 00 18 00 00 00 00 00 00 00 10 00 00 00 02 \
1332 05 dc 00 00 00 00 00 00 \
1333 "], [0], [dnl
1334 OFPST_FLOW reply (OF1.2) (xid=0x2):
1335  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
1336  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
1337  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
1338 ])
1339 AT_CLEANUP
1340
1341 AT_SETUP([OFPST_AGGREGATE request - OF1.0])
1342 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1343 AT_CHECK([ovs-ofctl ofp-print "\
1344 01 10 00 38 00 00 00 04 00 02 00 00 00 38 20 ff \
1345 ff fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1346 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1347 00 00 00 00 ff 00 ff ff \
1348 "], [0], [dnl
1349 OFPST_AGGREGATE request (xid=0x4): @&t@
1350 ])
1351 AT_CLEANUP
1352
1353 AT_SETUP([OFPST_AGGREGATE request - OF1.2])
1354 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1355 AT_CHECK([ovs-ofctl ofp-print "\
1356 03 12 00 38 00 00 00 02 00 02 00 00 00 00 00 00 \
1357 ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
1358 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1359 00 01 00 04 00 00 00 00 \
1360 "], [0], [dnl
1361 OFPST_AGGREGATE request (OF1.2) (xid=0x2): @&t@
1362 ])
1363 AT_CLEANUP
1364
1365 AT_SETUP([OFPST_AGGREGATE request - OF1.3])
1366 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1367 AT_CHECK([ovs-ofctl ofp-print "\
1368 04 12 00 38 00 00 00 02 00 02 00 00 00 00 00 00 \
1369 ff 00 00 00 ff ff ff ff ff ff ff ff 00 00 00 00 \
1370 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1371 00 01 00 04 00 00 00 00 \
1372 "], [0], [dnl
1373 OFPST_AGGREGATE request (OF1.3) (xid=0x2): @&t@
1374 ])
1375 AT_CLEANUP
1376
1377 AT_SETUP([OFPST_AGGREGATE reply - OF1.0])
1378 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1379 AT_CHECK([ovs-ofctl ofp-print "\
1380 01 11 00 24 00 00 00 04 00 02 00 00 00 00 00 00 \
1381 00 00 01 82 00 00 00 00 00 00 93 78 00 00 00 04 \
1382 00 00 00 00 \
1383 "], [0], [dnl
1384 OFPST_AGGREGATE reply (xid=0x4): packet_count=386 byte_count=37752 flow_count=4
1385 ])
1386 AT_CLEANUP
1387
1388 AT_SETUP([OFPST_AGGREGATE reply - OF1.2])
1389 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1390 AT_CHECK([ovs-ofctl ofp-print "\
1391 03 13 00 28 00 00 00 02 00 02 00 00 00 00 00 00 \
1392 00 00 00 00 00 00 00 79 00 00 00 00 00 00 4b 4f \
1393 00 00 00 03 00 00 00 00 \
1394 "], [0], [dnl
1395 OFPST_AGGREGATE reply (OF1.2) (xid=0x2): packet_count=121 byte_count=19279 flow_count=3
1396 ])
1397 AT_CLEANUP
1398
1399 AT_SETUP([OFPST_AGGREGATE reply - OF1.3])
1400 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1401 AT_CHECK([ovs-ofctl ofp-print "\
1402 04 13 00 28 00 00 00 02 00 02 00 00 00 00 00 00 \
1403 00 00 00 00 00 00 00 79 00 00 00 00 00 00 4b 4f \
1404 00 00 00 03 00 00 00 00 \
1405 "], [0], [dnl
1406 OFPST_AGGREGATE reply (OF1.3) (xid=0x2): packet_count=121 byte_count=19279 flow_count=3
1407 ])
1408 AT_CLEANUP
1409
1410 AT_SETUP([OFPST_TABLE request - OF1.0])
1411 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1412 AT_CHECK([ovs-ofctl ofp-print "0110000c0000000100030000"], [0], [dnl
1413 OFPST_TABLE request (xid=0x1):
1414 ])
1415 AT_CLEANUP
1416
1417 AT_SETUP([OFPST_TABLE request - OF1.1])
1418 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1419 AT_CHECK([ovs-ofctl ofp-print "02120010000000020003000000000000"], [0], [dnl
1420 OFPST_TABLE request (OF1.1) (xid=0x2):
1421 ])
1422 AT_CLEANUP
1423
1424 AT_SETUP([OFPST_TABLE request - OF1.2])
1425 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1426 AT_CHECK([ovs-ofctl ofp-print "03120010000000020003000000000000"], [0], [dnl
1427 OFPST_TABLE request (OF1.2) (xid=0x2):
1428 ])
1429 AT_CLEANUP
1430
1431 AT_SETUP([OFPST_TABLE request - OF1.3])
1432 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1433 AT_CHECK([ovs-ofctl ofp-print "04120010000000020003000000000000"], [0], [dnl
1434 OFPST_TABLE request (OF1.3) (xid=0x2):
1435 ])
1436 AT_CLEANUP
1437
1438 AT_SETUP([OFPST_TABLE reply - OF1.0])
1439 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1440 AT_CHECK([ovs-ofctl ofp-print "\
1441 01 11 00 4c 00 00 00 01 00 03 00 00 00 00 00 00 \
1442 63 6c 61 73 73 69 66 69 65 72 00 00 00 00 00 00 \
1443 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1444 00 3f ff ff 00 10 00 00 00 00 00 0b 00 00 00 00 \
1445 00 00 00 00 00 00 00 00 00 00 00 00 \
1446 "], [0], [dnl
1447 OFPST_TABLE reply (xid=0x1):
1448   table 0 ("classifier"):
1449     active=11, lookup=0, matched=0
1450     max_entries=1048576
1451     matching:
1452       in_port: exact match or wildcard
1453       eth_src: exact match or wildcard
1454       eth_dst: exact match or wildcard
1455       eth_type: exact match or wildcard
1456       vlan_vid: exact match or wildcard
1457       vlan_pcp: exact match or wildcard
1458       ip_src: exact match or wildcard
1459       ip_dst: exact match or wildcard
1460       nw_proto: exact match or wildcard
1461       nw_tos: exact match or wildcard
1462       tcp_src: exact match or wildcard
1463       tcp_dst: exact match or wildcard
1464 ])
1465 AT_CLEANUP
1466
1467 AT_SETUP([OFPST_TABLE reply - OF1.2])
1468 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1469 (echo 'OFPST_TABLE reply (OF1.2) (xid=0x2):
1470   table 0 ("classifier"):
1471     active=1, lookup=74614, matched=106024
1472     config=controller
1473     max_entries=1000000
1474     instructions (table miss and others):
1475       instructions: write_metadata,goto_table
1476       Write-Actions and Apply-Actions features:
1477         supported on Set-Field: metadata in_port_oxm eth_src eth_dst eth_type vlan_vid vlan_pcp mpls_label mpls_tc ip_src ip_dst ipv6_src ipv6_dst ipv6_label nw_proto ip_dscp nw_ecn arp_op arp_spa arp_tpa arp_sha arp_tha tcp_src tcp_dst udp_src udp_dst sctp_src sctp_dst icmp_type icmp_code icmpv6_type icmpv6_code nd_target nd_sll nd_tll
1478     matching:
1479       metadata: exact match or wildcard
1480       in_port_oxm: exact match or wildcard
1481       eth_src: exact match or wildcard
1482       eth_dst: exact match or wildcard
1483       eth_type: exact match or wildcard
1484       vlan_vid: exact match or wildcard
1485       vlan_pcp: exact match or wildcard
1486       mpls_label: exact match or wildcard
1487       mpls_tc: exact match or wildcard
1488       ip_src: exact match or wildcard
1489       ip_dst: exact match or wildcard
1490       ipv6_src: exact match or wildcard
1491       ipv6_dst: exact match or wildcard
1492       ipv6_label: exact match or wildcard
1493       nw_proto: exact match or wildcard
1494       ip_dscp: exact match or wildcard
1495       nw_ecn: exact match or wildcard
1496       arp_op: exact match or wildcard
1497       arp_spa: exact match or wildcard
1498       arp_tpa: exact match or wildcard
1499       arp_sha: exact match or wildcard
1500       arp_tha: exact match or wildcard
1501       tcp_src: exact match or wildcard
1502       tcp_dst: exact match or wildcard
1503       udp_src: exact match or wildcard
1504       udp_dst: exact match or wildcard
1505       sctp_src: exact match or wildcard
1506       sctp_dst: exact match or wildcard
1507       icmp_type: exact match or wildcard
1508       icmp_code: exact match or wildcard
1509       icmpv6_type: exact match or wildcard
1510       icmpv6_code: exact match or wildcard
1511       nd_target: exact match or wildcard
1512       nd_sll: exact match or wildcard
1513       nd_tll: exact match or wildcard
1514
1515   table 1 ("table1"):
1516     active=0, lookup=0, matched=0
1517     (same features)
1518 '
1519  for i in `seq 2 253`; do
1520      printf '  table %d ("table%d"): ditto\n' $i $i
1521  done
1522  echo '  table 254 ("table254"):
1523     active=2, lookup=0, matched=0
1524     (same features)') > expout
1525
1526 (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"
1527  pad7="00 00 00 00 00 00 00 "
1528  mid="00 00 00 0f ff ff ff ff \
1529 00 00 00 0f ff ff ff ff 00 00 00 00 00 00 00 00 \
1530 00 00 00 0f ff ff ff ff 00 00 00 0f ff ff ff ff \
1531 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1532 00 00 00 07 00 00 00 00 00 0f 42 40 "
1533  tail="00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"
1534
1535  echo -n "03 13 7f 90 00 00 00 02 00 03 00 00 00 00 00 00 "
1536
1537  x=0
1538  printf "%02x $pad7" $x
1539  printf "%s$pad32" "classifier" | od -A n -t x1 -v -N 32 | tr '\n' ' '
1540  echo -n "$mid 00 00 00 01  "
1541  echo -n "00 00 00 00 00 01 23 76 00 00 00 00 00 01 9e 28 "
1542
1543  x=1
1544  while test $x -lt 254; do
1545    printf "%02x $pad7" $x
1546    printf "%s$pad32" "table$x" | od -A n -t x1 -v -N 32 | tr '\n' ' '
1547    echo -n "$mid 00 00 00 00 $tail "
1548    x=`expr $x + 1`
1549  done
1550
1551  x=254
1552  printf "%02x $pad7" $x
1553  printf "%s$pad32" "table$x" | od -A n -t x1 -v -N 32 | tr '\n' ' '
1554  echo -n "$mid 00 00 00 02 $tail") > in
1555 AT_CHECK([ovs-ofctl ofp-print - < in], [0], [expout])
1556 AT_CLEANUP
1557
1558 AT_SETUP([OFPST_TABLE reply - OF1.3])
1559 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1560 AT_CHECK([ovs-ofctl ofp-print "\
1561 04 13 00 40 00 00 00 01 00 03 00 00 00 00 00 00 \
1562 00 00 00 00 00 00 00 0b 00 00 00 00 00 00 02 00 \
1563 00 00 00 00 00 00 01 00 01 00 00 00 00 00 00 0c \
1564 00 00 00 00 00 00 02 01 00 00 00 00 00 00 01 01 \
1565 "], [0], [dnl
1566 OFPST_TABLE reply (OF1.3) (xid=0x1):
1567   table 0:
1568     active=11, lookup=512, matched=256
1569
1570   table 1:
1571     active=12, lookup=513, matched=257
1572 ])
1573 AT_CLEANUP
1574
1575 AT_SETUP([OFPST_PORT request - 1.0])
1576 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1577 AT_CHECK([ovs-ofctl ofp-print "\
1578 01 10 00 14 00 00 00 01 00 04 00 00 ff ff 00 00 \
1579 00 00 00 00 \
1580 "], [0], [dnl
1581 OFPST_PORT request (xid=0x1): port_no=ANY
1582 ])
1583 AT_CLEANUP
1584
1585 AT_SETUP([OFPST_PORT request - 1.1])
1586 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1587 AT_CHECK([ovs-ofctl ofp-print "\
1588 02 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
1589 ff ff ff ff 00 00 00 00 \
1590 "], [0], [dnl
1591 OFPST_PORT request (OF1.1) (xid=0x2): port_no=ANY
1592 ])
1593 AT_CLEANUP
1594
1595 AT_SETUP([OFPST_PORT request - 1.2])
1596 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1597 AT_CHECK([ovs-ofctl ofp-print "\
1598 03 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
1599 ff ff ff ff 00 00 00 00 \
1600 "], [0], [dnl
1601 OFPST_PORT request (OF1.2) (xid=0x2): port_no=ANY
1602 ])
1603 AT_CLEANUP
1604
1605 AT_SETUP([OFPST_PORT request - 1.3])
1606 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1607 AT_CHECK([ovs-ofctl ofp-print "\
1608 04 12 00 18 00 00 00 02 00 04 00 00 00 00 00 00 \
1609 ff ff ff ff 00 00 00 00 \
1610 "], [0], [dnl
1611 OFPST_PORT request (OF1.3) (xid=0x2): port_no=ANY
1612 ])
1613 AT_CLEANUP
1614
1615 AT_SETUP([OFPST_PORT reply - OF1.0])
1616 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1617 AT_CHECK([ovs-ofctl ofp-print "\
1618 01 11 01 ac 00 00 00 01 00 04 00 00 00 03 00 00 \
1619 00 00 00 00 00 00 00 00 00 00 4d 20 00 00 00 00 \
1620 00 00 14 32 00 00 00 00 00 0f 60 4e 00 00 00 00 \
1621 00 05 71 bc 00 00 00 00 00 00 00 00 00 00 00 00 \
1622 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1623 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1624 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1625 00 00 00 00 ff fe 00 00 00 00 00 00 00 00 00 00 \
1626 00 00 02 ac 00 00 00 00 00 00 01 f5 00 00 00 00 \
1627 00 01 0c 8c 00 00 00 00 00 00 db 1c 00 00 00 00 \
1628 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1629 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1630 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1631 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
1632 00 00 00 00 00 00 00 00 00 00 06 be 00 00 00 00 \
1633 00 00 05 84 00 00 00 00 00 02 34 b4 00 00 00 00 \
1634 00 02 23 d4 00 00 00 00 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 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1637 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1638 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 \
1639 00 00 14 12 00 00 00 00 00 00 14 66 00 00 00 00 \
1640 00 04 a2 54 00 00 00 00 00 05 8a 1e 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 00 00 00 00 00 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 00 00 00 00 00 00 00 00 00 00 00 00 \
1645 "], [0], [dnl
1646 OFPST_PORT reply (xid=0x1): 4 ports
1647   port  3: rx pkts=19744, bytes=1007694, drop=0, errs=0, frame=0, over=0, crc=0
1648            tx pkts=5170, bytes=356796, drop=0, errs=0, coll=0
1649   port LOCAL: rx pkts=684, bytes=68748, drop=0, errs=0, frame=0, over=0, crc=0
1650            tx pkts=501, bytes=56092, drop=0, errs=0, coll=0
1651   port  2: rx pkts=1726, bytes=144564, drop=0, errs=0, frame=0, over=0, crc=0
1652            tx pkts=1412, bytes=140244, drop=0, errs=0, coll=0
1653   port  1: rx pkts=5138, bytes=303700, drop=0, errs=0, frame=0, over=0, crc=0
1654            tx pkts=5222, bytes=363038, drop=0, errs=0, coll=0
1655 ])
1656 AT_CLEANUP
1657
1658 AT_SETUP([OFPST_PORT reply - OF1.2])
1659 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1660 AT_CHECK([ovs-ofctl ofp-print "\
1661 03 13 01 48 00 00 00 02 00 04 00 00 00 00 00 00 \
1662 00 00 00 02 00 00 00 00 00 00 00 00 00 01 95 56 \
1663 00 00 00 00 00 00 00 88 00 00 00 00 02 5d 08 98 \
1664 00 00 00 00 00 00 2c f8 00 00 00 00 00 00 00 00 \
1665 00 00 00 00 00 00 00 00 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 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1668 00 00 00 00 00 00 00 00 ff ff ff fe 00 00 00 00 \
1669 00 00 00 00 00 00 00 44 00 00 00 00 00 00 9d 2c \
1670 00 00 00 00 00 00 16 7c 00 00 00 00 01 1e 36 44 \
1671 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1672 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1673 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1674 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1675 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 44 \
1676 00 00 00 00 00 00 9d 2c 00 00 00 00 00 00 16 7c \
1677 00 00 00 00 01 1e 36 44 00 00 00 00 00 00 00 00 \
1678 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1679 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1680 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1681 00 00 00 00 00 00 00 00 \
1682 "], [0], [dnl
1683 OFPST_PORT reply (OF1.2) (xid=0x2): 3 ports
1684   port  2: rx pkts=103766, bytes=39651480, drop=0, errs=0, frame=0, over=0, crc=0
1685            tx pkts=136, bytes=11512, drop=0, errs=0, coll=0
1686   port LOCAL: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1687            tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1688   port  1: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1689            tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1690 ])
1691 AT_CLEANUP
1692
1693 AT_SETUP([OFPST_PORT reply - OF1.3])
1694 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1695 AT_CHECK([ovs-ofctl ofp-print "\
1696 04 13 01 60 00 00 00 02 00 04 00 00 00 00 00 00 \
1697 00 00 00 02 00 00 00 00 00 00 00 00 00 01 95 56 \
1698 00 00 00 00 00 00 00 88 00 00 00 00 02 5d 08 98 \
1699 00 00 00 00 00 00 2c f8 00 00 00 00 00 00 00 00 \
1700 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1701 00 00 00 00 00 00 00 00 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 00 00 00 00 00 00 00 00 00 00 00 01 00 0f 42 40 \
1704 ff ff ff fe 00 00 00 00 \
1705 00 00 00 00 00 00 00 44 00 00 00 00 00 00 9d 2c \
1706 00 00 00 00 00 00 16 7c 00 00 00 00 01 1e 36 44 \
1707 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1708 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1709 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1710 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1711 ff ff ff ff ff ff ff ff \
1712 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 44 \
1713 00 00 00 00 00 00 9d 2c 00 00 00 00 00 00 16 7c \
1714 00 00 00 00 01 1e 36 44 00 00 00 00 00 00 00 00 \
1715 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1716 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1717 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1718 00 00 00 00 00 00 00 00 00 00 00 00 07 54 d4 c0 \
1719 "], [0], [dnl
1720 OFPST_PORT reply (OF1.3) (xid=0x2): 3 ports
1721   port  2: rx pkts=103766, bytes=39651480, drop=0, errs=0, frame=0, over=0, crc=0
1722            tx pkts=136, bytes=11512, drop=0, errs=0, coll=0
1723            duration=1.001s
1724   port LOCAL: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1725            tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1726   port  1: rx pkts=68, bytes=5756, drop=0, errs=0, frame=0, over=0, crc=0
1727            tx pkts=40236, bytes=18757188, drop=0, errs=0, coll=0
1728            duration=0.123s
1729 ])
1730 AT_CLEANUP
1731
1732 AT_SETUP([OFPST_PORT reply - OF1.4])
1733 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1734 AT_CHECK([ovs-ofctl ofp-print "\
1735 05 13 00 88 00 00 00 02 00 04 00 00 00 00 00 00 \
1736 00 78 00 00 00 00 00 02 00 00 00 01 00 0f 42 40 \
1737 00 00 00 00 00 01 95 56 00 00 00 00 00 00 00 88 \
1738 00 00 00 00 02 5d 08 98 00 00 00 00 00 00 2c f8 \
1739 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1740 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1741 00 00 00 28 00 00 00 00 00 00 00 00 00 00 00 fc \
1742 00 00 00 00 00 00 00 fd 00 00 00 00 00 00 00 fe \
1743 00 00 00 00 00 00 00 ff \
1744 "], [0], [dnl
1745 OFPST_PORT reply (OF1.4) (xid=0x2): 1 ports
1746   port  2: rx pkts=103766, bytes=39651480, drop=0, errs=0, frame=252, over=253, crc=254
1747            tx pkts=136, bytes=11512, drop=0, errs=0, coll=255
1748            duration=1.001s
1749 ])
1750 AT_CLEANUP
1751
1752 AT_SETUP([OFPST_QUEUE request - OF1.0])
1753 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1754 AT_CHECK([ovs-ofctl ofp-print "\
1755 01 10 00 14 00 00 00 01 00 05 00 00 ff fc 00 00 \
1756 ff ff ff ff \
1757 "], [0], [dnl
1758 OFPST_QUEUE request (xid=0x1): port=ANY queue=ALL
1759 ])
1760 AT_CLEANUP
1761
1762 AT_SETUP([OFPST_QUEUE request - OF1.1])
1763 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1764 AT_CHECK([ovs-ofctl ofp-print "\
1765 02 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
1766 ff ff ff ff ff ff ff ff \
1767 "], [0], [dnl
1768 OFPST_QUEUE request (OF1.1) (xid=0x2): port=ANY queue=ALL
1769 ])
1770 AT_CLEANUP
1771
1772 AT_SETUP([OFPST_QUEUE request - OF1.2])
1773 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1774 AT_CHECK([ovs-ofctl ofp-print "\
1775 03 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
1776 ff ff ff ff ff ff ff ff \
1777 "], [0], [dnl
1778 OFPST_QUEUE request (OF1.2) (xid=0x2): port=ANY queue=ALL
1779 ])
1780 AT_CLEANUP
1781
1782 AT_SETUP([OFPST_QUEUE request - OF1.3])
1783 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1784 AT_CHECK([ovs-ofctl ofp-print "\
1785 04 12 00 18 00 00 00 02 00 05 00 00 00 00 00 00 \
1786 ff ff ff ff ff ff ff ff \
1787 "], [0], [dnl
1788 OFPST_QUEUE request (OF1.3) (xid=0x2): port=ANY queue=ALL
1789 ])
1790 AT_CLEANUP
1791
1792 AT_SETUP([OFPST_QUEUE reply - OF1.0])
1793 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1794 AT_CHECK([ovs-ofctl ofp-print "\
1795 01 11 00 cc 00 00 00 01 00 05 00 00 00 03 00 00 \
1796 00 00 00 01 00 00 00 00 00 00 01 2e 00 00 00 00 \
1797 00 00 00 01 00 00 00 00 00 00 00 00 00 03 00 00 \
1798 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
1799 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 \
1800 00 00 00 01 00 00 00 00 00 00 08 34 00 00 00 00 \
1801 00 00 00 14 00 00 00 00 00 00 00 00 00 02 00 00 \
1802 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
1803 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
1804 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 \
1805 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 \
1806 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 00 \
1807 00 00 00 00 00 00 00 00 00 00 00 00 \
1808 "], [0], [dnl
1809 OFPST_QUEUE reply (xid=0x1): 6 queues
1810   port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
1811   port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
1812   port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
1813   port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
1814   port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
1815   port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
1816 ])
1817 AT_CLEANUP
1818
1819 AT_SETUP([OFPST_QUEUE reply - OF1.1])
1820 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1821 AT_CHECK([ovs-ofctl ofp-print "\
1822 02 13 00 d0 00 00 00 01 00 05 00 00 00 00 00 00 \
1823 00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
1824 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
1825 00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
1826 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1827 00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
1828 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
1829 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
1830 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1831 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
1832 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1833 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
1834 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1835 "], [0], [dnl
1836 OFPST_QUEUE reply (OF1.1) (xid=0x1): 6 queues
1837   port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
1838   port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
1839   port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
1840   port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
1841   port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
1842   port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
1843 ])
1844 AT_CLEANUP
1845
1846 AT_SETUP([OFPST_QUEUE reply - OF1.2])
1847 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1848 AT_CHECK([ovs-ofctl ofp-print "\
1849 03 13 00 d0 00 00 00 01 00 05 00 00 00 00 00 00 \
1850 00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
1851 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
1852 00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
1853 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1854 00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
1855 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
1856 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
1857 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1858 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
1859 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1860 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
1861 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1862 "], [0], [dnl
1863 OFPST_QUEUE reply (OF1.2) (xid=0x1): 6 queues
1864   port 3 queue 1: bytes=302, pkts=1, errors=0, duration=?
1865   port 3 queue 2: bytes=0, pkts=0, errors=0, duration=?
1866   port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=?
1867   port 2 queue 2: bytes=0, pkts=0, errors=0, duration=?
1868   port 1 queue 1: bytes=0, pkts=0, errors=0, duration=?
1869   port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
1870 ])
1871 AT_CLEANUP
1872
1873 AT_SETUP([OFPST_QUEUE reply - OF1.3])
1874 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1875 AT_CHECK([ovs-ofctl ofp-print "\
1876 04 13 01 00 00 00 00 01 00 05 00 00 00 00 00 00 \
1877 00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
1878 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
1879 00 00 00 64 1d cd 65 00 \
1880 00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
1881 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1882 00 00 00 64 1d cd 65 00 \
1883 00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
1884 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
1885 00 00 00 64 1d cd 65 00 \
1886 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
1887 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1888 00 00 00 64 1d cd 65 00 \
1889 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
1890 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1891 00 00 00 64 1d cd 65 00 \
1892 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
1893 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1894 ff ff ff ff ff ff ff ff \
1895 "], [0], [dnl
1896 OFPST_QUEUE reply (OF1.3) (xid=0x1): 6 queues
1897   port 3 queue 1: bytes=302, pkts=1, errors=0, duration=100.500s
1898   port 3 queue 2: bytes=0, pkts=0, errors=0, duration=100.500s
1899   port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=100.500s
1900   port 2 queue 2: bytes=0, pkts=0, errors=0, duration=100.500s
1901   port 1 queue 1: bytes=0, pkts=0, errors=0, duration=100.500s
1902   port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
1903 ])
1904 AT_CLEANUP
1905
1906 AT_SETUP([OFPST_QUEUE reply - OF1.4])
1907 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1908 AT_CHECK([ovs-ofctl ofp-print "\
1909 05 13 01 30 00 00 00 01 00 05 00 00 00 00 00 00 \
1910 00 30 00 00 00 00 00 00 \
1911 00 00 00 03 00 00 00 01 00 00 00 00 00 00 01 2e \
1912 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 \
1913 00 00 00 64 1d cd 65 00 00 30 00 00 00 00 00 00 \
1914 00 00 00 03 00 00 00 02 00 00 00 00 00 00 00 00 \
1915 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1916 00 00 00 64 1d cd 65 00 00 30 00 00 00 00 00 00 \
1917 00 00 00 02 00 00 00 01 00 00 00 00 00 00 08 34 \
1918 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 00 \
1919 00 00 00 64 1d cd 65 00 00 30 00 00 00 00 00 00 \
1920 00 00 00 02 00 00 00 02 00 00 00 00 00 00 00 00 \
1921 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1922 00 00 00 64 1d cd 65 00 00 30 00 00 00 00 00 00 \
1923 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00 00 \
1924 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1925 00 00 00 64 1d cd 65 00 00 30 00 00 00 00 00 00 \
1926 00 00 00 01 00 00 00 02 00 00 00 00 00 00 00 00 \
1927 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
1928 ff ff ff ff ff ff ff ff \
1929 "], [0], [dnl
1930 OFPST_QUEUE reply (OF1.4) (xid=0x1): 6 queues
1931   port 3 queue 1: bytes=302, pkts=1, errors=0, duration=100.500s
1932   port 3 queue 2: bytes=0, pkts=0, errors=0, duration=100.500s
1933   port 2 queue 1: bytes=2100, pkts=20, errors=0, duration=100.500s
1934   port 2 queue 2: bytes=0, pkts=0, errors=0, duration=100.500s
1935   port 1 queue 1: bytes=0, pkts=0, errors=0, duration=100.500s
1936   port 1 queue 2: bytes=0, pkts=0, errors=0, duration=?
1937 ])
1938 AT_CLEANUP
1939
1940 AT_SETUP([OFPST_GROUP request])
1941 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1942 AT_CHECK([ovs-ofctl ofp-print "\
1943 02 12 00 18 00 00 00 02 00 06 00 00 00 00 00 00 \
1944 ff ff ff ff 00 00 00 00 \
1945 "], [0], [OFPST_GROUP request (OF1.1) (xid=0x2): group_id=ANY
1946 ])
1947 AT_CLEANUP
1948
1949 AT_SETUP([OFPST_GROUP reply - OF1.1])
1950 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1951 AT_CHECK([ovs-ofctl ofp-print "\
1952 02 13 00 a0 00 00 00 02 00 06 00 00 00 00 00 00 \
1953 00 50 00 00 87 65 43 21 00 00 00 04 00 00 00 00 \
1954 00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
1955 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1956 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1957 00 00 00 00 00 00 66 66 00 00 00 00 00 33 33 33 \
1958 00 40 00 00 00 00 00 05 00 00 00 02 00 00 00 00 \
1959 00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
1960 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1961 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1962 "], [0], [dnl
1963 OFPST_GROUP reply (OF1.1) (xid=0x2):
1964  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
1965  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
1966 ])
1967 AT_CLEANUP
1968
1969 AT_SETUP([OFPST_GROUP reply - OF1.3])
1970 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
1971 AT_CHECK([ovs-ofctl ofp-print "\
1972 04 13 00 b0 00 00 00 02 00 06 00 00 00 00 00 00 \
1973 00 58 00 00 87 65 43 21 00 00 00 04 00 00 00 00 \
1974 00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
1975 00 00 00 12 1d cd 65 00 \
1976 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1977 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1978 00 00 00 00 00 00 66 66 00 00 00 00 00 33 33 33 \
1979 00 48 00 00 00 00 00 05 00 00 00 02 00 00 00 00 \
1980 00 00 00 00 00 00 88 88 00 00 00 00 00 77 77 77 \
1981 00 00 00 10 1d cd 65 00 \
1982 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1983 00 00 00 00 00 00 11 11 00 00 00 00 00 22 22 22 \
1984 "], [0], [dnl
1985 OFPST_GROUP reply (OF1.3) (xid=0x2):
1986  group_id=2271560481,duration=18.500s,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
1987  group_id=5,duration=16.500s,ref_count=2,packet_count=34952,byte_count=7829367,bucket0:packet_count=4369,byte_count=2236962,bucket1:packet_count=4369,byte_count=2236962
1988 ])
1989 AT_CLEANUP
1990
1991 AT_SETUP([OFPST_GROUP_DESC request - OF1.1])
1992 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
1993 AT_CHECK([ovs-ofctl ofp-print "\
1994 02 12 00 10 00 00 00 02 00 07 00 00 00 00 00 00 \
1995 "], [0], [OFPST_GROUP_DESC request (OF1.1) (xid=0x2): group_id=ALL
1996 ])
1997 AT_CLEANUP
1998
1999 AT_SETUP([OFPST_GROUP_DESC request - OF1.5])
2000 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2001 AT_CHECK([ovs-ofctl ofp-print "\
2002 06 12 00 18 00 00 00 02 00 07 00 00 00 00 00 00 \
2003 00 00 00 01 00 00 00 00
2004 "], [0], [OFPST_GROUP_DESC request (OF1.5) (xid=0x2): group_id=1
2005 ])
2006 AT_CLEANUP
2007
2008 AT_SETUP([OFPST_GROUP_DESC reply - OF1.1])
2009 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2010 AT_CHECK([ovs-ofctl ofp-print "\
2011 02 13 00 78 00 00 00 02 00 07 00 00 00 00 00 00 \
2012 00 68 01 00 00 00 20 00 \
2013 00 20 00 64 00 00 00 01 ff ff ff ff 00 00 00 00 \
2014 00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
2015 00 20 00 c8 00 00 00 02 ff ff ff ff 00 00 00 00 \
2016 00 00 00 10 00 00 00 02 00 00 00 00 00 00 00 00 \
2017 00 20 00 c8 00 00 00 03 ff ff ff ff 00 00 00 00 \
2018 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
2019 "], [0], [dnl
2020 OFPST_GROUP_DESC reply (OF1.1) (xid=0x2):
2021  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
2022 ])
2023 AT_CLEANUP
2024
2025 AT_SETUP([OFPST_GROUP_DESC reply - OF1.5])
2026 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2027 AT_CHECK([ovs-ofctl ofp-print "\
2028 06 13 00 d8 00 00 00 02 00 07 00 00 00 00 00 00 \
2029 00 c8 01 00 00 00 20 00 00 78 00 00 00 00 00 00 \
2030 00 28 00 10 00 00 00 00 00 00 00 10 00 00 00 01 \
2031 00 00 00 00 00 00 00 00 00 00 00 08 00 64 00 00 \
2032 00 01 00 08 00 00 00 01 \
2033 00 28 00 10 00 00 00 01 00 00 00 10 00 00 00 02 \
2034 00 00 00 00 00 00 00 00 00 00 00 08 00 c8 00 00 \
2035 00 01 00 08 00 00 00 02 \
2036 00 28 00 10 00 00 00 02 00 00 00 10 00 00 00 03 \
2037 00 00 00 00 00 00 00 00 00 00 00 08 00 c8 00 00 \
2038 00 01 00 08 00 00 00 03 \
2039 ff ff 00 3b 00 00 15 40 00 00 00 01 00 00 00 00 \
2040 68 61 73 68 00 00 00 00 00 00 00 00 00 00 00 00 \
2041 00 00 00 00 00 00 00 00 \
2042 80 00 18 04 ff ff ff 00 80 00 1a 02 ff ff 80 00 \
2043 14 01 ff 00 00 00 00 00 \
2044 "], [0], [dnl
2045 OFPST_GROUP_DESC reply (OF1.5) (xid=0x2):
2046  group_id=8192,type=select,selection_method=hash,fields(ip_dst=255.255.255.0,nw_proto,tcp_src),bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
2047 ])
2048 AT_CLEANUP
2049
2050 AT_SETUP([OFPST_GROUP_FEATURES request])
2051 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2052 AT_CHECK([ovs-ofctl ofp-print "\
2053 03 12 00 10 00 00 00 02 00 08 00 00 00 00 00 00 \
2054 "], [0], [OFPST_GROUP_FEATURES request (OF1.2) (xid=0x2):
2055 ])
2056 AT_CLEANUP
2057
2058 AT_SETUP([OFPST_GROUP_FEATURES reply])
2059 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2060 AT_CHECK([ovs-ofctl ofp-print "\
2061 03 13 00 38 00 00 00 02 00 08 00 00 00 00 00 00 \
2062 00 00 00 0f 00 00 00 0f \
2063 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 \
2064 00 00 00 01 00 02 00 01 00 06 00 01 00 0e 00 01 \
2065 "], [0], [dnl
2066 OFPST_GROUP_FEATURES reply (OF1.2) (xid=0x2):
2067  Group table:
2068     Types:  0xf
2069     Capabilities:  0xf
2070     all group:
2071        max_groups=0x1
2072        actions: output
2073     select group:
2074        max_groups=0x2
2075        actions: output push_vlan
2076     indirect group:
2077        max_groups=0x3
2078        actions: output strip_vlan push_vlan
2079     fast failover group:
2080        max_groups=0x4
2081        actions: output strip_vlan push_vlan push_mpls
2082 ])
2083 AT_CLEANUP
2084
2085 AT_SETUP([OFPST_PORT_DESC request - OF1.0])
2086 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2087 AT_CHECK([ovs-ofctl ofp-print "0110000c00000001000d0000"], [0], [dnl
2088 OFPST_PORT_DESC request (xid=0x1): port=ANY
2089 ])
2090 AT_CLEANUP
2091
2092 AT_SETUP([OFPST_PORT_DESC request - OF1.5])
2093 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2094 AT_CHECK([ovs-ofctl ofp-print "\
2095 06 12 00 18 00 00 00 02 00 0d 00 00 00 00 00 00 \
2096 00 00 00 05 00 00 00 00"], [0], [dnl
2097 OFPST_PORT_DESC request (OF1.5) (xid=0x2): port=5
2098 ])
2099 AT_CLEANUP
2100
2101 AT_SETUP([OFPST_PORT_DESC reply - OF1.0])
2102 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2103 AT_CHECK([ovs-ofctl ofp-print "\
2104 01 11 00 3c 00 00 00 00 00 0d 00 00 00 03 50 54 \
2105 00 00 00 01 65 74 68 30 00 00 00 00 00 00 00 00 \
2106 00 00 00 00 00 00 00 01 00 00 00 01 00 00 02 08 \
2107 00 00 02 8f 00 00 02 8f 00 00 00 00 \
2108 "], [0], [dnl
2109 OFPST_PORT_DESC reply (xid=0x0):
2110  3(eth0): addr:50:54:00:00:00:01
2111      config:     PORT_DOWN
2112      state:      LINK_DOWN
2113      current:    100MB-FD AUTO_NEG
2114      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
2115      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
2116      speed: 100 Mbps now, 100 Mbps max
2117 ])
2118 AT_CLEANUP
2119
2120 AT_SETUP([OFPST_PORT_DESC reply - OF1.4])
2121 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2122 AT_CHECK([ovs-ofctl ofp-print "\
2123 05 13 00 58 00 00 00 02 00 0d 00 00 00 00 00 00 \
2124 00 00 00 03 00 48 00 00 50 54 00 00 00 01 00 00 \
2125 65 74 68 30 00 00 00 00 00 00 00 00 00 00 00 00 \
2126 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 \
2127 00 00 20 08 00 00 28 0f 00 00 28 0f 00 00 00 00 \
2128 00 01 86 a0 00 01 86 a0 \
2129 "], [0], [dnl
2130 OFPST_PORT_DESC reply (OF1.4) (xid=0x2):
2131  3(eth0): addr:50:54:00:00:00:01
2132      config:     0
2133      state:      0
2134      current:    100MB-FD AUTO_NEG
2135      advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
2136      supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD COPPER AUTO_NEG
2137      speed: 100 Mbps now, 100 Mbps max
2138 ])
2139 AT_CLEANUP
2140
2141 AT_SETUP([OFPT_METER_MOD request - OF1.3])
2142 AT_KEYWORDS([ofp-print])
2143 AT_CHECK([ovs-ofctl ofp-print "\
2144 04 1d 00 20 00 00 00 02 00 00 00 0d 00 00 00 05 \
2145 00 01 00 10 00 00 04 00 00 00 00 80 00 00 00 00 \
2146 "], [0], [dnl
2147 OFPT_METER_MOD (OF1.3) (xid=0x2): ADD meter=5 kbps burst stats bands=
2148 type=drop rate=1024 burst_size=128
2149 ])
2150 AT_CLEANUP
2151
2152 AT_SETUP([OFPT_METER_MOD request - bad band - OF1.3])
2153 AT_KEYWORDS([ofp-print])
2154 AT_CHECK([ovs-ofctl ofp-print "\
2155 04 1d 00 20 85 01 d7 38 00 00 00 00 00 00 00 01
2156 00 05 00 10 00 00 00 02 00 00 00 02 00 00 00 00
2157 "], [0], [dnl
2158 OFPT_METER_MOD (OF1.3) (xid=0x8501d738): ***decode error: OFPMMFC_BAD_BAND***
2159 ])
2160 AT_CLEANUP
2161
2162 AT_SETUP([OFPT_METER_MOD request - bad command - OF1.3])
2163 AT_KEYWORDS([ofp-print])
2164 AT_CHECK([ovs-ofctl ofp-print "\
2165 04 1d 00 10 28 a6 26 52 00 08 00 00 00 00 00 01
2166 "], [0], [dnl
2167 OFPT_METER_MOD (OF1.3) (xid=0x28a62652): ***decode error: OFPMMFC_BAD_COMMAND***
2168 ])
2169 AT_CLEANUP
2170
2171 AT_SETUP([OFPT_METER_MOD request - bad flags - OF1.3])
2172 AT_KEYWORDS([ofp-print])
2173 AT_CHECK([ovs-ofctl ofp-print "\
2174 04 1d 00 20 82 b3 a1 a4 00 00 00 03 00 00 00 01 \
2175 00 01 00 10 00 00 00 02 00 00 00 02 00 00 00 00 \
2176 "], [0], [dnl
2177 OFPT_METER_MOD (OF1.3) (xid=0x82b3a1a4): ***decode error: OFPMMFC_BAD_FLAGS***
2178 ])
2179 AT_CLEANUP
2180
2181 AT_SETUP([OFPST_METER request - OF1.3])
2182 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2183 AT_CHECK([ovs-ofctl ofp-print "041200180000000200090000000000000000000100000000"], [0], [dnl
2184 OFPST_METER request (OF1.3) (xid=0x2): meter=1
2185 ])
2186 AT_CLEANUP
2187
2188 AT_SETUP([OFPST_METER_CONFIG request - OF1.3])
2189 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2190 AT_CHECK([ovs-ofctl ofp-print "0412001800000002000a0000000000000000000100000000"], [0], [dnl
2191 OFPST_METER_CONFIG request (OF1.3) (xid=0x2): meter=1
2192 ])
2193 AT_CLEANUP
2194
2195 AT_SETUP([OFPST_METER_FEATURES request - OF1.3])
2196 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2197 AT_CHECK([ovs-ofctl ofp-print "0412001000000002000b000000000000"], [0], [dnl
2198 OFPST_METER_FEATURES request (OF1.3) (xid=0x2):
2199 ])
2200 AT_CLEANUP
2201
2202 AT_SETUP([OFPST_METER_FEATURES reply - OF1.3])
2203 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2204 AT_CHECK([ovs-ofctl ofp-print "\
2205 04 13 00 20 00 00 00 02 00 0b 00 00 00 00 00 00 \
2206 00 01 00 00 00 00 00 06 00 00 00 0F 10 02 00 00 \
2207 "], [0], [dnl
2208 OFPST_METER_FEATURES reply (OF1.3) (xid=0x2):
2209 max_meter:65536 max_bands:16 max_color:2
2210 band_types: drop dscp_remark
2211 capabilities: kbps pktps burst stats
2212 ])
2213 AT_CLEANUP
2214
2215 AT_SETUP([OFPST_METER_CONFIG reply - OF1.3])
2216 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2217 AT_CHECK([ovs-ofctl ofp-print "\
2218 04 13 00 50 00 00 00 02 00 0a 00 00 00 00 00 00 \
2219 00 28 00 05 00 00 00 01 \
2220 00 01 00 10 00 01 00 00 00 00 05 00 00 00 00 00 \
2221 00 02 00 10 00 10 00 00 00 00 f0 00 00 00 00 00 \
2222 00 18 00 09 00 00 00 02 \
2223 00 01 00 10 00 02 00 00 00 00 00 00 00 00 00 00 \
2224 "], [0], [dnl
2225 OFPST_METER_CONFIG reply (OF1.3) (xid=0x2):
2226 meter=1 kbps burst bands=
2227 type=drop rate=65536 burst_size=1280
2228 type=dscp_remark rate=1048576 burst_size=61440 prec_level=0
2229
2230 meter=2 kbps stats bands=
2231 type=drop rate=131072
2232 ])
2233 AT_CLEANUP
2234
2235 AT_SETUP([OFPST_METER reply - OF1.3])
2236 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
2237 AT_CHECK([ovs-ofctl ofp-print "\
2238 04 13 00 90 00 00 00 02 00 09 00 00 00 00 00 00 \
2239 00 00 00 01 00 48 00 00 00 00 00 00 00 00 00 05 \
2240 00 00 00 00 00 00 10 00 00 00 00 00 00 02 30 00 \
2241 00 00 01 8a 0a 6e 23 44 \
2242 00 00 00 00 00 00 00 7e 00 00 00 00 00 00 34 33 \
2243 00 00 00 00 00 00 00 e7 00 00 00 00 00 00 94 2e \
2244 00 00 00 02 00 38 00 00 00 00 00 00 00 00 00 02 \
2245 00 00 00 00 00 00 02 00 00 00 00 00 00 00 30 00 \
2246 00 00 01 87 0a 23 6e 44 \
2247 00 00 00 00 00 00 00 2a 00 00 00 00 00 00 04 33 \
2248 "], [0], [dnl
2249 OFPST_METER reply (OF1.3) (xid=0x2):
2250 meter:1 flow_count:5 packet_in_count:4096 byte_in_count:143360 duration:394.174990148s bands:
2251 0: packet_count:126 byte_count:13363
2252 1: packet_count:231 byte_count:37934
2253
2254 meter:2 flow_count:2 packet_in_count:512 byte_in_count:12288 duration:391.170094148s bands:
2255 0: packet_count:42 byte_count:1075
2256 ])
2257 AT_CLEANUP
2258
2259 AT_SETUP([OFPST_TABLE_FEATURES request - OF1.3])
2260 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
2261 AT_CHECK([ovs-ofctl ofp-print "\
2262 04 13 09 40 00 00 00 d5 00 0c 00 01 00 00 00 00 \
2263 09 30 00 00 00 00 00 00 74 61 62 6c 65 30 00 00 \
2264 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
2265 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff \
2266 ff ff ff ff ff ff ff ff 00 00 00 03 00 0f 42 40 \
2267 00 00 00 2c 00 01 00 08 00 00 00 00 00 02 00 08 \
2268 00 00 00 00 00 03 00 08 00 00 00 00 00 04 00 08 \
2269 00 00 00 00 00 05 00 08 00 00 00 00 00 00 00 00 \
2270 00 01 00 2c 00 01 00 08 00 00 00 00 00 02 00 08 \
2271 00 00 00 00 00 03 00 08 00 00 00 00 00 04 00 08 \
2272 00 00 00 00 00 05 00 08 00 00 00 00 00 00 00 00 \
2273 00 02 01 01 01 02 03 04 05 06 07 08 09 0a 0b 0c \
2274 0d 0e 0f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c \
2275 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c \
2276 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c \
2277 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c \
2278 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c \
2279 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c \
2280 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 7b 7c \
2281 7d 7e 7f 80 81 82 83 84 85 86 87 88 89 8a 8b 8c \
2282 8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c \
2283 9d 9e 9f a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac \
2284 ad ae af b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc \
2285 bd be bf c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc \
2286 cd ce cf d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc \
2287 dd de df e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec \
2288 ed ee ef f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc \
2289 fd 00 00 00 00 00 00 00 00 03 01 01 01 02 03 04 \
2290 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 \
2291 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 \
2292 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 \
2293 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 \
2294 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 \
2295 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 \
2296 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 \
2297 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82 83 84 \
2298 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 \
2299 95 96 97 98 99 9a 9b 9c 9d 9e 9f a0 a1 a2 a3 a4 \
2300 a5 a6 a7 a8 a9 aa ab ac ad ae af b0 b1 b2 b3 b4 \
2301 b5 b6 b7 b8 b9 ba bb bc bd be bf c0 c1 c2 c3 c4 \
2302 c5 c6 c7 c8 c9 ca cb cc cd ce cf d0 d1 d2 d3 d4 \
2303 d5 d6 d7 d8 d9 da db dc dd de df e0 e1 e2 e3 e4 \
2304 e5 e6 e7 e8 e9 ea eb ec ed ee ef f0 f1 f2 f3 f4 \
2305 f5 f6 f7 f8 f9 fa fb fc fd 00 00 00 00 00 00 00 \
2306 00 04 00 84 00 00 00 08 00 00 00 00 00 0b 00 08 \
2307 00 00 00 00 00 0c 00 08 00 00 00 00 00 0f 00 08 \
2308 00 00 00 00 00 10 00 08 00 00 00 00 00 11 00 08 \
2309 00 00 00 00 00 12 00 08 00 00 00 00 00 13 00 08 \
2310 00 00 00 00 00 14 00 08 00 00 00 00 00 15 00 08 \
2311 00 00 00 00 00 16 00 08 00 00 00 00 00 17 00 08 \
2312 00 00 00 00 00 18 00 08 00 00 00 00 00 19 00 08 \
2313 00 00 00 00 00 1a 00 08 00 00 00 00 00 1b 00 08 \
2314 00 00 00 00 00 00 00 00 00 05 00 84 00 00 00 08 \
2315 00 00 00 00 00 0b 00 08 00 00 00 00 00 0c 00 08 \
2316 00 00 00 00 00 0f 00 08 00 00 00 00 00 10 00 08 \
2317 00 00 00 00 00 11 00 08 00 00 00 00 00 12 00 08 \
2318 00 00 00 00 00 13 00 08 00 00 00 00 00 14 00 08 \
2319 00 00 00 00 00 15 00 08 00 00 00 00 00 16 00 08 \
2320 00 00 00 00 00 17 00 08 00 00 00 00 00 18 00 08 \
2321 00 00 00 00 00 19 00 08 00 00 00 00 00 1a 00 08 \
2322 00 00 00 00 00 1b 00 08 00 00 00 00 00 00 00 00 \
2323 00 06 00 84 00 00 00 08 00 00 00 00 00 0b 00 08 \
2324 00 00 00 00 00 0c 00 08 00 00 00 00 00 0f 00 08 \
2325 00 00 00 00 00 10 00 08 00 00 00 00 00 11 00 08 \
2326 00 00 00 00 00 12 00 08 00 00 00 00 00 13 00 08 \
2327 00 00 00 00 00 14 00 08 00 00 00 00 00 15 00 08 \
2328 00 00 00 00 00 16 00 08 00 00 00 00 00 17 00 08 \
2329 00 00 00 00 00 18 00 08 00 00 00 00 00 19 00 08 \
2330 00 00 00 00 00 1a 00 08 00 00 00 00 00 1b 00 08 \
2331 00 00 00 00 00 00 00 00 00 07 00 84 00 00 00 08 \
2332 00 00 00 00 00 0b 00 08 00 00 00 00 00 0c 00 08 \
2333 00 00 00 00 00 0f 00 08 00 00 00 00 00 10 00 08 \
2334 00 00 00 00 00 11 00 08 00 00 00 00 00 12 00 08 \
2335 00 00 00 00 00 13 00 08 00 00 00 00 00 14 00 08 \
2336 00 00 00 00 00 15 00 08 00 00 00 00 00 16 00 08 \
2337 00 00 00 00 00 17 00 08 00 00 00 00 00 18 00 08 \
2338 00 00 00 00 00 19 00 08 00 00 00 00 00 1a 00 08 \
2339 00 00 00 00 00 1b 00 08 00 00 00 00 00 00 00 00 \
2340 00 08 00 dc 80 00 4c 08 00 01 3e 04 00 01 40 04 \
2341 80 00 04 08 00 00 00 02 80 00 00 04 00 01 42 04 \
2342 00 01 00 04 00 01 02 04 00 01 04 04 00 01 06 04 \
2343 00 01 08 04 00 01 0a 04 00 01 0c 04 00 01 0e 04 \
2344 80 00 08 06 80 00 06 06 80 00 0a 02 00 00 08 02 \
2345 80 00 0c 02 80 00 0e 01 80 00 44 04 80 00 46 01 \
2346 80 00 48 01 80 00 16 04 80 00 18 04 80 00 34 10 \
2347 80 00 36 10 80 00 38 04 80 00 14 01 00 00 0a 01 \
2348 80 00 10 01 80 00 12 01 00 01 3a 01 00 01 34 01 \
2349 80 00 2a 02 80 00 2c 04 80 00 2e 04 80 00 30 06 \
2350 80 00 32 06 80 00 1a 02 80 00 1c 02 00 01 44 02 \
2351 80 00 1e 02 80 00 20 02 80 00 22 02 80 00 24 02 \
2352 80 00 26 01 80 00 28 01 80 00 3a 01 80 00 3c 01 \
2353 80 00 3e 10 80 00 40 06 80 00 42 06 00 00 00 00 \
2354 00 0a 00 dc 80 00 4c 08 00 01 3e 04 00 01 40 04 \
2355 80 00 04 08 00 00 00 02 80 00 00 04 00 01 42 04 \
2356 00 01 00 04 00 01 02 04 00 01 04 04 00 01 06 04 \
2357 00 01 08 04 00 01 0a 04 00 01 0c 04 00 01 0e 04 \
2358 80 00 08 06 80 00 06 06 80 00 0a 02 00 00 08 02 \
2359 80 00 0c 02 80 00 0e 01 80 00 44 04 80 00 46 01 \
2360 80 00 48 01 80 00 16 04 80 00 18 04 80 00 34 10 \
2361 80 00 36 10 80 00 38 04 80 00 14 01 00 00 0a 01 \
2362 80 00 10 01 80 00 12 01 00 01 3a 01 00 01 34 01 \
2363 80 00 2a 02 80 00 2c 04 80 00 2e 04 80 00 30 06 \
2364 80 00 32 06 80 00 1a 02 80 00 1c 02 00 01 44 02 \
2365 80 00 1e 02 80 00 20 02 80 00 22 02 80 00 24 02 \
2366 80 00 26 01 80 00 28 01 80 00 3a 01 80 00 3c 01 \
2367 80 00 3e 10 80 00 40 06 80 00 42 06 00 00 00 00 \
2368 00 0c 00 a8 80 00 4c 08 00 01 3e 04 00 01 40 04 \
2369 80 00 04 08 00 00 00 02 80 00 00 04 00 01 42 04 \
2370 00 01 00 04 00 01 02 04 00 01 04 04 00 01 06 04 \
2371 00 01 08 04 00 01 0a 04 00 01 0c 04 00 01 0e 04 \
2372 80 00 08 06 80 00 06 06 00 00 08 02 80 00 0c 02 \
2373 80 00 0e 01 80 00 44 04 80 00 46 01 80 00 16 04 \
2374 80 00 18 04 80 00 34 10 80 00 36 10 00 00 0a 01 \
2375 80 00 10 01 80 00 12 01 00 01 3a 01 80 00 2a 02 \
2376 80 00 2c 04 80 00 2e 04 80 00 30 06 80 00 32 06 \
2377 80 00 1a 02 80 00 1c 02 80 00 1e 02 80 00 20 02 \
2378 80 00 22 02 80 00 24 02 00 0d 00 a8 80 00 4c 08 \
2379 00 01 3e 04 00 01 40 04 80 00 04 08 00 00 00 02 \
2380 80 00 00 04 00 01 42 04 00 01 00 04 00 01 02 04 \
2381 00 01 04 04 00 01 06 04 00 01 08 04 00 01 0a 04 \
2382 00 01 0c 04 00 01 0e 04 80 00 08 06 80 00 06 06 \
2383 00 00 08 02 80 00 0c 02 80 00 0e 01 80 00 44 04 \
2384 80 00 46 01 80 00 16 04 80 00 18 04 80 00 34 10 \
2385 80 00 36 10 00 00 0a 01 80 00 10 01 80 00 12 01 \
2386 00 01 3a 01 80 00 2a 02 80 00 2c 04 80 00 2e 04 \
2387 80 00 30 06 80 00 32 06 80 00 1a 02 80 00 1c 02 \
2388 80 00 1e 02 80 00 20 02 80 00 22 02 80 00 24 02 \
2389 00 0e 00 a8 80 00 4c 08 00 01 3e 04 00 01 40 04 \
2390 80 00 04 08 00 00 00 02 80 00 00 04 00 01 42 04 \
2391 00 01 00 04 00 01 02 04 00 01 04 04 00 01 06 04 \
2392 00 01 08 04 00 01 0a 04 00 01 0c 04 00 01 0e 04 \
2393 80 00 08 06 80 00 06 06 00 00 08 02 80 00 0c 02 \
2394 80 00 0e 01 80 00 44 04 80 00 46 01 80 00 16 04 \
2395 80 00 18 04 80 00 34 10 80 00 36 10 00 00 0a 01 \
2396 80 00 10 01 80 00 12 01 00 01 3a 01 80 00 2a 02 \
2397 80 00 2c 04 80 00 2e 04 80 00 30 06 80 00 32 06 \
2398 80 00 1a 02 80 00 1c 02 80 00 1e 02 80 00 20 02 \
2399 80 00 22 02 80 00 24 02 00 0f 00 a8 80 00 4c 08 \
2400 00 01 3e 04 00 01 40 04 80 00 04 08 00 00 00 02 \
2401 80 00 00 04 00 01 42 04 00 01 00 04 00 01 02 04 \
2402 00 01 04 04 00 01 06 04 00 01 08 04 00 01 0a 04 \
2403 00 01 0c 04 00 01 0e 04 80 00 08 06 80 00 06 06 \
2404 00 00 08 02 80 00 0c 02 80 00 0e 01 80 00 44 04 \
2405 80 00 46 01 80 00 16 04 80 00 18 04 80 00 34 10 \
2406 80 00 36 10 00 00 0a 01 80 00 10 01 80 00 12 01 \
2407 00 01 3a 01 80 00 2a 02 80 00 2c 04 80 00 2e 04 \
2408 80 00 30 06 80 00 32 06 80 00 1a 02 80 00 1c 02 \
2409 80 00 1e 02 80 00 20 02 80 00 22 02 80 00 24 02 \
2410 "], [0], [OFPST_TABLE_FEATURES reply (OF1.3) (xid=0xd5):
2411   table 0 ("table0"):
2412     metadata: match=0xffffffffffffffff write=0xffffffffffffffff
2413     max_entries=1000000
2414     instructions (table miss and others):
2415       next tables: 1-253
2416       instructions: apply_actions,clear_actions,write_actions,write_metadata,goto_table
2417       Write-Actions and Apply-Actions features:
2418         actions: output group set_field strip_vlan push_vlan mod_nw_ttl dec_ttl set_mpls_ttl dec_mpls_ttl push_mpls pop_mpls set_queue
2419         supported on Set-Field: tun_id tun_src tun_dst metadata in_port in_port_oxm pkt_mark reg0 reg1 reg2 reg3 reg4 reg5 reg6 reg7 eth_src eth_dst vlan_tci vlan_vid vlan_pcp mpls_label mpls_tc ip_src ip_dst ipv6_src ipv6_dst nw_tos ip_dscp nw_ecn nw_ttl arp_op arp_spa arp_tpa arp_sha arp_tha tcp_src tcp_dst udp_src udp_dst sctp_src sctp_dst
2420     matching:
2421       tun_id: exact match or wildcard
2422       tun_src: exact match or wildcard
2423       tun_dst: exact match or wildcard
2424       metadata: exact match or wildcard
2425       in_port: exact match or wildcard
2426       in_port_oxm: exact match or wildcard
2427       pkt_mark: exact match or wildcard
2428       reg0: exact match or wildcard
2429       reg1: exact match or wildcard
2430       reg2: exact match or wildcard
2431       reg3: exact match or wildcard
2432       reg4: exact match or wildcard
2433       reg5: exact match or wildcard
2434       reg6: exact match or wildcard
2435       reg7: exact match or wildcard
2436       eth_src: exact match or wildcard
2437       eth_dst: exact match or wildcard
2438       eth_type: exact match or wildcard
2439       vlan_tci: exact match or wildcard
2440       vlan_vid: exact match or wildcard
2441       vlan_pcp: exact match or wildcard
2442       mpls_label: exact match or wildcard
2443       mpls_tc: exact match or wildcard
2444       mpls_bos: exact match or wildcard
2445       ip_src: exact match or wildcard
2446       ip_dst: exact match or wildcard
2447       ipv6_src: exact match or wildcard
2448       ipv6_dst: exact match or wildcard
2449       ipv6_label: exact match or wildcard
2450       nw_proto: exact match or wildcard
2451       nw_tos: exact match or wildcard
2452       ip_dscp: exact match or wildcard
2453       nw_ecn: exact match or wildcard
2454       nw_ttl: exact match or wildcard
2455       ip_frag: exact match or wildcard
2456       arp_op: exact match or wildcard
2457       arp_spa: exact match or wildcard
2458       arp_tpa: exact match or wildcard
2459       arp_sha: exact match or wildcard
2460       arp_tha: exact match or wildcard
2461       tcp_src: exact match or wildcard
2462       tcp_dst: exact match or wildcard
2463       tcp_flags: exact match or wildcard
2464       udp_src: exact match or wildcard
2465       udp_dst: exact match or wildcard
2466       sctp_src: exact match or wildcard
2467       sctp_dst: exact match or wildcard
2468       icmp_type: exact match or wildcard
2469       icmp_code: exact match or wildcard
2470       icmpv6_type: exact match or wildcard
2471       icmpv6_code: exact match or wildcard
2472       nd_target: exact match or wildcard
2473       nd_sll: exact match or wildcard
2474       nd_tll: exact match or wildcard
2475 ])
2476 AT_CLEANUP
2477
2478 AT_SETUP([OFPT_BARRIER_REQUEST - OF1.0])
2479 AT_KEYWORDS([ofp-print])
2480 AT_CHECK([ovs-ofctl ofp-print '01 12 00 08 00 00 00 01'], [0], [dnl
2481 OFPT_BARRIER_REQUEST (xid=0x1):
2482 ])
2483 AT_CLEANUP
2484
2485 AT_SETUP([OFPT_BARRIER_REQUEST - OF1.1])
2486 AT_KEYWORDS([ofp-print])
2487 AT_CHECK([ovs-ofctl ofp-print '02 14 00 08 00 00 00 01'], [0], [dnl
2488 OFPT_BARRIER_REQUEST (OF1.1) (xid=0x1):
2489 ])
2490 AT_CLEANUP
2491
2492 AT_SETUP([OFPT_BARRIER_REQUEST - OF1.2])
2493 AT_KEYWORDS([ofp-print])
2494 AT_CHECK([ovs-ofctl ofp-print '03 14 00 08 00 00 00 01'], [0], [dnl
2495 OFPT_BARRIER_REQUEST (OF1.2) (xid=0x1):
2496 ])
2497 AT_CLEANUP
2498
2499 AT_SETUP([OFPT_BARRIER_REQUEST - OF1.3])
2500 AT_KEYWORDS([ofp-print])
2501 AT_CHECK([ovs-ofctl ofp-print '04 14 00 08 00 00 00 01'], [0], [dnl
2502 OFPT_BARRIER_REQUEST (OF1.3) (xid=0x1):
2503 ])
2504 AT_CLEANUP
2505
2506 AT_SETUP([OFPT_BARRIER_REPLY - OF1.0])
2507 AT_KEYWORDS([ofp-print])
2508 AT_CHECK([ovs-ofctl ofp-print '01 13 00 08 00 00 00 01'], [0], [dnl
2509 OFPT_BARRIER_REPLY (xid=0x1):
2510 ])
2511 AT_CLEANUP
2512
2513 AT_SETUP([OFPT_BARRIER_REPLY - OF1.1])
2514 AT_KEYWORDS([ofp-print])
2515 AT_CHECK([ovs-ofctl ofp-print '02 15 00 08 00 00 00 01'], [0], [dnl
2516 OFPT_BARRIER_REPLY (OF1.1) (xid=0x1):
2517 ])
2518 AT_CLEANUP
2519
2520 AT_SETUP([OFPT_BARRIER_REPLY - OF1.2])
2521 AT_KEYWORDS([ofp-print])
2522 AT_CHECK([ovs-ofctl ofp-print '03 15 00 08 00 00 00 01'], [0], [dnl
2523 OFPT_BARRIER_REPLY (OF1.2) (xid=0x1):
2524 ])
2525 AT_CLEANUP
2526
2527 AT_SETUP([OFPT_BARRIER_REPLY - OF1.3])
2528 AT_KEYWORDS([ofp-print])
2529 AT_CHECK([ovs-ofctl ofp-print '04 15 00 08 00 00 00 01'], [0], [dnl
2530 OFPT_BARRIER_REPLY (OF1.3) (xid=0x1):
2531 ])
2532 AT_CLEANUP
2533
2534 AT_SETUP([OFPT_QUEUE_GET_CONFIG_REQUEST - OF1.0])
2535 AT_KEYWORDS([ofp-print])
2536 AT_CHECK([ovs-ofctl ofp-print "01 14 00 0c 00 00 00 01 00 01 00 00"], [0], [dnl
2537 OFPT_QUEUE_GET_CONFIG_REQUEST (xid=0x1): port=1
2538 ])
2539 AT_CLEANUP
2540
2541 AT_SETUP([OFPT_QUEUE_GET_CONFIG_REQUEST - OF1.2])
2542 AT_KEYWORDS([ofp-print])
2543 AT_CHECK([ovs-ofctl ofp-print "\
2544 03 16 00 10 00 00 00 01 00 00 00 01 00 00 00 00"], [0], [dnl
2545 OFPT_QUEUE_GET_CONFIG_REQUEST (OF1.2) (xid=0x1): port=1
2546 ])
2547 AT_CLEANUP
2548
2549 AT_SETUP([OFPT_QUEUE_GET_CONFIG_REPLY - OF1.0])
2550 AT_KEYWORDS([ofp-print])
2551 AT_CHECK([ovs-ofctl ofp-print "01 15 00 40 00 00 00 01 \
2552 00 01 00 00 00 00 00 00 \
2553 00 00 55 55 00 28 00 00 \
2554 00 01 00 10 00 00 00 00 01 f4 00 00 00 00 00 00 \
2555 00 02 00 10 00 00 00 00 02 ee 00 00 00 00 00 00 \
2556 00 00 44 44 00 08 00 00 \
2557 "], [0], [dnl
2558 OFPT_QUEUE_GET_CONFIG_REPLY (xid=0x1): port=1
2559 queue 21845: min_rate:50.0% max_rate:75.0%
2560 queue 17476:
2561 ])
2562 AT_CLEANUP
2563
2564 AT_SETUP([OFPT_QUEUE_GET_CONFIG_REPLY - OF1.1])
2565 AT_KEYWORDS([ofp-print])
2566 AT_CHECK([ovs-ofctl ofp-print "02 17 00 40 00 00 00 01 \
2567 00 00 00 01 00 00 00 00 \
2568 00 00 55 55 00 28 00 00 \
2569 00 01 00 10 00 00 00 00 01 f4 00 00 00 00 00 00 \
2570 00 02 00 10 00 00 00 00 02 ee 00 00 00 00 00 00 \
2571 00 00 44 44 00 08 00 00 \
2572 "], [0], [dnl
2573 OFPT_QUEUE_GET_CONFIG_REPLY (OF1.1) (xid=0x1): port=1
2574 queue 21845: min_rate:50.0% max_rate:75.0%
2575 queue 17476:
2576 ])
2577 AT_CLEANUP
2578
2579 AT_SETUP([OFPT_QUEUE_GET_CONFIG_REPLY - OF1.2])
2580 AT_KEYWORDS([ofp-print])
2581 AT_CHECK([ovs-ofctl ofp-print "03 17 00 50 00 00 00 01 \
2582 00 00 00 01 00 00 00 00 \
2583 00 00 55 55 00 00 00 01 00 30 00 00 00 00 00 00 \
2584 00 01 00 10 00 00 00 00 01 f4 00 00 00 00 00 00 \
2585 00 02 00 10 00 00 00 00 02 ee 00 00 00 00 00 00 \
2586 00 00 44 44 00 08 00 01 00 10 00 00 00 00 00 00 \
2587 "], [0], [dnl
2588 OFPT_QUEUE_GET_CONFIG_REPLY (OF1.2) (xid=0x1): port=1
2589 queue 21845: min_rate:50.0% max_rate:75.0%
2590 queue 17476:
2591 ])
2592 AT_CLEANUP
2593
2594 AT_SETUP([OFPT_SET_ASYNC - OF1.3])
2595 AT_KEYWORDS([ofp-print])
2596 AT_CHECK([ovs-ofctl ofp-print "\
2597 04 1c 00 20 00 00 00 00 00 00 10 05 00 00 10 07 \
2598 00 00 00 03 00 00 00 07 00 00 00 00 00 00 00 03 \
2599 "], [0], [dnl
2600 OFPT_SET_ASYNC (OF1.3) (xid=0x0):
2601  master:
2602        PACKET_IN: no_match invalid_ttl 12
2603      PORT_STATUS: add delete
2604     FLOW_REMOVED: (off)
2605
2606  slave:
2607        PACKET_IN: no_match action invalid_ttl 12
2608      PORT_STATUS: add delete modify
2609     FLOW_REMOVED: idle hard
2610 ])
2611 AT_CLEANUP
2612
2613 AT_SETUP([OFPT_ROLE_REQUEST - OF1.2])
2614 AT_KEYWORDS([ofp-print])
2615 AT_CHECK([ovs-ofctl ofp-print "\
2616 03 18 00 18 00 00 00 02 00 00 00 02 00 00 00 00 \
2617 00 00 00 00 00 00 00 03 \
2618 "], [0], [dnl
2619 OFPT_ROLE_REQUEST (OF1.2) (xid=0x2): role=master generation_id=3
2620 ])
2621 AT_CLEANUP
2622
2623 AT_SETUP([OFPT_ROLE_REQUEST - nochange - OF1.2])
2624 AT_KEYWORDS([ofp-print])
2625 AT_CHECK([ovs-ofctl ofp-print "\
2626 03 18 00 18 00 00 00 02 00 00 00 00 00 00 00 00 \
2627 00 00 00 00 00 00 00 00 \
2628 "], [0], [dnl
2629 OFPT_ROLE_REQUEST (OF1.2) (xid=0x2): role=nochange
2630 ])
2631 AT_CLEANUP
2632
2633 AT_SETUP([NXT_ROLE_REQUEST])
2634 AT_KEYWORDS([ofp-print])
2635 AT_CHECK([ovs-ofctl ofp-print "\
2636 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0a \
2637 00 00 00 01 \
2638 "], [0], [dnl
2639 NXT_ROLE_REQUEST (xid=0x2): role=master
2640 ])
2641 AT_CLEANUP
2642
2643 AT_SETUP([OFPT_ROLE_REPLY - OF1.2])
2644 AT_KEYWORDS([ofp-print])
2645 AT_CHECK([ovs-ofctl ofp-print "\
2646 03 19 00 18 00 00 00 02 00 00 00 03 00 00 00 00 \
2647 12 34 56 78 ab cd ef 90 \
2648 "], [0], [dnl
2649 OFPT_ROLE_REPLY (OF1.2) (xid=0x2): role=slave generation_id=1311768467750121360
2650 ])
2651 AT_CLEANUP
2652
2653 AT_SETUP([NXT_ROLE_REPLY])
2654 AT_KEYWORDS([ofp-print])
2655 AT_CHECK([ovs-ofctl ofp-print "\
2656 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0b \
2657 00 00 00 02 \
2658 "], [0], [dnl
2659 NXT_ROLE_REPLY (xid=0x2): role=slave
2660 ])
2661 AT_CLEANUP
2662
2663 AT_SETUP([OFP_ROLE_STATUS - master, experimenter - OF1.4])
2664 AT_KEYWORDS([ofp-print])
2665 AT_CHECK([ovs-ofctl ofp-print "\
2666 05 1e 00 18 00 00 00 0a \
2667 00 00 00 02 02 00 00 00 ff ff ff ff ff ff ff ff \
2668 "], [0], [dnl
2669 OFPT_ROLE_STATUS (OF1.4) (xid=0xa): role=master reason=experimenter_data_changed
2670 ])
2671 AT_CLEANUP
2672
2673 AT_SETUP([OFP_ROLE_STATUS - master, config - OF1.4])
2674 AT_KEYWORDS([ofp-print])
2675 AT_CHECK([ovs-ofctl ofp-print "\
2676 05 1e 00 18 00 00 00 0a \
2677 00 00 00 02 01 00 00 00 ff ff ff ff ff ff ff ff \
2678 "], [0], [dnl
2679 OFPT_ROLE_STATUS (OF1.4) (xid=0xa): role=master reason=configuration_changed
2680 ])
2681 AT_CLEANUP
2682
2683 AT_SETUP([OFP_ROLE_STATUS - master, config,generation - OF1.4])
2684 AT_KEYWORDS([ofp-print])
2685 AT_CHECK([ovs-ofctl ofp-print "\
2686 05 1e 00 18 00 00 00 0a \
2687 00 00 00 02 01 00 00 00 00 00 00 00 00 00 00 10 \
2688 "], [0], [dnl
2689 OFPT_ROLE_STATUS (OF1.4) (xid=0xa): role=master generation_id=16 reason=configuration_changed
2690 ])
2691 AT_CLEANUP
2692
2693 AT_SETUP([OFP_REQUESTFORWARD - OF1.4])
2694 AT_KEYWORDS([ofp-print])
2695 AT_CHECK([ovs-ofctl ofp-print "\
2696 05 20 00 18 00 00 00 02 \
2697 05 0f 00 10 02 00 00 00 \
2698 00 00 00 00 00 00 00 01 \
2699 "], [0], [dnl
2700 OFPT_REQUESTFORWARD (OF1.4) (xid=0x2): reason=group_mod
2701  ADD group_id=1,type=all
2702 ])
2703 AT_CLEANUP
2704
2705 AT_SETUP([OFP_REQUESTFORWARD - OF1.4])
2706 AT_KEYWORDS([ofp-print])
2707 AT_CHECK([ovs-ofctl ofp-print "\
2708 05 20 00 18 00 00 00 02 \
2709 05 0f 00 10 02 00 00 00 \
2710 00 01 01 00 00 00 00 01 \
2711 "], [0], [dnl
2712 OFPT_REQUESTFORWARD (OF1.4) (xid=0x2): reason=group_mod
2713  MOD group_id=1,type=select
2714 ])
2715 AT_CLEANUP
2716
2717 AT_SETUP([OFP_REQUESTFORWARD - OF1.4])
2718 AT_KEYWORDS([ofp-print])
2719 AT_CHECK([ovs-ofctl ofp-print "\
2720 05 20 00 18 00 00 00 02 \
2721 05 1d 00 10 02 00 00 00 \
2722 00 00 00 00 00 00 00 01 \
2723 "], [0], [dnl
2724 OFPT_REQUESTFORWARD (OF1.4) (xid=0x2): reason=meter_mod ADD meter=1 bands=
2725 ])
2726 AT_CLEANUP
2727
2728 AT_SETUP([OFP_REQUESTFORWARD - OF1.4])
2729 AT_KEYWORDS([ofp-print])
2730 AT_CHECK([ovs-ofctl ofp-print "\
2731 05 20 00 18 00 00 00 02 \
2732 05 1d 00 10 02 00 00 00 \
2733 00 01 01 00 00 00 00 01 \
2734 "], [0], [dnl
2735 OFPT_REQUESTFORWARD (OF1.4) (xid=0x2): reason=meter_mod MOD meter=1 flags:0x100 bands=
2736 ])
2737 AT_CLEANUP
2738
2739 AT_SETUP([NXT_SET_PACKET_IN])
2740 AT_KEYWORDS([ofp-print])
2741 AT_CHECK([ovs-ofctl ofp-print "\
2742 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 10 \
2743 00 00 00 01 \
2744 "], [0], [dnl
2745 NXT_SET_PACKET_IN_FORMAT (xid=0x2): format=nxm
2746 ])
2747 AT_CLEANUP
2748
2749 AT_SETUP([NXT_PACKET_IN])
2750 AT_KEYWORDS([ofp-print])
2751 AT_CHECK([ovs-ofctl ofp-print "\
2752 01 04 00 ba 00 00 00 00 00 00 23 20 00 00 00 11 \
2753 ff ff ff ff 00 40 01 07 00 00 00 00 00 00 00 09 \
2754 00 4e 00 00 00 00 00 00 00 00 00 02 00 01 00 01 \
2755 20 08 00 00 00 00 00 00 00 06 00 01 00 04 00 00 \
2756 00 01 00 01 02 04 00 00 00 02 00 01 04 04 00 00 \
2757 00 03 00 01 06 04 00 00 00 04 00 01 08 04 00 00 \
2758 00 05 80 00 05 10 5a 5a 5a 5a 5a 5a 5a 5a ff ff \
2759 ff ff ff ff ff ff 00 00 00 00 82 82 82 82 82 82 \
2760 80 81 81 81 81 81 81 00 00 50 08 00 45 00 00 28 \
2761 00 00 00 00 00 06 32 05 53 53 53 53 54 54 54 54 \
2762 00 55 00 56 00 00 00 00 00 00 00 00 50 02 00 00 \
2763 31 6d 00 00 00 00 00 00 00 00 \
2764 "], [0], [dnl
2765 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,metadata=0x5a5a5a5a5a5a5a5a,in_port=1 (via action) data_len=64 (unbuffered)
2766 tcp,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=syn tcp_csum:316d
2767 ])
2768 AT_CLEANUP
2769
2770 AT_SETUP([NXT_PACKET_IN, with hex output of packet data])
2771 AT_KEYWORDS([ofp-print])
2772 AT_CHECK([ovs-ofctl ofp-print "\
2773 01 04 00 ba 00 00 00 00 00 00 23 20 00 00 00 11 \
2774 ff ff ff ff 00 40 01 07 00 00 00 00 00 00 00 09 \
2775 00 4e 00 00 00 00 00 00 00 00 00 02 00 01 00 01 \
2776 20 08 00 00 00 00 00 00 00 06 00 01 00 04 00 00 \
2777 00 01 00 01 02 04 00 00 00 02 00 01 04 04 00 00 \
2778 00 03 00 01 06 04 00 00 00 04 00 01 08 04 00 00 \
2779 00 05 80 00 05 10 5a 5a 5a 5a 5a 5a 5a 5a ff ff \
2780 ff ff ff ff ff ff 00 00 00 00 82 82 82 82 82 82 \
2781 80 81 81 81 81 81 81 00 00 50 08 00 45 00 00 28 \
2782 00 00 00 00 00 06 32 05 53 53 53 53 54 54 54 54 \
2783 00 55 00 56 00 00 00 00 00 00 00 00 50 01 00 00 \
2784 31 6d 00 00 00 00 00 00 00 00 \
2785 " 3], [0], [dnl
2786 NXT_PACKET_IN (xid=0x0): table_id=7 cookie=0x9 total_len=64 reg0=0x1,reg1=0x2,reg2=0x3,reg3=0x4,reg4=0x5,tun_id=0x6,metadata=0x5a5a5a5a5a5a5a5a,in_port=1 (via action) data_len=64 (unbuffered)
2787 tcp,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=fin tcp_csum:316d
2788 00000000  82 82 82 82 82 82 80 81-81 81 81 81 81 00 00 50
2789 00000010  08 00 45 00 00 28 00 00-00 00 00 06 32 05 53 53
2790 00000020  53 53 54 54 54 54 00 55-00 56 00 00 00 00 00 00
2791 00000030  00 00 50 01 00 00 31 6d-00 00 00 00 00 00 00 00
2792 ])
2793 AT_CLEANUP
2794
2795 AT_SETUP([NXT_SET_ASYNC_CONFIG])
2796 AT_KEYWORDS([ofp-print])
2797 AT_CHECK([ovs-ofctl ofp-print "\
2798 01 04 00 28 00 00 00 00 00 00 23 20 00 00 00 13 \
2799 00 00 10 05 00 00 10 07 00 00 00 03 00 00 00 07 \
2800 00 00 00 00 00 00 00 03 \
2801 "], [0], [dnl
2802 NXT_SET_ASYNC_CONFIG (xid=0x0):
2803  master:
2804        PACKET_IN: no_match invalid_ttl 12
2805      PORT_STATUS: add delete
2806     FLOW_REMOVED: (off)
2807
2808  slave:
2809        PACKET_IN: no_match action invalid_ttl 12
2810      PORT_STATUS: add delete modify
2811     FLOW_REMOVED: idle hard
2812 ])
2813 AT_CLEANUP
2814
2815 AT_SETUP([OFPT_SET_ASYNC_CONFIG])
2816 AT_KEYWORDS([ofp-print])
2817 AT_CHECK([ovs-ofctl ofp-print "\
2818 05 1c 00 38 00 00 00 02 00 00 00 08 00 00 00 05 \
2819 00 01 00 08 00 00 00 02 00 02 00 08 00 00 00 02 \
2820 00 03 00 08 00 00 00 05 00 04 00 08 00 00 00 1c \
2821 00 05 00 08 00 00 00 05 \
2822 "], [0], [dnl
2823 OFPT_SET_ASYNC (OF1.4) (xid=0x2):
2824  master:
2825        PACKET_IN: action
2826      PORT_STATUS: add modify
2827     FLOW_REMOVED: idle delete
2828      ROLE_STATUS: (off)
2829     TABLE_STATUS: (off)
2830   REQUESTFORWARD: (off)
2831
2832  slave:
2833        PACKET_IN: no_match invalid_ttl
2834      PORT_STATUS: delete
2835     FLOW_REMOVED: delete group_delete meter_delete
2836      ROLE_STATUS: (off)
2837     TABLE_STATUS: (off)
2838   REQUESTFORWARD: (off)
2839 ])
2840 AT_CLEANUP
2841
2842 AT_SETUP([OFPT_SET_ASYNC_CONFIG - invalid mask - OF1.4])
2843 AT_KEYWORDS([ofp-print])
2844 AT_CHECK([ovs-ofctl ofp-print "\
2845 05 1c 00 38 00 00 00 02 00 00 00 08 00 00 00 40 \
2846 00 01 00 08 00 00 00 02 00 02 00 08 00 00 00 02 \
2847 00 03 00 08 00 00 00 05 00 04 00 08 00 00 00 1c \
2848 00 05 00 08 00 00 00 05 \
2849 "], [0], [dnl
2850 OFPT_SET_ASYNC (OF1.4) (xid=0x2): ***decode error: OFPACFC_INVALID***
2851 ])
2852 AT_CLEANUP
2853
2854 AT_SETUP([OFPT_SET_ASYNC_CONFIG - unsupported configuration - OF1.4])
2855 AT_KEYWORDS([ofp-print])
2856 AT_CHECK([ovs-ofctl ofp-print "\
2857 05 1c 00 38 00 00 00 02 00 00 00 08 00 00 00 05 \
2858 00 11 00 08 00 00 00 02 00 02 00 08 00 00 00 02 \
2859 00 03 00 08 00 00 00 05 00 04 00 08 00 00 00 1c \
2860 00 05 00 08 00 00 00 05\
2861 "], [0], [dnl
2862 OFPT_SET_ASYNC (OF1.4) (xid=0x2): ***decode error: OFPACFC_UNSUPPORTED***
2863 ])
2864 AT_CLEANUP
2865
2866 AT_SETUP([NXT_SET_CONTROLLER_ID])
2867 AT_KEYWORDS([ofp-print])
2868 AT_CHECK([ovs-ofctl ofp-print "\
2869 01 04 00 18 00 00 00 03 00 00 23 20 00 00 00 14 \
2870 00 00 00 00 00 00 00 7b \
2871 "], [0], [dnl
2872 NXT_SET_CONTROLLER_ID (xid=0x3): id=123
2873 ])
2874 AT_CLEANUP
2875
2876 AT_SETUP([NXT_FLOW_MONITOR_CANCEL])
2877 AT_KEYWORDS([ofp-print])
2878 AT_CHECK([ovs-ofctl ofp-print "\
2879 01 04 00 14 00 00 00 03 00 00 23 20 00 00 00 15 \
2880 01 02 30 40 \
2881 "], [0], [dnl
2882 NXT_FLOW_MONITOR_CANCEL (xid=0x3): id=16920640
2883 ])
2884 AT_CLEANUP
2885
2886 AT_SETUP([NXT_FLOW_MONITOR_PAUSED])
2887 AT_KEYWORDS([ofp-print])
2888 AT_CHECK([ovs-ofctl ofp-print "\
2889 01 04 00 10 00 00 00 03 00 00 23 20 00 00 00 16 \
2890 "], [0], [dnl
2891 NXT_FLOW_MONITOR_PAUSED (xid=0x3):
2892 ])
2893 AT_CLEANUP
2894
2895 AT_SETUP([NXT_FLOW_MONITOR_RESUMED])
2896 AT_KEYWORDS([ofp-print])
2897 AT_CHECK([ovs-ofctl ofp-print "\
2898 01 04 00 10 00 00 00 03 00 00 23 20 00 00 00 17 \
2899 "], [0], [dnl
2900 NXT_FLOW_MONITOR_RESUMED (xid=0x3):
2901 ])
2902 AT_CLEANUP
2903
2904 AT_SETUP([NXT_SET_FLOW_FORMAT])
2905 AT_KEYWORDS([ofp-print])
2906 AT_CHECK([ovs-ofctl ofp-print "\
2907 01 04 00 14 00 00 00 02 00 00 23 20 00 00 00 0c \
2908 00 00 00 02 \
2909 "], [0], [dnl
2910 NXT_SET_FLOW_FORMAT (xid=0x2): format=nxm
2911 ])
2912 AT_CLEANUP
2913
2914 # The flow is formatted with cls_rule_format() for the low-verbosity case.
2915 AT_SETUP([NXT_FLOW_MOD, low verbosity])
2916 AT_KEYWORDS([ofp-print])
2917 AT_CHECK([ovs-ofctl ofp-print "\
2918 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
2919 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
2920 ff ff ff ff 00 10 00 00 00 14 00 00 00 00 00 00 \
2921 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
2922 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
2923 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
2924 " 2], [0], [dnl
2925 NXT_FLOW_MOD (xid=0x2): ADD reg0=0x7b,tun_id=0x1c8 out_port:16 actions=load:0x5->NXM_NX_REG0[[]]
2926 ])
2927 AT_CLEANUP
2928
2929 # The flow is formatted with ofp10_match_to_string() for the
2930 # low-verbosity case.
2931 AT_SETUP([NXT_FLOW_MOD, high verbosity])
2932 AT_KEYWORDS([ofp-print])
2933 AT_CHECK([ovs-ofctl ofp-print "\
2934 01 04 00 60 00 00 00 02 00 00 23 20 00 00 00 0d \
2935 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 \
2936 ff ff ff ff 01 00 00 00 00 14 00 00 00 00 00 00 \
2937 00 01 20 08 00 00 00 00 00 00 01 c8 00 01 00 04 \
2938 00 00 00 7b 00 00 00 00 ff ff 00 18 00 00 23 20 \
2939 00 07 00 1f 00 01 00 04 00 00 00 00 00 00 00 05 \
2940 " 3], [0], [dnl
2941 NXT_FLOW_MOD (xid=0x2): ADD NXM_NX_TUN_ID(00000000000001c8), NXM_NX_REG0(0000007b) out_port:256 actions=load:0x5->NXM_NX_REG0[[]]
2942 ])
2943 AT_CLEANUP
2944
2945 AT_SETUP([OFPT_GROUP_MOD - OF1.1])
2946 AT_KEYWORDS([ofp-print])
2947 AT_CHECK([ovs-ofctl ofp-print "\
2948 02 0f 00 70 11 22 33 44 00 00 01 00 87 65 43 21 \
2949 00 20 00 64 00 00 00 01 ff ff ff ff 00 00 00 00 \
2950 00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
2951 00 20 00 c8 00 00 00 02 ff ff ff ff 00 00 00 00 \
2952 00 00 00 10 00 00 00 02 00 00 00 00 00 00 00 00 \
2953 00 20 00 c8 00 00 00 03 ff ff ff ff 00 00 00 00 \
2954 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
2955 "], [0], [dnl
2956 OFPT_GROUP_MOD (OF1.1) (xid=0x11223344):
2957  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
2958 ])
2959 AT_CLEANUP
2960
2961 AT_SETUP([OFPT_GROUP_MOD add - OF1.5])
2962 AT_KEYWORDS([ofp-print])
2963 AT_CHECK([ovs-ofctl ofp-print "\
2964 06 0f 00 b8 11 22 33 44 00 00 01 00 87 65 43 21 \
2965 00 78 00 00 ff ff ff ff 00 28 00 10 00 00 00 00 \
2966 00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
2967 00 00 00 08 00 64 00 00 00 01 00 08 00 00 00 01 \
2968 00 28 00 10 00 00 00 01 00 00 00 10 00 00 00 02 \
2969 00 00 00 00 00 00 00 00 00 00 00 08 00 c8 00 00 \
2970 00 01 00 08 00 00 00 02 00 28 00 10 00 00 00 02 \
2971 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
2972 00 00 00 08 00 c8 00 00 00 01 00 08 00 00 00 03 \
2973 ff ff 00 28 00 00 15 40 00 00 00 01 00 00 00 00 \
2974 68 61 73 68 00 00 00 00 00 00 00 00 00 00 00 00 \
2975 00 00 00 00 00 00 00 07 \
2976 "], [0], [dnl
2977 OFPT_GROUP_MOD (OF1.5) (xid=0x11223344):
2978  ADD group_id=2271560481,type=select,selection_method=hash,selection_method_param=7,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
2979 ])
2980 AT_CLEANUP
2981
2982 AT_SETUP([OFPT_GROUP_MOD insert bucket - OF1.5])
2983 AT_KEYWORDS([ofp-print])
2984 AT_CHECK([ovs-ofctl ofp-print "\
2985 06 0f 00 90 11 22 33 44 00 03 01 00 87 65 43 21 \
2986 00 78 00 00 ff ff ff fd 00 28 00 10 00 00 00 00 \
2987 00 00 00 10 00 00 00 01 00 00 00 00 00 00 00 00 \
2988 00 00 00 08 00 64 00 00 00 01 00 08 00 00 00 01 \
2989 00 28 00 10 00 00 00 01 00 00 00 10 00 00 00 02 \
2990 00 00 00 00 00 00 00 00 00 00 00 08 00 c8 00 00 \
2991 00 01 00 08 00 00 00 02 00 28 00 10 00 00 00 02 \
2992 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
2993 00 00 00 08 00 c8 00 00 00 01 00 08 00 00 00 03 \
2994 "], [0], [dnl
2995 OFPT_GROUP_MOD (OF1.5) (xid=0x11223344):
2996  INSERT_BUCKET command_bucket_id:first,group_id=2271560481,bucket=bucket_id:0,weight:100,watch_port:1,actions=output:1,bucket=bucket_id:1,weight:200,watch_port:2,actions=output:2,bucket=bucket_id:2,weight:200,watch_port:3,actions=output:3
2997 ])
2998 AT_CLEANUP
2999
3000 AT_SETUP([NXT_FLOW_REMOVED])
3001 AT_KEYWORDS([ofp-print])
3002 AT_CHECK([ovs-ofctl ofp-print "\
3003 01 04 00 78 00 00 00 00 00 00 23 20 00 00 00 0e \
3004 00 00 00 00 00 00 00 00 ff ff 00 02 00 00 00 06 \
3005 01 6e 36 00 00 05 00 3c 00 00 00 00 00 00 00 01 \
3006 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
3007 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
3008 00 05 00 00 06 02 08 06 00 00 08 02 00 00 00 00 \
3009 1e 02 00 02 00 00 20 04 c0 a8 00 01 00 00 22 04 \
3010 c0 a8 00 02 00 00 00 00 \
3011 "], [0], [dnl
3012 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
3013 ])
3014 AT_CLEANUP
3015
3016 AT_SETUP([NXT_FLOW_MOD_TABLE_ID])
3017 AT_KEYWORDS([ofp-print])
3018 AT_CHECK([ovs-ofctl ofp-print "\
3019 01 04 00 18 01 02 03 04 00 00 23 20 00 00 00 0f \
3020 01 00 00 00 00 00 00 00 \
3021 "], [0], [dnl
3022 NXT_FLOW_MOD_TABLE_ID (xid=0x1020304): enable
3023 ])
3024 AT_CLEANUP
3025
3026 AT_SETUP([NXST_FLOW request])
3027 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
3028 AT_CHECK([ovs-ofctl ofp-print "\
3029 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
3030 00 00 00 00 00 00 00 00 ff ff 00 00 ff 00 00 00 \
3031 "], [0], [dnl
3032 NXST_FLOW request (xid=0x4): @&t@
3033 ])
3034 AT_CLEANUP
3035
3036 AT_SETUP([NXST_FLOW reply])
3037 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
3038 AT_CHECK([ovs-ofctl ofp-print "\
3039 01 11 08 18 00 00 00 04 ff ff 00 00 00 00 23 20 \
3040 00 00 00 00 00 00 00 00 00 88 00 00 00 00 00 01 \
3041 02 dc 6c 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
3042 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
3043 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
3044 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
3045 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
3046 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
3047 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e7 00 00 \
3048 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
3049 00 88 00 00 00 00 00 03 32 11 62 00 ff ff 00 05 \
3050 00 00 00 4c 00 03 00 00 00 00 00 00 00 00 00 00 \
3051 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
3052 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
3053 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
3054 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
3055 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
3056 00 00 12 02 09 e4 00 00 14 02 00 00 00 00 00 00 \
3057 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
3058 33 f9 aa 00 ff ff 00 05 00 00 00 4c 00 05 00 00 \
3059 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
3060 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
3061 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
3062 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
3063 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
3064 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
3065 14 02 09 e5 00 00 00 00 00 00 00 08 00 03 00 00 \
3066 00 88 00 00 00 00 00 04 2d 0f a5 00 ff ff 00 05 \
3067 00 00 00 4c 00 01 00 00 00 00 00 00 00 00 00 00 \
3068 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
3069 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
3070 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
3071 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
3072 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
3073 00 00 12 02 09 e3 00 00 14 02 00 00 00 00 00 00 \
3074 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 02 \
3075 34 73 bc 00 ff ff 00 05 00 0a 00 4c 00 03 00 03 \
3076 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
3077 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
3078 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
3079 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
3080 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
3081 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e5 00 00 \
3082 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
3083 00 88 00 00 00 00 00 05 28 0d e8 00 ff ff 00 05 \
3084 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
3085 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
3086 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
3087 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
3088 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
3089 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
3090 00 00 12 02 09 e2 00 00 14 02 00 00 00 00 00 00 \
3091 00 00 00 08 00 01 00 00 00 88 00 00 00 00 00 01 \
3092 02 62 5a 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
3093 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
3094 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
3095 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
3096 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
3097 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
3098 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
3099 14 02 09 e7 00 00 00 00 00 00 00 08 00 03 00 00 \
3100 00 88 00 00 00 00 00 01 38 be 5e 00 ff ff 00 05 \
3101 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
3102 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
3103 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
3104 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
3105 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
3106 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
3107 00 00 12 02 00 00 00 00 14 02 09 e6 00 00 00 00 \
3108 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 04 \
3109 27 d0 df 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
3110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
3111 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
3112 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
3113 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
3114 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
3115 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
3116 14 02 09 e3 00 00 00 00 00 00 00 08 00 03 00 00 \
3117 00 88 00 00 00 00 00 03 2c d2 9c 00 ff ff 00 05 \
3118 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
3119 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
3120 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
3121 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
3122 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
3123 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
3124 00 00 12 02 00 00 00 00 14 02 09 e4 00 00 00 00 \
3125 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
3126 0a 40 83 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
3127 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
3128 00 00 00 00 00 00 00 3c 00 00 00 02 00 03 00 00 \
3129 02 06 50 54 00 00 00 06 00 00 04 06 50 54 00 00 \
3130 00 05 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
3131 0a 01 00 00 00 0e 04 c0 a8 00 01 00 00 10 04 c0 \
3132 a8 00 02 00 00 0c 01 06 00 00 12 02 09 e8 00 00 \
3133 14 02 00 00 00 00 00 00 00 00 00 08 00 01 00 00 \
3134 00 88 00 00 00 00 00 05 25 31 7c 00 ff ff 00 05 \
3135 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
3136 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
3137 00 00 00 02 00 01 00 00 02 06 50 54 00 00 00 05 \
3138 00 00 04 06 50 54 00 00 00 06 00 00 06 02 08 00 \
3139 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
3140 a8 00 02 00 00 10 04 c0 a8 00 01 00 00 0c 01 06 \
3141 00 00 12 02 00 00 00 00 14 02 09 e2 00 00 00 00 \
3142 00 00 00 08 00 03 00 00 00 88 00 00 00 00 00 00 \
3143 04 c4 b4 00 ff ff 00 05 00 00 00 4c 00 00 00 00 \
3144 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 \
3145 00 00 00 00 00 00 00 3c 00 00 00 02 00 01 00 00 \
3146 02 06 50 54 00 00 00 05 00 00 04 06 50 54 00 00 \
3147 00 06 00 00 06 02 08 00 00 00 08 02 00 00 00 00 \
3148 0a 01 00 00 00 0e 04 c0 a8 00 02 00 00 10 04 c0 \
3149 a8 00 01 00 00 0c 01 06 00 00 12 02 00 00 00 00 \
3150 14 02 09 e8 00 00 00 00 00 00 00 08 00 03 00 00 \
3151 00 88 00 00 00 00 00 01 39 38 70 00 ff ff 00 05 \
3152 00 00 00 4c 00 00 00 00 00 00 00 00 00 00 00 00 \
3153 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 3c \
3154 00 00 00 02 00 03 00 00 02 06 50 54 00 00 00 06 \
3155 00 00 04 06 50 54 00 00 00 05 00 00 06 02 08 00 \
3156 00 00 08 02 00 00 00 00 0a 01 00 00 00 0e 04 c0 \
3157 a8 00 01 00 00 10 04 c0 a8 00 02 00 00 0c 01 06 \
3158 00 00 12 02 09 e6 00 00 14 02 00 00 00 00 00 00 \
3159 00 00 00 08 00 01 00 00 00 60 00 00 00 00 00 e4 \
3160 2e 7d db 00 80 00 00 00 00 00 00 14 00 00 00 00 \
3161 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
3162 00 00 00 00 00 00 00 00 00 01 20 08 00 00 00 00 \
3163 00 00 01 c8 00 01 00 04 00 00 00 7b 00 00 00 00 \
3164 ff ff 00 18 00 00 23 20 00 07 00 1f 00 01 00 04 \
3165 00 00 00 00 00 00 00 05 \
3166 00 30 01 00 00 00 0e 10 00 07 a1 20 80 00 00 00 \
3167 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 \
3168 00 00 00 00 00 00 00 64 00 00 00 00 00 00 19 00 \
3169 "], [0],
3170 [[NXST_FLOW reply (xid=0x4):
3171  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
3172  cookie=0x0, duration=3.840s, 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
3173  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
3174  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
3175  cookie=0x0, duration=2.880s, 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
3176  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
3177  cookie=0x0, duration=1.040s, 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
3178  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
3179  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
3180  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
3181  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
3182  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
3183  cookie=0x0, duration=0.080s, 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
3184  cookie=0x0, duration=1.960s, 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
3185  cookie=0x0, duration=228.780s, table=0, n_packets=0, n_bytes=0, reg0=0x7b,tun_id=0x1c8 actions=load:0x5->NXM_NX_REG0[]
3186  cookie=0x0, duration=3600.0005s, table=1, n_packets=100, n_bytes=6400, actions=drop
3187 ]])
3188 AT_CLEANUP
3189
3190 AT_SETUP([NXST_AGGREGATE request])
3191 AT_KEYWORDS([ofp-print OFPT_STATS_REQUEST])
3192 AT_CHECK([ovs-ofctl ofp-print "\
3193 01 10 00 20 00 00 00 04 ff ff 00 00 00 00 23 20 \
3194 00 00 00 01 00 00 00 00 ff ff 00 00 ff 00 00 00 \
3195 "], [0], [dnl
3196 NXST_AGGREGATE request (xid=0x4): @&t@
3197 ])
3198 AT_CLEANUP
3199
3200 AT_SETUP([NXST_AGGREGATE reply])
3201 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
3202 AT_CHECK([ovs-ofctl ofp-print "\
3203 01 11 00 30 00 00 00 04 ff ff 00 00 00 00 23 20 \
3204 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 07 \
3205 00 00 00 00 00 00 01 a4 00 00 00 07 00 00 00 00 \
3206 "], [0], [dnl
3207 NXST_AGGREGATE reply (xid=0x4): packet_count=7 byte_count=420 flow_count=7
3208 ])
3209 AT_CLEANUP
3210
3211 AT_SETUP([NXST_FLOW_MONITOR request])
3212 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
3213 AT_CHECK([ovs-ofctl ofp-print "\
3214 01 10 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 02 00 00 00 00 \
3215 00 00 40 00 00 3f ff fe 00 00 01 00 00 00 00 00 \
3216 00 00 20 00 00 04 ff ff 00 06 02 00 00 00 00 00 00 00 00 02 00 01 00 00 \
3217 "], [0], [dnl
3218 NXST_FLOW_MONITOR request (xid=0x4):
3219  id=16384 flags=initial,add,delete,modify,actions,own out_port=LOCAL table=1
3220  id=8192 flags=delete table=2 in_port=1
3221 ])
3222 AT_CLEANUP
3223
3224 AT_SETUP([NXST_FLOW_MONITOR reply])
3225 AT_KEYWORDS([ofp-print OFPT_STATS_REPLY])
3226 AT_CHECK([ovs-ofctl ofp-print "\
3227 01 11 00 40 00 00 00 04 ff ff 00 00 00 00 23 20 00 00 00 02 00 00 00 00 \
3228 00 20 00 01 00 05 80 00 00 05 00 10 00 06 01 00 12 34 56 78 9a bc de f0 \
3229 00 00 00 02 00 01 00 00 \
3230 00 08 00 03 00 01 86 a0 \
3231 "], [0], [dnl
3232 NXST_FLOW_MONITOR reply (xid=0x4):
3233  event=DELETED reason=eviction table=1 idle_timeout=5 hard_timeout=16 cookie=0x123456789abcdef0 in_port=1
3234  event=ABBREV xid=0x186a0
3235 ])
3236 AT_CLEANUP
3237
3238
3239 AT_SETUP([OFPT_BUNDLE_CONTROL - OPEN_REQUEST])
3240 AT_KEYWORDS([ofp-print])
3241 AT_CHECK([ovs-ofctl ofp-print "\
3242 05 21 00 10 00 00 00 00 \
3243 00 00 00 01 00 00 00 01 \
3244 "], [0], [dnl
3245 OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
3246  bundle_id=0x1 type=OPEN_REQUEST flags=atomic
3247 ])
3248 AT_CLEANUP
3249
3250 AT_SETUP([OFPT_BUNDLE_CONTROL - OPEN_REQUEST])
3251 AT_KEYWORDS([ofp-print])
3252 AT_CHECK([ovs-ofctl ofp-print "\
3253 05 21 00 10 00 00 00 00 \
3254 00 00 00 01 00 00 00 02 \
3255 "], [0], [dnl
3256 OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
3257  bundle_id=0x1 type=OPEN_REQUEST flags=ordered
3258 ])
3259 AT_CLEANUP
3260
3261 AT_SETUP([OFPT_BUNDLE_CONTROL - OPEN_REQUEST])
3262 AT_KEYWORDS([ofp-print])
3263 AT_CHECK([ovs-ofctl ofp-print "\
3264 05 21 00 10 00 00 00 00 \
3265 00 00 00 01 00 00 00 03 \
3266 "], [0], [dnl
3267 OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
3268  bundle_id=0x1 type=OPEN_REQUEST flags=atomic ordered
3269 ])
3270 AT_CLEANUP
3271
3272 AT_SETUP([OFPT_BUNDLE_CONTROL - OPEN_REPLY])
3273 AT_KEYWORDS([ofp-print])
3274 AT_CHECK([ovs-ofctl ofp-print "\
3275 05 21 00 10 00 00 00 00 \
3276 00 00 00 01 00 01 00 01 \
3277 "], [0], [dnl
3278 OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
3279  bundle_id=0x1 type=OPEN_REPLY flags=atomic
3280 ])
3281 AT_CLEANUP
3282
3283 AT_SETUP([OFPT_BUNDLE_CONTROL - CLOSE_REQUEST])
3284 AT_KEYWORDS([ofp-print])
3285 AT_CHECK([ovs-ofctl ofp-print "\
3286 05 21 00 10 00 00 00 00 \
3287 00 00 00 01 00 02 00 01 \
3288 "], [0], [dnl
3289 OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
3290  bundle_id=0x1 type=CLOSE_REQUEST flags=atomic
3291 ])
3292 AT_CLEANUP
3293
3294 AT_SETUP([OFPT_BUNDLE_CONTROL - CLOSE_REPLY])
3295 AT_KEYWORDS([ofp-print])
3296 AT_CHECK([ovs-ofctl ofp-print "\
3297 05 21 00 10 00 00 00 00 \
3298 00 00 00 01 00 03 00 01 \
3299 "], [0], [dnl
3300 OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
3301  bundle_id=0x1 type=CLOSE_REPLY flags=atomic
3302 ])
3303 AT_CLEANUP
3304
3305 AT_SETUP([OFPT_BUNDLE_CONTROL - COMMIT_REQUEST])
3306 AT_KEYWORDS([ofp-print])
3307 AT_CHECK([ovs-ofctl ofp-print "\
3308 05 21 00 10 00 00 00 00 \
3309 00 00 00 01 00 04 00 01 \
3310 "], [0], [dnl
3311 OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
3312  bundle_id=0x1 type=COMMIT_REQUEST flags=atomic
3313 ])
3314 AT_CLEANUP
3315
3316 AT_SETUP([OFPT_BUNDLE_CONTROL - COMMIT_REPLY])
3317 AT_KEYWORDS([ofp-print])
3318 AT_CHECK([ovs-ofctl ofp-print "\
3319 05 21 00 10 00 00 00 00 \
3320 00 00 00 01 00 05 00 01 \
3321 "], [0], [dnl
3322 OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
3323  bundle_id=0x1 type=COMMIT_REPLY flags=atomic
3324 ])
3325 AT_CLEANUP
3326
3327 AT_SETUP([OFPT_BUNDLE_CONTROL - DISCARD_REQUEST])
3328 AT_KEYWORDS([ofp-print])
3329 AT_CHECK([ovs-ofctl ofp-print "\
3330 05 21 00 10 00 00 00 00 \
3331 00 00 00 01 00 06 00 01 \
3332 "], [0], [dnl
3333 OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
3334  bundle_id=0x1 type=DISCARD_REQUEST flags=atomic
3335 ])
3336 AT_CLEANUP
3337
3338 AT_SETUP([OFPT_BUNDLE_CONTROL - DISCARD_REPLY])
3339 AT_KEYWORDS([ofp-print])
3340 AT_CHECK([ovs-ofctl ofp-print "\
3341 05 21 00 10 00 00 00 00 \
3342 00 00 00 01 00 07 00 01 \
3343 "], [0], [dnl
3344 OFPT_BUNDLE_CONTROL (OF1.4) (xid=0x0):
3345  bundle_id=0x1 type=DISCARD_REPLY flags=atomic
3346 ])
3347 AT_CLEANUP
3348
3349 AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - verify xid])
3350 AT_KEYWORDS([ofp-print])
3351 AT_CHECK([ovs-ofctl ofp-print "\
3352 05 22 00 20 00 00 00 00 00 00 00 01 00 00 00 01 \
3353 05 00 00 08 00 00 00 01 00 00 00 00 00 00 00 00 \
3354 "], [0], [dnl
3355 OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x0): ***decode error: OFPBFC_MSG_BAD_XID***
3356 ])
3357 AT_CLEANUP
3358
3359 AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - reject OFPT_HELLO])
3360 AT_KEYWORDS([ofp-print])
3361 AT_CHECK([ovs-ofctl '-vPATTERN:console:%c|%p|%m' ofp-print "\
3362 05 22 00 20 00 00 00 00 00 00 00 01 00 00 00 01 \
3363 05 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 \
3364 "], [0], [dnl
3365 OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x0): ***decode error: OFPBFC_MSG_UNSUP***
3366 ], [dnl
3367 ofp_util|WARN|OFPT_HELLO message not allowed inside OFPT14_BUNDLE_ADD_MESSAGE
3368 ])
3369 AT_CLEANUP
3370
3371 AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - FLOW_MOD])
3372 AT_KEYWORDS([ofp-print])
3373 AT_CHECK([ovs-ofctl ofp-print "\
3374 05 22 00 a0 00 00 00 02 00 00 00 01 00 00 00 01 \
3375 05 0e 00 90 00 00 00 02 00 00 00 00 00 00 00 00 \
3376 00 00 00 00 00 00 00 00 01 00 00 00 00 00 ff ff \
3377 ff ff ff ff ff ff ff ff ff ff ff ff 00 00 00 00 \
3378 00 01 00 42 80 00 00 04 00 00 00 01 80 00 08 06 \
3379 50 54 00 00 00 06 80 00 06 06 50 54 00 00 00 05 \
3380 80 00 0a 02 08 06 80 00 0c 02 00 00 80 00 2a 02 \
3381 00 02 80 00 2c 04 c0 a8 00 02 80 00 2e 04 c0 a8 \
3382 00 01 00 00 00 00 00 00 00 04 00 18 00 00 00 00 \
3383 00 00 00 10 00 00 00 03 00 00 00 00 00 00 00 00 \
3384 "], [0], [dnl
3385 OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x2):
3386  bundle_id=0x1 flags=atomic
3387 OFPT_FLOW_MOD (OF1.4) (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
3388 ])
3389 AT_CLEANUP
3390
3391 AT_SETUP([OFPT_BUNDLE_ADD_MESSAGE - PORT_MOD])
3392 AT_KEYWORDS([ofp-print])
3393 AT_CHECK([ovs-ofctl ofp-print "\
3394 05 22 00 38 00 00 00 03 00 00 00 01 00 00 00 01 \
3395 05 10 00 28 00 00 00 03 00 00 00 03 00 00 00 00 \
3396 50 54 00 00 00 01 00 00 00 00 00 01 00 00 00 01 \
3397 00 00 00 08 00 00 00 01
3398 "], [0], [dnl
3399 OFPT_BUNDLE_ADD_MESSAGE (OF1.4) (xid=0x3):
3400  bundle_id=0x1 flags=atomic
3401 OFPT_PORT_MOD (OF1.4) (xid=0x3): port: 3: addr:50:54:00:00:00:01
3402      config: PORT_DOWN
3403      mask:   PORT_DOWN
3404      advertise: 10MB-HD
3405 ])
3406 AT_CLEANUP