backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of14 / match / 12_IPV4_DST_Mask.json
1
2 [
3     "match: 12_IPV4_DST (Mask)",
4     {
5         "description":"ethernet/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'",
6         "prerequisite":[
7             {
8                 "OFPFlowMod":{
9                     "table_id":0,
10                     "match":{
11                         "OFPMatch":{
12                             "oxm_fields":[
13                                 {
14                                     "OXMTlv":{
15                                         "field":"eth_type",
16                                         "value":2048
17                                     }
18                                 },
19                                 {
20                                     "OXMTlv":{
21                                         "field":"ipv4_dst",
22                                         "mask":"255.255.0.255",
23                                         "value":"192.168.0.20"
24                                     }
25                                 }
26                             ]
27                         }
28                     },
29                     "instructions":[
30                         {
31                             "OFPInstructionActions":{
32                                 "actions":[
33                                     {
34                                         "OFPActionOutput":{
35                                             "port":2
36                                         }
37                                     }
38                                 ],
39                                 "type":4
40                             }
41                         }
42                     ]
43                 }
44             }
45         ],
46         "tests":[
47             {
48                 "ingress":[
49                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
50                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
51                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
52                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
53                 ],
54                 "egress":[
55                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
56                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
57                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
58                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
59                 ]
60             }
61         ]
62     },
63     {
64         "description":"ethernet/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'",
65         "prerequisite":[
66             {
67                 "OFPFlowMod":{
68                     "table_id":0,
69                     "match":{
70                         "OFPMatch":{
71                             "oxm_fields":[
72                                 {
73                                     "OXMTlv":{
74                                         "field":"eth_type",
75                                         "value":2048
76                                     }
77                                 },
78                                 {
79                                     "OXMTlv":{
80                                         "field":"ipv4_dst",
81                                         "mask":"255.255.0.255",
82                                         "value":"192.168.0.20"
83                                     }
84                                 }
85                             ]
86                         }
87                     },
88                     "instructions":[
89                         {
90                             "OFPInstructionActions":{
91                                 "actions":[
92                                     {
93                                         "OFPActionOutput":{
94                                             "max_len":65535,
95                                             "port":4294967293
96                                         }
97                                     }
98                                 ],
99                                 "type":4
100                             }
101                         }
102                     ]
103                 }
104             }
105         ],
106         "tests":[
107             {
108                 "ingress":[
109                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
110                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
111                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
112                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
113                 ],
114                 "PACKET_IN":[
115                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
116                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
117                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
118                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
119                 ]
120             }
121         ]
122     },
123     {
124         "description":"ethernet/ipv4(dst='10.10.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'",
125         "prerequisite":[
126             {
127                 "OFPFlowMod":{
128                     "table_id":0,
129                     "match":{
130                         "OFPMatch":{
131                             "oxm_fields":[
132                                 {
133                                     "OXMTlv":{
134                                         "field":"eth_type",
135                                         "value":2048
136                                     }
137                                 },
138                                 {
139                                     "OXMTlv":{
140                                         "field":"ipv4_dst",
141                                         "mask":"255.255.0.255",
142                                         "value":"192.168.0.20"
143                                     }
144                                 }
145                             ]
146                         }
147                     },
148                     "instructions":[
149                         {
150                             "OFPInstructionActions":{
151                                 "actions":[
152                                     {
153                                         "OFPActionOutput":{
154                                             "port":2
155                                         }
156                                     }
157                                 ],
158                                 "type":4
159                             }
160                         }
161                     ]
162                 }
163             }
164         ],
165         "tests":[
166             {
167                 "ingress":[
168                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)",
169                     "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)",
170                     "tcp(dst_port=6789, option=bytes(b'\\x01' * 4), src_port=12345)",
171                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
172                 ],
173                 "table-miss":[
174                     0
175                 ]
176             }
177         ]
178     },
179     {
180         "description":"ethernet/vlan/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'",
181         "prerequisite":[
182             {
183                 "OFPFlowMod":{
184                     "table_id":0,
185                     "match":{
186                         "OFPMatch":{
187                             "oxm_fields":[
188                                 {
189                                     "OXMTlv":{
190                                         "field":"eth_type",
191                                         "value":2048
192                                     }
193                                 },
194                                 {
195                                     "OXMTlv":{
196                                         "field":"ipv4_dst",
197                                         "mask":"255.255.0.255",
198                                         "value":"192.168.0.20"
199                                     }
200                                 }
201                             ]
202                         }
203                     },
204                     "instructions":[
205                         {
206                             "OFPInstructionActions":{
207                                 "actions":[
208                                     {
209                                         "OFPActionOutput":{
210                                             "port":2
211                                         }
212                                     }
213                                 ],
214                                 "type":4
215                             }
216                         }
217                     ]
218                 }
219             }
220         ],
221         "tests":[
222             {
223                 "ingress":[
224                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
225                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
226                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
227                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
228                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
229                 ],
230                 "egress":[
231                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
232                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
233                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
234                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
235                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
236                 ]
237             }
238         ]
239     },
240     {
241         "description":"ethernet/vlan/ipv4(dst='192.168.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'",
242         "prerequisite":[
243             {
244                 "OFPFlowMod":{
245                     "table_id":0,
246                     "match":{
247                         "OFPMatch":{
248                             "oxm_fields":[
249                                 {
250                                     "OXMTlv":{
251                                         "field":"eth_type",
252                                         "value":2048
253                                     }
254                                 },
255                                 {
256                                     "OXMTlv":{
257                                         "field":"ipv4_dst",
258                                         "mask":"255.255.0.255",
259                                         "value":"192.168.0.20"
260                                     }
261                                 }
262                             ]
263                         }
264                     },
265                     "instructions":[
266                         {
267                             "OFPInstructionActions":{
268                                 "actions":[
269                                     {
270                                         "OFPActionOutput":{
271                                             "max_len":65535,
272                                             "port":4294967293
273                                         }
274                                     }
275                                 ],
276                                 "type":4
277                             }
278                         }
279                     ]
280                 }
281             }
282         ],
283         "tests":[
284             {
285                 "ingress":[
286                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
287                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
288                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
289                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
290                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
291                 ],
292                 "PACKET_IN":[
293                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
294                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
295                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
296                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
297                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
298                 ]
299             }
300         ]
301     },
302     {
303         "description":"ethernet/vlan/ipv4(dst='10.10.20.20')/tcp-->'ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'",
304         "prerequisite":[
305             {
306                 "OFPFlowMod":{
307                     "table_id":0,
308                     "match":{
309                         "OFPMatch":{
310                             "oxm_fields":[
311                                 {
312                                     "OXMTlv":{
313                                         "field":"eth_type",
314                                         "value":2048
315                                     }
316                                 },
317                                 {
318                                     "OXMTlv":{
319                                         "field":"ipv4_dst",
320                                         "mask":"255.255.0.255",
321                                         "value":"192.168.0.20"
322                                     }
323                                 }
324                             ]
325                         }
326                     },
327                     "instructions":[
328                         {
329                             "OFPInstructionActions":{
330                                 "actions":[
331                                     {
332                                         "OFPActionOutput":{
333                                             "port":2
334                                         }
335                                     }
336                                 ],
337                                 "type":4
338                             }
339                         }
340                     ]
341                 }
342             }
343         ],
344         "tests":[
345             {
346                 "ingress":[
347                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=33024)",
348                     "vlan(pcp=5, cfi=0, vid=203, ethertype=2048)",
349                     "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)",
350                     "tcp(dst_port=6789, option=bytes(b'\\x01' * 4), src_port=12345)",
351                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
352                 ],
353                 "table-miss":[
354                     0
355                 ]
356             }
357         ]
358     },
359     {
360         "description":"ethernet/mpls/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'",
361         "prerequisite":[
362             {
363                 "OFPFlowMod":{
364                     "table_id":0,
365                     "match":{
366                         "OFPMatch":{
367                             "oxm_fields":[
368                                 {
369                                     "OXMTlv":{
370                                         "field":"eth_type",
371                                         "value":34887
372                                     }
373                                 }
374                             ]
375                         }
376                     },
377                     "instructions":[
378                         {
379                             "OFPInstructionActions":{
380                                 "actions":[
381                                     {
382                                         "OFPActionPopMpls":{
383                                             "ethertype":2048
384                                         }
385                                     }
386                                 ],
387                                 "type":4
388                             }
389                         },
390                         {
391                             "OFPInstructionGotoTable":{
392                                 "table_id":1
393                             }
394                         }
395                     ]
396                 }
397             },
398             {
399                 "OFPFlowMod":{
400                     "table_id":1,
401                     "match":{
402                         "OFPMatch":{
403                             "oxm_fields":[
404                                 {
405                                     "OXMTlv":{
406                                         "field":"eth_type",
407                                         "value":2048
408                                     }
409                                 },
410                                 {
411                                     "OXMTlv":{
412                                         "field":"ipv4_dst",
413                                         "mask":"255.255.0.255",
414                                         "value":"192.168.0.20"
415                                     }
416                                 }
417                             ]
418                         }
419                     },
420                     "instructions":[
421                         {
422                             "OFPInstructionActions":{
423                                 "actions":[
424                                     {
425                                         "OFPActionOutput":{
426                                             "port":2
427                                         }
428                                     }
429                                 ],
430                                 "type":4
431                             }
432                         }
433                     ]
434                 }
435             }
436         ],
437         "tests":[
438             {
439                 "ingress":[
440                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)",
441                     "mpls(bsb=1, label=100, exp=3, ttl=64)",
442                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
443                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
444                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
445                 ],
446                 "egress":[
447                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
448                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
449                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
450                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
451                 ]
452             }
453         ]
454     },
455     {
456         "description":"ethernet/mpls/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'",
457         "prerequisite":[
458             {
459                 "OFPFlowMod":{
460                     "table_id":0,
461                     "match":{
462                         "OFPMatch":{
463                             "oxm_fields":[
464                                 {
465                                     "OXMTlv":{
466                                         "field":"eth_type",
467                                         "value":34887
468                                     }
469                                 }
470                             ]
471                         }
472                     },
473                     "instructions":[
474                         {
475                             "OFPInstructionActions":{
476                                 "actions":[
477                                     {
478                                         "OFPActionPopMpls":{
479                                             "ethertype":2048
480                                         }
481                                     }
482                                 ],
483                                 "type":4
484                             }
485                         },
486                         {
487                             "OFPInstructionGotoTable":{
488                                 "table_id":1
489                             }
490                         }
491                     ]
492                 }
493             },
494             {
495                 "OFPFlowMod":{
496                     "table_id":1,
497                     "match":{
498                         "OFPMatch":{
499                             "oxm_fields":[
500                                 {
501                                     "OXMTlv":{
502                                         "field":"eth_type",
503                                         "value":2048
504                                     }
505                                 },
506                                 {
507                                     "OXMTlv":{
508                                         "field":"ipv4_dst",
509                                         "mask":"255.255.0.255",
510                                         "value":"192.168.0.20"
511                                     }
512                                 }
513                             ]
514                         }
515                     },
516                     "instructions":[
517                         {
518                             "OFPInstructionActions":{
519                                 "actions":[
520                                     {
521                                         "OFPActionOutput":{
522                                             "max_len":65535,
523                                             "port":4294967293
524                                         }
525                                     }
526                                 ],
527                                 "type":4
528                             }
529                         }
530                     ]
531                 }
532             }
533         ],
534         "tests":[
535             {
536                 "ingress":[
537                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)",
538                     "mpls(bsb=1, label=100, exp=3, ttl=64)",
539                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
540                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
541                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
542                 ],
543                 "PACKET_IN":[
544                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
545                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
546                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
547                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
548                 ]
549             }
550         ]
551     },
552     {
553         "description":"ethernet/mpls/ipv4(dst='10.10.20.20')/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'",
554         "prerequisite":[
555             {
556                 "OFPFlowMod":{
557                     "table_id":0,
558                     "match":{
559                         "OFPMatch":{
560                             "oxm_fields":[
561                                 {
562                                     "OXMTlv":{
563                                         "field":"eth_type",
564                                         "value":34887
565                                     }
566                                 }
567                             ]
568                         }
569                     },
570                     "instructions":[
571                         {
572                             "OFPInstructionActions":{
573                                 "actions":[
574                                     {
575                                         "OFPActionPopMpls":{
576                                             "ethertype":2048
577                                         }
578                                     }
579                                 ],
580                                 "type":4
581                             }
582                         },
583                         {
584                             "OFPInstructionGotoTable":{
585                                 "table_id":1
586                             }
587                         }
588                     ]
589                 }
590             },
591             {
592                 "OFPFlowMod":{
593                     "table_id":1,
594                     "match":{
595                         "OFPMatch":{
596                             "oxm_fields":[
597                                 {
598                                     "OXMTlv":{
599                                         "field":"eth_type",
600                                         "value":2048
601                                     }
602                                 },
603                                 {
604                                     "OXMTlv":{
605                                         "field":"ipv4_dst",
606                                         "mask":"255.255.0.255",
607                                         "value":"192.168.0.20"
608                                     }
609                                 }
610                             ]
611                         }
612                     },
613                     "instructions":[
614                         {
615                             "OFPInstructionActions":{
616                                 "actions":[
617                                     {
618                                         "OFPActionOutput":{
619                                             "port":2
620                                         }
621                                     }
622                                 ],
623                                 "type":4
624                             }
625                         }
626                     ]
627                 }
628             }
629         ],
630         "tests":[
631             {
632                 "ingress":[
633                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=34887)",
634                     "mpls(bsb=1, label=203, exp=5, ttl=127)",
635                     "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)",
636                     "tcp(dst_port=6789, option=bytes(b'\\x01' * 4), src_port=12345)",
637                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
638                 ],
639                 "table-miss":[
640                     1
641                 ]
642             }
643         ]
644     },
645     {
646         "description":"ethernet/itag/ethernet/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'",
647         "prerequisite":[
648             {
649                 "OFPFlowMod":{
650                     "table_id":0,
651                     "match":{
652                         "OFPMatch":{
653                             "oxm_fields":[
654                                 {
655                                     "OXMTlv":{
656                                         "field":"eth_type",
657                                         "value":35047
658                                     }
659                                 }
660                             ]
661                         }
662                     },
663                     "instructions":[
664                         {
665                             "OFPInstructionActions":{
666                                 "actions":[
667                                     {
668                                         "OFPActionPopPbb":{}
669                                     }
670                                 ],
671                                 "type":4
672                             }
673                         },
674                         {
675                             "OFPInstructionGotoTable":{
676                                 "table_id":1
677                             }
678                         }
679                     ]
680                 }
681             },
682             {
683                 "OFPFlowMod":{
684                     "table_id":1,
685                     "match":{
686                         "OFPMatch":{
687                             "oxm_fields":[
688                                 {
689                                     "OXMTlv":{
690                                         "field":"eth_type",
691                                         "value":2048
692                                     }
693                                 },
694                                 {
695                                     "OXMTlv":{
696                                         "field":"ipv4_dst",
697                                         "mask":"255.255.0.255",
698                                         "value":"192.168.0.20"
699                                     }
700                                 }
701                             ]
702                         }
703                     },
704                     "instructions":[
705                         {
706                             "OFPInstructionActions":{
707                                 "actions":[
708                                     {
709                                         "OFPActionOutput":{
710                                             "port":2
711                                         }
712                                     }
713                                 ],
714                                 "type":4
715                             }
716                         }
717                     ]
718                 }
719             }
720         ],
721         "tests":[
722             {
723                 "ingress":[
724                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)",
725                     "itag(sid=100)",
726                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
727                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
728                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
729                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
730                 ],
731                 "egress":[
732                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
733                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
734                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
735                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
736                 ]
737             }
738         ]
739     },
740     {
741         "description":"ethernet/itag/ethernet/ipv4(dst='192.168.20.20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:CONTROLLER'",
742         "prerequisite":[
743             {
744                 "OFPFlowMod":{
745                     "table_id":0,
746                     "match":{
747                         "OFPMatch":{
748                             "oxm_fields":[
749                                 {
750                                     "OXMTlv":{
751                                         "field":"eth_type",
752                                         "value":35047
753                                     }
754                                 }
755                             ]
756                         }
757                     },
758                     "instructions":[
759                         {
760                             "OFPInstructionActions":{
761                                 "actions":[
762                                     {
763                                         "OFPActionPopPbb":{}
764                                     }
765                                 ],
766                                 "type":4
767                             }
768                         },
769                         {
770                             "OFPInstructionGotoTable":{
771                                 "table_id":1
772                             }
773                         }
774                     ]
775                 }
776             },
777             {
778                 "OFPFlowMod":{
779                     "table_id":1,
780                     "match":{
781                         "OFPMatch":{
782                             "oxm_fields":[
783                                 {
784                                     "OXMTlv":{
785                                         "field":"eth_type",
786                                         "value":2048
787                                     }
788                                 },
789                                 {
790                                     "OXMTlv":{
791                                         "field":"ipv4_dst",
792                                         "mask":"255.255.0.255",
793                                         "value":"192.168.0.20"
794                                     }
795                                 }
796                             ]
797                         }
798                     },
799                     "instructions":[
800                         {
801                             "OFPInstructionActions":{
802                                 "actions":[
803                                     {
804                                         "OFPActionOutput":{
805                                             "max_len":65535,
806                                             "port":4294967293
807                                         }
808                                     }
809                                 ],
810                                 "type":4
811                             }
812                         }
813                     ]
814                 }
815             }
816         ],
817         "tests":[
818             {
819                 "ingress":[
820                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)",
821                     "itag(sid=100)",
822                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
823                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
824                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
825                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
826                 ],
827                 "PACKET_IN":[
828                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
829                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
830                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
831                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
832                 ]
833             }
834         ]
835     },
836     {
837         "description":"ethernet/itag/ethernet/ipv4(dst='10.10.20.20')/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,ipv4_dst=192.168.0.20(mask=255.255.0.255),actions=output:2'",
838         "prerequisite":[
839             {
840                 "OFPFlowMod":{
841                     "table_id":0,
842                     "match":{
843                         "OFPMatch":{
844                             "oxm_fields":[
845                                 {
846                                     "OXMTlv":{
847                                         "field":"eth_type",
848                                         "value":35047
849                                     }
850                                 }
851                             ]
852                         }
853                     },
854                     "instructions":[
855                         {
856                             "OFPInstructionActions":{
857                                 "actions":[
858                                     {
859                                         "OFPActionPopPbb":{}
860                                     }
861                                 ],
862                                 "type":4
863                             }
864                         },
865                         {
866                             "OFPInstructionGotoTable":{
867                                 "table_id":1
868                             }
869                         }
870                     ]
871                 }
872             },
873             {
874                 "OFPFlowMod":{
875                     "table_id":1,
876                     "match":{
877                         "OFPMatch":{
878                             "oxm_fields":[
879                                 {
880                                     "OXMTlv":{
881                                         "field":"eth_type",
882                                         "value":2048
883                                     }
884                                 },
885                                 {
886                                     "OXMTlv":{
887                                         "field":"ipv4_dst",
888                                         "mask":"255.255.0.255",
889                                         "value":"192.168.0.20"
890                                     }
891                                 }
892                             ]
893                         }
894                     },
895                     "instructions":[
896                         {
897                             "OFPInstructionActions":{
898                                 "actions":[
899                                     {
900                                         "OFPActionOutput":{
901                                             "port":2
902                                         }
903                                     }
904                                 ],
905                                 "type":4
906                             }
907                         }
908                     ]
909                 }
910             }
911         ],
912         "tests":[
913             {
914                 "ingress":[
915                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=35047)",
916                     "itag(sid=203)",
917                     "ethernet(dst='ba:bb:bb:bb:bb:bb', src='aa:aa:aa:aa:aa:aa', ethertype=2048)",
918                     "ipv4(tos=65, proto=6, src='10.10.10.10', dst='10.10.20.20', ttl=127)",
919                     "tcp(dst_port=6789, option=bytes(b'\\x01' * 4), src_port=12345)",
920                     "b'\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'"
921                 ],
922                 "table-miss":[
923                     1
924                 ]
925             }
926         ]
927     }
928 ]