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