Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 1 | -- binary |
| 2 | 04 0e # version, type |
| 3 | 00 80 # length |
| 4 | 12 34 56 78 # xid |
| 5 | |
| 6 | fe dc ba 98 76 54 32 10 # cookie |
| 7 | |
| 8 | ff 00 ff 00 ff 00 ff 00 # cookie_mask |
| 9 | |
| 10 | 03 # table_id |
| 11 | 02 # _command |
| 12 | 00 05 # idle_timeout |
| 13 | 00 0a # hard_timeout |
| 14 | 17 70 # priority |
| 15 | |
| 16 | 00 00 00 32 # buffer_id |
| 17 | 00 00 00 06 # out_port |
| 18 | |
| 19 | 00 00 00 08 # out_group |
| 20 | 00 00 # flags |
| 21 | 00 00 # pad |
| 22 | |
| 23 | 00 01 # match.type |
| 24 | 00 3F # match.length # 59 bytes OXMs + 4 bytes match header |
| 25 | |
| 26 | 80 00 01 08 # match.oxm_list[0].type_len - IN_PORT |
| 27 | 00 00 00 04 # match.oxm_list[0].value |
| 28 | 00 00 00 05 # match.oxm_list[0].mask |
| 29 | |
| 30 | 80 00 0A 02 # match.oxm_list[1].type_len - ETH_TYPE |
| 31 | 86 DD # match.oxm_list[1].value - ETH_TYPE = IPv6 |
| 32 | |
| 33 | 80 00 14 01 # match.oxm_list[2].type_len - IP Proto |
| 34 | 06 # match.oxm_list[2].value = IP_PROTO = TCP |
| 35 | |
| 36 | 80 00 35 20 # match.oxm_list[3].type_len - IPV6_SRC |
| 37 | 1C CA FE 1C B1 10 1C 00 00 28 00 00 00 00 00 00 # match.oxm_list[3].value |
| 38 | FF FF FF FF FF F0 FF FF 1C 2C 3C 00 00 00 00 00 # match.oxm_list[3].mask |
| 39 | |
| 40 | 00 # match.pad |
| 41 | |
| 42 | 00 01 # instructions[0].type |
| 43 | 00 08 # instructions[0].length |
| 44 | 04 # instructions[0].table_id |
| 45 | 00 00 00 # pad |
| 46 | |
| 47 | 00 01 # instructions[1].type |
| 48 | 00 08 # instructions[1].length |
| 49 | 07 # instructions[1].table_id |
| 50 | 00 00 00 # pad |
| 51 | -- python |
| 52 | ofp.message.flow_modify_strict( |
| 53 | xid=0x12345678, |
| 54 | cookie=0xFEDCBA9876543210, |
| 55 | cookie_mask=0xFF00FF00FF00FF00, |
| 56 | table_id=3, |
| 57 | idle_timeout=5, |
| 58 | hard_timeout=10, |
| 59 | priority=6000, |
| 60 | buffer_id=50, |
| 61 | out_port=6, |
| 62 | out_group=8, |
| 63 | flags=0, |
| 64 | match=ofp.match(oxm_list=[ |
| 65 | ofp.oxm.in_port_masked(value=4, value_mask=5), |
| 66 | ofp.oxm.eth_type(value=0x86dd), |
| 67 | ofp.oxm.ip_proto(value=6), |
| 68 | ofp.oxm.ipv6_src_masked( |
| 69 | value ='\x1C\xCA\xFE\x1C\xB1\x10\x1C\x00\x00\x28\x00\x00\x00\x00\x00\x00', |
| 70 | value_mask='\xFF\xFF\xFF\xFF\xFF\xF0\xFF\xFF\x1C\x2C\x3C\x00\x00\x00\x00\x00') |
| 71 | ]), |
| 72 | instructions=[ |
| 73 | ofp.instruction.goto_table(table_id=4), |
| 74 | ofp.instruction.goto_table(table_id=7)]) |
| 75 | -- java |
| 76 | builder.setXid(0x12345678) |
| 77 | .setCookie(U64.parseHex("FEDCBA9876543210")) |
| 78 | .setCookieMask(U64.parseHex("FF00FF00FF00FF00")) |
Andreas Wundsam | 37e0fb1 | 2013-09-28 18:57:57 -0700 | [diff] [blame] | 79 | .setTableId(TableId.of(3)) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 80 | .setIdleTimeout(5) |
| 81 | .setHardTimeout(10) |
| 82 | .setPriority(6000) |
Rob Vaterlaus | b10ae55 | 2013-09-23 14:39:39 -0700 | [diff] [blame] | 83 | .setBufferId(OFBufferId.of(50)) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 84 | .setOutPort(OFPort.of(6)) |
| 85 | .setOutGroup(8) |
Andreas Wundsam | 938f326 | 2013-09-17 14:03:47 -0700 | [diff] [blame] | 86 | .setFlags(ImmutableSet.<OFFlowModFlags>of()) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 87 | .setMatch( |
Yotam Harchol | a86e425 | 2013-09-06 15:36:28 -0700 | [diff] [blame] | 88 | factory.buildMatch() |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 89 | .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5)) |
Andreas Wundsam | f10ed08 | 2013-09-23 14:49:54 -0700 | [diff] [blame] | 90 | .setExact(MatchField.ETH_TYPE, EthType.IPv6) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 91 | .setExact(MatchField.IP_PROTO, IpProtocol.IP_PROTO_TCP) |
| 92 | .setMasked(MatchField.IPV6_SRC, |
Yotam Harchol | a289d55 | 2013-09-16 10:10:40 -0700 | [diff] [blame] | 93 | IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l), |
| 94 | IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l)) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 95 | .build() |
| 96 | ) |
| 97 | .setInstructions( |
| 98 | ImmutableList.<OFInstruction>of( |
Andreas Wundsam | 37e0fb1 | 2013-09-28 18:57:57 -0700 | [diff] [blame] | 99 | factory.instructions().gotoTable(TableId.of(4)), |
| 100 | factory.instructions().gotoTable(TableId.of(7)) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 101 | ) |
| 102 | ); |