backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of14 / action / 25_SET_FIELD / 18_SCTP_DST_IPv4.json
1 [
2     "action: set_field: 18_SCTP_DST (IPv4)",
3     {
4         "description": "ethernet/ipv4/sctp(dst_port=2222)-->'sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
5         "prerequisite":[
6             {
7                 "OFPFlowMod":{
8                     "table_id":0,
9                     "match":{
10                         "OFPMatch":{
11                             "oxm_fields":[
12                                 {
13                                     "OXMTlv":{
14                                         "field":"eth_type",
15                                         "value":2048
16                                     }
17                                 },
18                                 {
19                                     "OXMTlv":{
20                                         "field":"ip_proto",
21                                         "value":132
22                                     }
23                                 },
24                                 {
25                                     "OXMTlv":{
26                                         "field":"sctp_dst",
27                                         "value":2222
28                                     }
29                                 }
30                             ]
31                         }
32                     },
33                     "instructions":[
34                         {
35                             "OFPInstructionActions":{
36                                 "actions":[
37                                     {
38                                         "OFPActionSetField":{
39                                             "field":{
40                                                 "OXMTlv":{
41                                                     "field":"sctp_dst",
42                                                     "value":6789
43                                                 }
44                                             }
45                                         }
46                                     },
47                                     {
48                                         "OFPActionOutput":{
49                                             "port":2
50                                         }
51                                     }
52                                 ],
53                                 "type":4
54                             }
55                         }
56                     ]
57                 }
58             }
59         ],
60         "tests":[
61             {
62                 "ingress":[
63                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
64                     "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
65                     "sctp(chunks=[chunk_data(payload_data=b'\\x01\\x23\\x45\\x67\\x89\\xab\\xcd\\xef')], dst_port=2222, src_port=11111)"
66                 ],
67                 "egress":[
68                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
69                     "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
70                     "sctp(chunks=[chunk_data(payload_data=b'\\x01\\x23\\x45\\x67\\x89\\xab\\xcd\\xef')], dst_port=6789, src_port=11111)"
71                 ]
72             }
73         ]
74     },
75     {
76         "description": "ethernet/vlan/ipv4/sctp(dst_port=2222)-->'sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
77         "prerequisite":[
78             {
79                 "OFPFlowMod":{
80                     "table_id":0,
81                     "match":{
82                         "OFPMatch":{
83                             "oxm_fields":[
84                                 {
85                                     "OXMTlv":{
86                                         "field":"eth_type",
87                                         "value":2048
88                                     }
89                                 },
90                                 {
91                                     "OXMTlv":{
92                                         "field":"ip_proto",
93                                         "value":132
94                                     }
95                                 },
96                                 {
97                                     "OXMTlv":{
98                                         "field":"sctp_dst",
99                                         "value":2222
100                                     }
101                                 }
102                             ]
103                         }
104                     },
105                     "instructions":[
106                         {
107                             "OFPInstructionActions":{
108                                 "actions":[
109                                     {
110                                         "OFPActionSetField":{
111                                             "field":{
112                                                 "OXMTlv":{
113                                                     "field":"sctp_dst",
114                                                     "value":6789
115                                                 }
116                                             }
117                                         }
118                                     },
119                                     {
120                                         "OFPActionOutput":{
121                                             "port":2
122                                         }
123                                     }
124                                 ],
125                                 "type":4
126                             }
127                         }
128                     ]
129                 }
130             }
131         ],
132         "tests":[
133             {
134                 "ingress":[
135                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
136                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
137                     "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
138                     "sctp(chunks=[chunk_data(payload_data=b'\\x01\\x23\\x45\\x67\\x89\\xab\\xcd\\xef')], dst_port=2222, src_port=11111)"
139                 ],
140                 "egress":[
141                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
142                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
143                     "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
144                     "sctp(chunks=[chunk_data(payload_data=b'\\x01\\x23\\x45\\x67\\x89\\xab\\xcd\\xef')], dst_port=6789, src_port=11111)"
145                 ]
146             }
147         ]
148     },
149     {
150         "description": "ethernet/mpls/ipv4/sctp(dst_port=2222)-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
151         "prerequisite":[
152             {
153                 "OFPFlowMod":{
154                     "table_id":0,
155                     "match":{
156                         "OFPMatch":{
157                             "oxm_fields":[
158                                 {
159                                     "OXMTlv":{
160                                         "field":"eth_type",
161                                         "value":34887
162                                     }
163                                 }
164                             ]
165                         }
166                     },
167                     "instructions":[
168                         {
169                             "OFPInstructionActions":{
170                                 "actions":[
171                                     {
172                                         "OFPActionPopMpls":{
173                                             "ethertype":2048
174                                         }
175                                     }
176                                 ],
177                                 "type":4
178                             }
179                         },
180                         {
181                             "OFPInstructionGotoTable":{
182                                 "table_id":1
183                             }
184                         }
185                     ]
186                 }
187             },
188             {
189                 "OFPFlowMod":{
190                     "table_id":1,
191                     "match":{
192                         "OFPMatch":{
193                             "oxm_fields":[
194                                 {
195                                     "OXMTlv":{
196                                         "field":"eth_type",
197                                         "value":2048
198                                     }
199                                 },
200                                 {
201                                     "OXMTlv":{
202                                         "field":"ip_proto",
203                                         "value":132
204                                     }
205                                 },
206                                 {
207                                     "OXMTlv":{
208                                         "field":"sctp_dst",
209                                         "value":2222
210                                     }
211                                 }
212                             ]
213                         }
214                     },
215                     "instructions":[
216                         {
217                             "OFPInstructionActions":{
218                                 "actions":[
219                                     {
220                                         "OFPActionSetField":{
221                                             "field":{
222                                                 "OXMTlv":{
223                                                     "field":"sctp_dst",
224                                                     "value":6789
225                                                 }
226                                             }
227                                         }
228                                     },
229                                     {
230                                         "OFPActionOutput":{
231                                             "port":2
232                                         }
233                                     }
234                                 ],
235                                 "type":4
236                             }
237                         }
238                     ]
239                 }
240             }
241         ],
242         "tests":[
243             {
244                 "ingress":[
245                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)",
246                     "mpls(bsb=1, label=100, exp=3, ttl=64)",
247                     "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
248                     "sctp(chunks=[chunk_data(payload_data=b'\\x01\\x23\\x45\\x67\\x89\\xab\\xcd\\xef')], dst_port=2222, src_port=11111)"
249                 ],
250                 "egress":[
251                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
252                     "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
253                     "sctp(chunks=[chunk_data(payload_data=b'\\x01\\x23\\x45\\x67\\x89\\xab\\xcd\\xef')], dst_port=6789, src_port=11111)"
254                 ]
255             }
256         ]
257     },
258     {
259         "description": "ethernet/itag/ethernet/ipv4/sctp(dst_port=2222)-->'actions=pop_pbb,goto_table:1','table_id:1,sctp_dst=2222,actions=set_field:6789->sctp_dst,output:2'",
260         "prerequisite":[
261             {
262                 "OFPFlowMod":{
263                     "table_id":0,
264                     "match":{
265                         "OFPMatch":{
266                             "oxm_fields":[
267                                 {
268                                     "OXMTlv":{
269                                         "field":"eth_type",
270                                         "value":35047
271                                     }
272                                 }
273                             ]
274                         }
275                     },
276                     "instructions":[
277                         {
278                             "OFPInstructionActions":{
279                                 "actions":[
280                                     {
281                                         "OFPActionPopPbb":{}
282                                     }
283                                 ],
284                                 "type":4
285                             }
286                         },
287                         {
288                             "OFPInstructionGotoTable":{
289                                 "table_id":1
290                             }
291                         }
292                     ]
293                 }
294             },
295             {
296                 "OFPFlowMod":{
297                     "table_id":1,
298                     "match":{
299                         "OFPMatch":{
300                             "oxm_fields":[
301                                 {
302                                     "OXMTlv":{
303                                         "field":"eth_type",
304                                         "value":2048
305                                     }
306                                 },
307                                 {
308                                     "OXMTlv":{
309                                         "field":"ip_proto",
310                                         "value":132
311                                     }
312                                 },
313                                 {
314                                     "OXMTlv":{
315                                         "field":"sctp_dst",
316                                         "value":2222
317                                     }
318                                 }
319                             ]
320                         }
321                     },
322                     "instructions":[
323                         {
324                             "OFPInstructionActions":{
325                                 "actions":[
326                                     {
327                                         "OFPActionSetField":{
328                                             "field":{
329                                                 "OXMTlv":{
330                                                     "field":"sctp_dst",
331                                                     "value":6789
332                                                 }
333                                             }
334                                         }
335                                     },
336                                     {
337                                         "OFPActionOutput":{
338                                             "port":2
339                                         }
340                                     }
341                                 ],
342                                 "type":4
343                             }
344                         }
345                     ]
346                 }
347             }
348         ],
349         "tests":[
350             {
351                 "ingress":[
352                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)",
353                     "itag(sid=100)",
354                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
355                     "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
356                     "sctp(chunks=[chunk_data(payload_data=b'\\x01\\x23\\x45\\x67\\x89\\xab\\xcd\\xef')], dst_port=2222, src_port=11111)"
357                 ],
358                 "egress":[
359                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
360                     "ipv4(tos=32, proto=132, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
361                     "sctp(chunks=[chunk_data(payload_data=b'\\x01\\x23\\x45\\x67\\x89\\xab\\xcd\\xef')], dst_port=6789, src_port=11111)"
362                 ]
363             }
364         ]
365     }
366 ]