Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 1 | -- binary |
| 2 | 04 04 # version, type |
| 3 | 00 24 # length |
| 4 | 12 34 56 78 # xid |
| 5 | 00 5c 16 c7 # experimenter |
| 6 | 00 00 00 2f # subtype |
| 7 | 00 14 # table_id |
| 8 | |
| 9 | 00 00 # key[0].type |
| 10 | 00 08 # key[0].length |
| 11 | 00 00 00 05 # key[0].value |
| 12 | |
| 13 | 00 01 # key[1].type |
| 14 | 00 0a # key[1].length |
| 15 | 01 23 45 67 89 ab # key[1].value |
| 16 | -- python |
| 17 | ofp.message.bsn_gentable_entry_delete( |
| 18 | xid=0x12345678, |
| 19 | table_id=20, |
| 20 | key=[ |
| 21 | ofp.bsn_tlv.port(5), |
| 22 | ofp.bsn_tlv.mac([0x01, 0x23, 0x45, 0x67, 0x89, 0xab]), |
| 23 | ]) |
| 24 | -- java |
| 25 | builder.setXid(0x12345678) |
Andreas Wundsam | d4b2269 | 2014-01-14 14:17:26 -0800 | [diff] [blame] | 26 | .setTableId(GenTableId.of(20)) |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 27 | .setKey( |
| 28 | ImmutableList.<OFBsnTlv>of( |
Andreas Wundsam | d4b2269 | 2014-01-14 14:17:26 -0800 | [diff] [blame] | 29 | factory.bsnTlvs().port(OFPort.of(5)), |
| 30 | factory.bsnTlvs().mac(MacAddress.of("01:23:45:67:89:ab")) |
Rich Lane | 1ac4300 | 2013-12-03 12:56:35 -0800 | [diff] [blame] | 31 | ) |
| 32 | ) |
| 33 | -- c |
| 34 | obj = of_bsn_gentable_entry_delete_new(OF_VERSION_1_3); |
| 35 | of_bsn_gentable_entry_delete_xid_set(obj, 0x12345678); |
| 36 | of_bsn_gentable_entry_delete_table_id_set(obj, 20); |
| 37 | { |
| 38 | of_object_t *list = of_list_bsn_tlv_new(OF_VERSION_1_3); |
| 39 | { |
| 40 | of_object_t *tlv = of_bsn_tlv_port_new(OF_VERSION_1_3); |
| 41 | of_bsn_tlv_port_value_set(tlv, 5); |
| 42 | of_list_append(list, tlv); |
| 43 | of_object_delete(tlv); |
| 44 | } |
| 45 | { |
| 46 | of_mac_addr_t mac = { { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab } }; |
| 47 | of_object_t *tlv = of_bsn_tlv_mac_new(OF_VERSION_1_3); |
| 48 | of_bsn_tlv_mac_value_set(tlv, mac); |
| 49 | of_list_append(list, tlv); |
| 50 | of_object_delete(tlv); |
| 51 | } |
| 52 | of_bsn_gentable_entry_delete_key_set(obj, list); |
| 53 | of_object_delete(list); |
| 54 | } |