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