Rich Lane | f86f39a | 2013-10-07 18:04:11 -0700 | [diff] [blame] | 1 | -- binary |
| 2 | 04 04 # version, type |
| 3 | 00 38 # length |
| 4 | 12 34 56 78 # xid |
| 5 | 00 5c 16 c7 # experimenter |
| 6 | 00 00 00 28 # subtype |
| 7 | fe dc ba 98 76 54 32 10 # cookie |
| 8 | 42 68 # priority |
| 9 | 14 # table_id |
| 10 | 00 # pad |
| 11 | 00 00 00 00 # pad |
| 12 | 00 01 # match.type |
| 13 | 00 16 # match.length |
| 14 | 80 00 01 08 # match.oxm_list[0].type_len - IN_PORT |
| 15 | 00 00 00 04 # match.oxm_list[0].value |
| 16 | 00 00 00 05 # match.oxm_list[0].mask |
| 17 | 80 00 2A 02 # match.oxm_list[1].type_len - ARP_OP |
| 18 | 00 01 # match.oxm_list[1].value |
| 19 | 00 00 # match.pad |
| 20 | -- python |
| 21 | ofp.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 |
| 31 | obj = of_bsn_flow_idle_new(OF_VERSION_1_3); |
| 32 | of_bsn_flow_idle_xid_set(obj, 0x12345678); |
| 33 | of_bsn_flow_idle_cookie_set(obj, 0xFEDCBA9876543210); |
| 34 | of_bsn_flow_idle_priority_set(obj, 17000); |
| 35 | of_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 |
| 45 | builder.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 | ); |