backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / switch / of13 / action / 23_SET_NW_TTL_IPv4.json
1 [
2     "action: 23_SET_NW_TTL (IPv4)",
3     {
4         "description": "ethernet/ipv4(ttl=64)/tcp-->'eth_type=0x0800,actions=set_nw_ttl:32,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                         }
20                     },
21                     "instructions":[
22                         {
23                             "OFPInstructionActions":{
24                                 "actions":[
25                                     {
26                                         "OFPActionSetNwTtl":{
27                                             "nw_ttl":32
28                                         }
29                                     },
30                                     {
31                                         "OFPActionOutput":{
32                                             "port":2
33                                         }
34                                     }
35                                 ],
36                                 "type":4
37                             }
38                         }
39                     ]
40                 }
41             }
42         ],
43         "tests":[
44             {
45                 "ingress":[
46                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
47                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
48                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
49                     "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'"
50                 ],
51                 "egress":[
52                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
53                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=32)",
54                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
55                     "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'"
56                 ]
57             }
58         ]
59     },
60     {
61         "description": "ethernet/vlan/ipv4(ttl=64)/tcp-->'eth_type=0x0800,actions=set_nw_ttl:32,output:2'",
62         "prerequisite":[
63             {
64                 "OFPFlowMod":{
65                     "table_id":0,
66                     "match":{
67                         "OFPMatch":{
68                             "oxm_fields":[
69                                 {
70                                     "OXMTlv":{
71                                         "field":"eth_type",
72                                         "value":2048
73                                     }
74                                 }
75                             ]
76                         }
77                     },
78                     "instructions":[
79                         {
80                             "OFPInstructionActions":{
81                                 "actions":[
82                                     {
83                                         "OFPActionSetNwTtl":{
84                                             "nw_ttl":32
85                                         }
86                                     },
87                                     {
88                                         "OFPActionOutput":{
89                                             "port":2
90                                         }
91                                     }
92                                 ],
93                                 "type":4
94                             }
95                         }
96                     ]
97                 }
98             }
99         ],
100         "tests":[
101             {
102                 "ingress":[
103                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
104                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
105                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
106                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
107                     "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'"
108                 ],
109                 "egress":[
110                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=33024)",
111                     "vlan(pcp=3, cfi=0, vid=100, ethertype=2048)",
112                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=32)",
113                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
114                     "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'"
115                 ]
116             }
117         ]
118     },
119     {
120         "description": "ethernet/mpls/ipv4(ttl=64)/tcp-->'actions=pop_mpls:0x0800,goto_table:1','table_id:1,eth_type=0x0800,actions=set_nw_ttl:32,output:2'",
121         "prerequisite":[
122             {
123                 "OFPFlowMod":{
124                     "table_id":0,
125                     "match":{
126                         "OFPMatch":{
127                             "oxm_fields":[
128                                 {
129                                     "OXMTlv":{
130                                         "field":"eth_type",
131                                         "value":34887
132                                     }
133                                 }
134                             ]
135                         }
136                     },
137                     "instructions":[
138                         {
139                             "OFPInstructionActions":{
140                                 "actions":[
141                                     {
142                                         "OFPActionPopMpls":{
143                                             "ethertype":2048
144                                         }
145                                     }
146                                 ],
147                                 "type":4
148                             }
149                         },
150                         {
151                             "OFPInstructionGotoTable":{
152                                 "table_id":1
153                             }
154                         }
155                     ]
156                 }
157             },
158             {
159                 "OFPFlowMod":{
160                     "table_id":1,
161                     "match":{
162                         "OFPMatch":{
163                             "oxm_fields":[
164                                 {
165                                     "OXMTlv":{
166                                         "field":"eth_type",
167                                         "value":2048
168                                     }
169                                 }
170                             ]
171                         }
172                     },
173                     "instructions":[
174                         {
175                             "OFPInstructionActions":{
176                                 "actions":[
177                                     {
178                                         "OFPActionSetNwTtl":{
179                                             "nw_ttl":32
180                                         }
181                                     },
182                                     {
183                                         "OFPActionOutput":{
184                                             "port":2
185                                         }
186                                     }
187                                 ],
188                                 "type":4
189                             }
190                         }
191                     ]
192                 }
193             }
194         ],
195         "tests":[
196             {
197                 "ingress":[
198                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=34887)",
199                     "mpls(bsb=1, label=100, exp=3, ttl=64)",
200                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
201                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
202                     "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'"
203                 ],
204                 "egress":[
205                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
206                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=32)",
207                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
208                     "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'"
209                 ]
210             }
211         ]
212     },
213     {
214         "description": "ethernet/itag/ethernet/ipv4(ttl=64)/tcp-->'actions=pop_pbb,goto_table:1','table_id:1,eth_type=0x0800,actions=set_nw_ttl:32,output:2'",
215         "prerequisite":[
216             {
217                 "OFPFlowMod":{
218                     "table_id":0,
219                     "match":{
220                         "OFPMatch":{
221                             "oxm_fields":[
222                                 {
223                                     "OXMTlv":{
224                                         "field":"eth_type",
225                                         "value":35047
226                                     }
227                                 }
228                             ]
229                         }
230                     },
231                     "instructions":[
232                         {
233                             "OFPInstructionActions":{
234                                 "actions":[
235                                     {
236                                         "OFPActionPopPbb":{}
237                                     }
238                                 ],
239                                 "type":4
240                             }
241                         },
242                         {
243                             "OFPInstructionGotoTable":{
244                                 "table_id":1
245                             }
246                         }
247                     ]
248                 }
249             },
250             {
251                 "OFPFlowMod":{
252                     "table_id":1,
253                     "match":{
254                         "OFPMatch":{
255                             "oxm_fields":[
256                                 {
257                                     "OXMTlv":{
258                                         "field":"eth_type",
259                                         "value":2048
260                                     }
261                                 }
262                             ]
263                         }
264                     },
265                     "instructions":[
266                         {
267                             "OFPInstructionActions":{
268                                 "actions":[
269                                     {
270                                         "OFPActionSetNwTtl":{
271                                             "nw_ttl":32
272                                         }
273                                     },
274                                     {
275                                         "OFPActionOutput":{
276                                             "port":2
277                                         }
278                                     }
279                                 ],
280                                 "type":4
281                             }
282                         }
283                     ]
284                 }
285             }
286         ],
287         "tests":[
288             {
289                 "ingress":[
290                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=35047)",
291                     "itag(sid=100)",
292                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
293                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=64)",
294                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
295                     "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'"
296                 ],
297                 "egress":[
298                     "ethernet(dst='22:22:22:22:22:22', src='12:11:11:11:11:11', ethertype=2048)",
299                     "ipv4(tos=32, proto=6, src='192.168.10.10', dst='192.168.20.20', ttl=32)",
300                     "tcp(dst_port=2222, option=bytes(b'\\x00' * 4), src_port=11111)",
301                     "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'"
302                 ]
303             }
304         ]
305     }
306 ]