blob: 88cf939a88f87a43b1ae19dd3cd82ceee083ad16 [file] [log] [blame]
Rich Lane3d2c5732014-10-10 16:02:40 -07001-- binary
205 0e # version, type
300 80 # length
412 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
1100 # _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
21aa bb # importance
22
2300 01 # match.type
2400 3F # match.length # 59 bytes OXMs + 4 bytes match header
25
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
4000 # match.pad
41
4200 01 # instructions[0].type
4300 08 # instructions[0].length
4404 # instructions[0].table_id
4500 00 00 # pad
46
4700 01 # instructions[1].type
4800 08 # instructions[1].length
4907 # instructions[1].table_id
5000 00 00 # pad
51-- python
52ofp.message.flow_add(
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 importance=0xaabb,
65 match=ofp.match(oxm_list=[
66 ofp.oxm.in_port_masked(value=4, value_mask=5),
67 ofp.oxm.eth_type(value=0x86dd),
68 ofp.oxm.ip_proto(value=6),
69 ofp.oxm.ipv6_src_masked(
70 value ='\x1C\xCA\xFE\x1C\xB1\x10\x1C\x00\x00\x28\x00\x00\x00\x00\x00\x00',
71 value_mask='\xFF\xFF\xFF\xFF\xFF\xF0\xFF\xFF\x1C\x2C\x3C\x00\x00\x00\x00\x00')
72 ]),
73 instructions=[
74 ofp.instruction.goto_table(table_id=4),
75 ofp.instruction.goto_table(table_id=7)])
76-- java
77builder.setXid(0x12345678)
78 .setCookie(U64.parseHex("FEDCBA9876543210"))
79 .setCookieMask(U64.parseHex("FF00FF00FF00FF00"))
80 .setTableId(TableId.of(3))
81 .setIdleTimeout(5)
82 .setHardTimeout(10)
83 .setPriority(6000)
84 .setBufferId(OFBufferId.of(50))
85 .setOutPort(OFPort.of(6))
86 .setOutGroup(OFGroup.of(8))
87 .setFlags(ImmutableSet.<OFFlowModFlags>of())
88 .setImportance(0xaabb)
89 .setMatch(
90 factory.buildMatch()
91 .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
92 .setExact(MatchField.ETH_TYPE, EthType.IPv6)
93 .setExact(MatchField.IP_PROTO, IpProtocol.TCP)
94 .setMasked(MatchField.IPV6_SRC,
95 IPv6Address.of(0x1CCAFE1CB1101C00l, 0x0028000000000000l),
96 IPv6Address.of(0xFFFFFFFFFFF0FFFFl, 0x1C2C3C0000000000l))
97 .build()
98 )
99 .setInstructions(
100 ImmutableList.<OFInstruction>of(
101 factory.instructions().gotoTable(TableId.of(4)),
102 factory.instructions().gotoTable(TableId.of(7))
103 )
104 );