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