blob: 1c02f5ab46663e8e33b79df2c1f55d7c5bba346c [file] [log] [blame]
Yotam Harchol5749dc32013-08-22 15:41:30 -07001-- binary
204 0e # version, type
Yafit Hadarf8caac02015-08-25 10:21:44 +0300300 B8 # length
Yotam Harchol5749dc32013-08-22 15:41:30 -0700412 34 56 78 # xid
5
6fe dc ba 98 76 54 32 10 # cookie
7
8ff 00 ff 00 ff 00 ff 00 # cookie_mask
9
1003 # table_id
1101 # _command
1200 05 # idle_timeout
1300 0a # hard_timeout
1417 70 # priority
15
1600 00 00 32 # buffer_id
1700 00 00 06 # out_port
18
1900 00 00 08 # out_group
2000 00 # flags
2100 00 # pad
22
2300 01 # match.type
Yafit Hadarf8caac02015-08-25 10:21:44 +03002400 77 # match.length #
Yotam Harchol5749dc32013-08-22 15:41:30 -070025
2680 00 01 08 # match.oxm_list[0].type_len - IN_PORT
2700 00 00 04 # match.oxm_list[0].value
2800 00 00 05 # match.oxm_list[0].mask
29
3080 00 0A 02 # match.oxm_list[1].type_len - ETH_TYPE
3186 DD # match.oxm_list[1].value - ETH_TYPE = IPv6
32
3380 00 14 01 # match.oxm_list[2].type_len - IP Proto
3406 # match.oxm_list[2].value = IP_PROTO = TCP
35
3680 00 35 20 # match.oxm_list[3].type_len - IPV6_SRC
371C CA FE 1C B1 10 1C 00 00 28 00 00 00 00 00 00 # match.oxm_list[3].value
38FF FF FF FF FF F0 FF FF 1C 2C 3C 00 00 00 00 00 # match.oxm_list[3].mask
39
Yafit Hadarf8caac02015-08-25 10:21:44 +030040FF FF # experimenter class
4106 10 # type_len - EXP_ODU_SIG_ID
42FF 00 00 07 # experimenter id
4355 55 # tpn
4400 50 # tslen
4501 01 01 01 01 01 01 01 01 01 00 00 # tsmap
46
47FF FF # experimenter class
4804 01 # type_len - EXP_ODU_SIG_TYPE
49FF 00 00 07 # experimenter id
5008 # value
51
52FF FF # experimenter class
530A 06 # type_len - EXP_OCH_SIG_ID
54FF 00 00 07 # experimenter id
5502 # gridType
5601 # channelSpacing
5700 04 # channelNumber
5800 01 # spectralWidth
59
60FF FF # experimenter class
6108 01 # type_len - EXP_OCH_SIG_TYPE
62FF 00 00 07 # experimenter id
6316 # value
64
Yotam Harchol5749dc32013-08-22 15:41:30 -07006500 # match.pad
66
6700 01 # instructions[0].type
6800 08 # instructions[0].length
6904 # instructions[0].table_id
7000 00 00 # pad
71
7200 01 # instructions[1].type
7300 08 # instructions[1].length
7407 # instructions[1].table_id
7500 00 00 # pad
76-- python
77ofp.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 Hadarf8caac02015-08-25 10:21:44 +030097 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 Harchol5749dc32013-08-22 15:41:30 -0700101 instructions=[
102 ofp.instruction.goto_table(table_id=4),
103 ofp.instruction.goto_table(table_id=7)])
104-- java
105builder.setXid(0x12345678)
106 .setCookie(U64.parseHex("FEDCBA9876543210"))
107 .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
Andreas Wundsam37e0fb12013-09-28 18:57:57 -0700108 .setTableId(TableId.of(3))
Yotam Harchol5749dc32013-08-22 15:41:30 -0700109 .setIdleTimeout(5)
110 .setHardTimeout(10)
111 .setPriority(6000)
Rob Vaterlausb10ae552013-09-23 14:39:39 -0700112 .setBufferId(OFBufferId.of(50))
Yotam Harchol5749dc32013-08-22 15:41:30 -0700113 .setOutPort(OFPort.of(6))
Andreas Wundsamee8b42c2014-01-24 17:38:19 -0800114 .setOutGroup(OFGroup.of(8))
Andreas Wundsam938f3262013-09-17 14:03:47 -0700115 .setFlags(ImmutableSet.<OFFlowModFlags>of())
Yotam Harchol5749dc32013-08-22 15:41:30 -0700116 .setMatch(
Yotam Harchola86e4252013-09-06 15:36:28 -0700117 factory.buildMatch()
Yotam Harchol5749dc32013-08-22 15:41:30 -0700118 .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
Andreas Wundsamf10ed082013-09-23 14:49:54 -0700119 .setExact(MatchField.ETH_TYPE, EthType.IPv6)
Andreas Wundsam520c8802013-10-08 22:05:23 -0700120 .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
Yotam Harchol5749dc32013-08-22 15:41:30 -0700121 .setMasked(MatchField.IPV6_SRC,
Yotam Harchola289d552013-09-16 10:10:40 -0700122 IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
123 IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
Yafit Hadarf8caac02015-08-25 10:21:44 +0300124 .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 Harchol5749dc32013-08-22 15:41:30 -0700128 .build()
129 )
130 .setInstructions(
131 ImmutableList.<OFInstruction>of(
Andreas Wundsam37e0fb12013-09-28 18:57:57 -0700132 factory.instructions().gotoTable(TableId.of(4)),
133 factory.instructions().gotoTable(TableId.of(7))
Yotam Harchol5749dc32013-08-22 15:41:30 -0700134 )
135 );