blob: 951f2128bde5c75031327e9aa9f9bc20b2a80409 [file] [log] [blame]
-- binary
04 0a # version, type
00 35 # length
12 34 56 78 # xid
00 00 00 64 # buffer_id
42 68 # total_len
01 # reason
14 # table_id
fe dc ba 98 76 54 32 10 # cookie
00 01 # match.type
00 16 # match.length
80 00 2A 02 # match.oxm_list[0].type_len
00 01 # match.oxm_list[0].value
80 00 01 08 # match.oxm_list[1].type_len
00 00 00 04 # match.oxm_list[1].value
00 00 00 05 # match.oxm_list[1].mask
00 00 # match.pad
00 00 # pad
61 62 63 # data
-- python
ofp.message.packet_in(
xid=0x12345678,
buffer_id=100,
total_len=17000,
reason=ofp.OFPR_ACTION,
table_id=20,
cookie=0xFEDCBA9876543210,
match=ofp.match(oxm_list=[
ofp.oxm.arp_op(value=1),
ofp.oxm.in_port_masked(value=4, value_mask=5)]),
data="abc")
-- java
OFOxms oxms = factory.oxms();
builder
.setXid(0x12345678)
.setBufferId(100)
.setTotalLen(17000)
.setReason(OFPacketInReason.ACTION)
.setTableId((byte) 20)
.setCookie(U64.parseHex("FEDCBA9876543210"))
.setMatch(
factory.buildMatchV3().setOxmList(
OFOxmList.of(
oxms.arpOp(ArpOpcode.ARP_OPCODE_REQUEST),
oxms.inPortMasked(OFPort.of(4), OFPort.of(5))
)
).build()
)
.setData(new byte[] { 97, 98, 99 } );