blob: 525d1445d2cecc1ffdf2aa7eebf4f9445743b641 [file] [log] [blame]
Rich Lanec9fc57d2013-05-16 16:39:12 -07001-- binary
204 0a # version, type
300 35 # length
412 34 56 78 # xid
500 00 00 64 # buffer_id
642 68 # total_len
701 # reason
814 # table_id
9fe dc ba 98 76 54 32 10 # cookie
1000 01 # match.type
1100 16 # match.length
Yotam Harchol5749dc32013-08-22 15:41:30 -07001280 00 01 08 # match.oxm_list[0].type_len - Input Port
Yotam Harchol7ec170e2013-08-22 15:20:24 -07001300 00 00 04 # match.oxm_list[0].value
1400 00 00 05 # match.oxm_list[0].mask
Yotam Harchol5749dc32013-08-22 15:41:30 -07001580 00 2A 02 # match.oxm_list[1].type_len - ARP OpCode
Yotam Harchol7ec170e2013-08-22 15:20:24 -07001600 01 # match.oxm_list[1].value
Rich Lanec9fc57d2013-05-16 16:39:12 -07001700 00 # match.pad
1800 00 # pad
1961 62 63 # data
20-- python
21ofp.message.packet_in(
22 xid=0x12345678,
23 buffer_id=100,
24 total_len=17000,
25 reason=ofp.OFPR_ACTION,
26 table_id=20,
27 cookie=0xFEDCBA9876543210,
28 match=ofp.match(oxm_list=[
Yotam Harchol5749dc32013-08-22 15:41:30 -070029 ofp.oxm.in_port_masked(value=4, value_mask=5),
30 ofp.oxm.arp_op(value=1)
31 ]),
Rich Lanec9fc57d2013-05-16 16:39:12 -070032 data="abc")
Andreas Wundsam6cd99e52013-08-02 22:27:23 -070033-- java
34builder
35 .setXid(0x12345678)
Rob Vaterlausb10ae552013-09-23 14:39:39 -070036 .setBufferId(OFBufferId.of(100))
Andreas Wundsam6cd99e52013-08-02 22:27:23 -070037 .setTotalLen(17000)
38 .setReason(OFPacketInReason.ACTION)
Andreas Wundsam37e0fb12013-09-28 18:57:57 -070039 .setTableId(TableId.of(20))
Andreas Wundsam6cd99e52013-08-02 22:27:23 -070040 .setCookie(U64.parseHex("FEDCBA9876543210"))
41 .setMatch(
Yotam Harchol5749dc32013-08-22 15:41:30 -070042 factory.buildMatchV3()
43 .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
Andreas Wundsam520c8802013-10-08 22:05:23 -070044 .setExact(MatchField.ARP_OP, ArpOpcode.REQUEST)
Yotam Harchol5749dc32013-08-22 15:41:30 -070045 .build()
Andreas Wundsam6cd99e52013-08-02 22:27:23 -070046 )
47 .setData(new byte[] { 97, 98, 99 } );
48