Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 1 | -- binary |
| 2 | 04 0e # version, type |
Yafit Hadar | f8caac0 | 2015-08-25 10:21:44 +0300 | [diff] [blame] | 3 | 00 B8 # length |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 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 | 01 # _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 |
Yafit Hadar | f8caac0 | 2015-08-25 10:21:44 +0300 | [diff] [blame] | 24 | 00 77 # match.length # |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 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 | |
Yafit Hadar | f8caac0 | 2015-08-25 10:21:44 +0300 | [diff] [blame] | 40 | FF FF # experimenter class |
| 41 | 06 10 # type_len - EXP_ODU_SIG_ID |
| 42 | FF 00 00 07 # experimenter id |
| 43 | 55 55 # tpn |
| 44 | 00 50 # tslen |
| 45 | 01 01 01 01 01 01 01 01 01 01 00 00 # tsmap |
| 46 | |
| 47 | FF FF # experimenter class |
| 48 | 04 01 # type_len - EXP_ODU_SIG_TYPE |
| 49 | FF 00 00 07 # experimenter id |
| 50 | 08 # value |
| 51 | |
| 52 | FF FF # experimenter class |
| 53 | 0A 06 # type_len - EXP_OCH_SIG_ID |
| 54 | FF 00 00 07 # experimenter id |
| 55 | 02 # gridType |
| 56 | 01 # channelSpacing |
| 57 | 00 04 # channelNumber |
| 58 | 00 01 # spectralWidth |
| 59 | |
| 60 | FF FF # experimenter class |
| 61 | 08 01 # type_len - EXP_OCH_SIG_TYPE |
| 62 | FF 00 00 07 # experimenter id |
| 63 | 16 # value |
| 64 | |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 65 | 00 # match.pad |
| 66 | |
| 67 | 00 01 # instructions[0].type |
| 68 | 00 08 # instructions[0].length |
| 69 | 04 # instructions[0].table_id |
| 70 | 00 00 00 # pad |
| 71 | |
| 72 | 00 01 # instructions[1].type |
| 73 | 00 08 # instructions[1].length |
| 74 | 07 # instructions[1].table_id |
| 75 | 00 00 00 # pad |
| 76 | -- python |
| 77 | ofp.message.flow_modify( |
| 78 | xid=0x12345678, |
| 79 | cookie=0xFEDCBA9876543210, |
| 80 | cookie_mask=0xFF00FF00FF00FF00, |
| 81 | table_id=3, |
| 82 | idle_timeout=5, |
| 83 | hard_timeout=10, |
| 84 | priority=6000, |
| 85 | buffer_id=50, |
| 86 | out_port=6, |
| 87 | out_group=8, |
| 88 | flags=0, |
| 89 | match=ofp.match(oxm_list=[ |
| 90 | ofp.oxm.in_port_masked(value=4, value_mask=5), |
| 91 | ofp.oxm.eth_type(value=0x86dd), |
| 92 | ofp.oxm.ip_proto(value=6), |
| 93 | ofp.oxm.ipv6_src_masked( |
| 94 | value ='\x1C\xCA\xFE\x1C\xB1\x10\x1C\x00\x00\x28\x00\x00\x00\x00\x00\x00', |
| 95 | value_mask='\xFF\xFF\xFF\xFF\xFF\xF0\xFF\xFF\x1C\x2C\x3C\x00\x00\x00\x00\x00') |
| 96 | ]), |
Yafit Hadar | f8caac0 | 2015-08-25 10:21:44 +0300 | [diff] [blame] | 97 | ofp.oxm.exp_odu_sig_id(21845,4,10), |
| 98 | ofp.oxm.exp_odu_sigtype(8), |
| 99 | ofp.oxm.exp_och_sig_id(2,1,4,1), |
| 100 | ofp.oxm.exp_och_sigtype(22), |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 101 | instructions=[ |
| 102 | ofp.instruction.goto_table(table_id=4), |
| 103 | ofp.instruction.goto_table(table_id=7)]) |
| 104 | -- java |
| 105 | builder.setXid(0x12345678) |
| 106 | .setCookie(U64.parseHex("FEDCBA9876543210")) |
| 107 | .setCookieMask(U64.parseHex("FF00FF00FF00FF00")) |
Andreas Wundsam | 37e0fb1 | 2013-09-28 18:57:57 -0700 | [diff] [blame] | 108 | .setTableId(TableId.of(3)) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 109 | .setIdleTimeout(5) |
| 110 | .setHardTimeout(10) |
| 111 | .setPriority(6000) |
Rob Vaterlaus | b10ae55 | 2013-09-23 14:39:39 -0700 | [diff] [blame] | 112 | .setBufferId(OFBufferId.of(50)) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 113 | .setOutPort(OFPort.of(6)) |
Andreas Wundsam | ee8b42c | 2014-01-24 17:38:19 -0800 | [diff] [blame] | 114 | .setOutGroup(OFGroup.of(8)) |
Andreas Wundsam | 938f326 | 2013-09-17 14:03:47 -0700 | [diff] [blame] | 115 | .setFlags(ImmutableSet.<OFFlowModFlags>of()) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 116 | .setMatch( |
Yotam Harchol | a86e425 | 2013-09-06 15:36:28 -0700 | [diff] [blame] | 117 | factory.buildMatch() |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 118 | .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5)) |
Andreas Wundsam | f10ed08 | 2013-09-23 14:49:54 -0700 | [diff] [blame] | 119 | .setExact(MatchField.ETH_TYPE, EthType.IPv6) |
Andreas Wundsam | 520c880 | 2013-10-08 22:05:23 -0700 | [diff] [blame] | 120 | .setExact(MatchField.IP_PROTO, IpProtocol.TCP) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 121 | .setMasked(MatchField.IPV6_SRC, |
Yotam Harchol | a289d55 | 2013-09-16 10:10:40 -0700 | [diff] [blame] | 122 | IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l), |
| 123 | IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l)) |
Yafit Hadar | f8caac0 | 2015-08-25 10:21:44 +0300 | [diff] [blame] | 124 | .setExact(MatchField.EXP_ODU_SIG_ID, new OduSignalID((short)21845, (short)80,new byte[] {1,1,1,1,1,1,1,1,1,1})) |
| 125 | .setExact(MatchField.EXP_ODU_SIGTYPE, U8.of((short) 8 )) |
| 126 | .setExact(MatchField.EXP_OCH_SIG_ID, new CircuitSignalID((byte)2,(byte)1,(short)4,(short)1)) |
| 127 | .setExact(MatchField.EXP_OCH_SIGTYPE, U8.of((short) 22)) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 128 | .build() |
| 129 | ) |
| 130 | .setInstructions( |
| 131 | ImmutableList.<OFInstruction>of( |
Andreas Wundsam | 37e0fb1 | 2013-09-28 18:57:57 -0700 | [diff] [blame] | 132 | factory.instructions().gotoTable(TableId.of(4)), |
| 133 | factory.instructions().gotoTable(TableId.of(7)) |
Yotam Harchol | 5749dc3 | 2013-08-22 15:41:30 -0700 | [diff] [blame] | 134 | ) |
| 135 | ); |