blob: 61b656f43addc296653fa4a28dfa7b73879c3896 [file] [log] [blame]
Rich Lanef86f39a2013-10-07 18:04:11 -07001-- binary
204 04 # version, type
300 38 # length
412 34 56 78 # xid
500 5c 16 c7 # experimenter
600 00 00 28 # subtype
7fe dc ba 98 76 54 32 10 # cookie
842 68 # priority
914 # table_id
1000 # pad
1100 00 00 00 # pad
1200 01 # match.type
1300 16 # match.length
1480 00 01 08 # match.oxm_list[0].type_len - IN_PORT
1500 00 00 04 # match.oxm_list[0].value
1600 00 00 05 # match.oxm_list[0].mask
1780 00 2A 02 # match.oxm_list[1].type_len - ARP_OP
1800 01 # match.oxm_list[1].value
1900 00 # match.pad
20-- python
21ofp.message.bsn_flow_idle(
22 xid=0x12345678,
23 cookie=0xFEDCBA9876543210,
24 priority=17000,
25 table_id=20,
26 match=ofp.match([
27 ofp.oxm.in_port_masked(value=4, value_mask=5),
28 ofp.oxm.arp_op(value=1),
29 ]))
30-- c
31obj = of_bsn_flow_idle_new(OF_VERSION_1_3);
32of_bsn_flow_idle_xid_set(obj, 0x12345678);
33of_bsn_flow_idle_cookie_set(obj, 0xFEDCBA9876543210);
34of_bsn_flow_idle_priority_set(obj, 17000);
35of_bsn_flow_idle_table_id_set(obj, 20);
36{
37 of_match_t match = { OF_VERSION_1_3 };
38 match.fields.in_port = 4;
39 match.masks.in_port = 5;
40 match.fields.arp_op = 1;
41 OF_MATCH_MASK_ARP_OP_EXACT_SET(&match);
42 of_bsn_flow_idle_match_set(obj, &match);
43}
44-- java
45builder.setXid(0x12345678)
46 .setCookie(U64.parseHex("FEDCBA9876543210"))
47 .setPriority(17000)
48 .setTableId(TableId.of(20))
49 .setMatch(
50 factory.buildMatch()
51 .setMasked(MatchField.IN_PORT, OFPort.of(4), OFPort.of(5))
52 .setExact(MatchField.ARP_OP, ArpOpcode.of(1))
53 .build()
54 );