| -- binary |
| 04 13 # version, type |
| 00 60 # length |
| 12 34 56 78 # xid |
| ff ff # stats_type |
| 00 00 # flags |
| 00 00 00 00 # pad |
| 00 5c 16 c7 # experimenter |
| 00 00 00 03 # subtype |
| |
| # entries[0] |
| 00 24 # length |
| 00 08 # key_length |
| 00 00 # key[0].type |
| 00 08 # key[0].length |
| 00 00 00 05 # key[0].value |
| 00 02 # stats[0].type |
| 00 0c # stats[0].length |
| 00 00 00 00 00 00 00 64 # stats[0].value |
| 00 03 # stats[0].type |
| 00 0c # stats[0].length |
| 00 00 00 00 00 00 00 65 # stats[0].value |
| |
| # entries[1] |
| 00 24 # length |
| 00 08 # key_length |
| 00 00 # key[0].type |
| 00 08 # key[0].length |
| 00 00 00 06 # key[0].value |
| 00 02 # stats[0].type |
| 00 0c # stats[0].length |
| 00 00 00 00 00 00 00 64 # stats[0].value |
| 00 03 # stats[0].type |
| 00 0c # stats[0].length |
| 00 00 00 00 00 00 00 65 # stats[0].value |
| -- python |
| ofp.message.bsn_gentable_entry_stats_reply( |
| xid=0x12345678, |
| entries=[ |
| ofp.bsn_gentable_entry_stats_entry( |
| key=[ |
| ofp.bsn_tlv.port(5), |
| ], |
| stats=[ |
| ofp.bsn_tlv.rx_packets(100), |
| ofp.bsn_tlv.tx_packets(101), |
| ]), |
| ofp.bsn_gentable_entry_stats_entry( |
| key=[ |
| ofp.bsn_tlv.port(6), |
| ], |
| stats=[ |
| ofp.bsn_tlv.rx_packets(100), |
| ofp.bsn_tlv.tx_packets(101), |
| ]), |
| ]) |
| -- java |
| builder.setXid(0x12345678) |
| .setEntries( |
| ImmutableList.<OFBsnGentableEntryStatsEntry>of( |
| factory.bsnGentableEntryStatsEntry( |
| ImmutableList.<OFBsnTlv>of( |
| factory.bsnTlvs().port(OFPort.of(5)) |
| ), |
| ImmutableList.<OFBsnTlv>of( |
| factory.bsnTlvs().rxPackets(U64.of(100)), |
| factory.bsnTlvs().txPackets(U64.of(101)) |
| ) |
| ), |
| factory.bsnGentableEntryStatsEntry( |
| ImmutableList.<OFBsnTlv>of( |
| factory.bsnTlvs().port(OFPort.of(6)) |
| ), |
| ImmutableList.<OFBsnTlv>of( |
| factory.bsnTlvs().rxPackets(U64.of(100)), |
| factory.bsnTlvs().txPackets(U64.of(101)) |
| ) |
| ) |
| ) |
| ) |
| -- c |
| obj = of_bsn_gentable_entry_stats_reply_new(OF_VERSION_1_3); |
| of_bsn_gentable_entry_stats_reply_xid_set(obj, 0x12345678); |
| { |
| of_object_t *list = of_list_bsn_gentable_entry_stats_entry_new(OF_VERSION_1_3); |
| { |
| of_object_t *entry = of_bsn_gentable_entry_stats_entry_new(OF_VERSION_1_3); |
| { |
| of_object_t *tlvs = of_list_bsn_tlv_new(OF_VERSION_1_3); |
| { |
| of_object_t *tlv = of_bsn_tlv_port_new(OF_VERSION_1_3); |
| of_bsn_tlv_port_value_set(tlv, 5); |
| of_list_append(tlvs, tlv); |
| of_object_delete(tlv); |
| } |
| of_bsn_gentable_entry_stats_entry_key_set(entry, tlvs); |
| of_object_delete(tlvs); |
| } |
| { |
| of_object_t *tlvs = of_list_bsn_tlv_new(OF_VERSION_1_3); |
| { |
| of_object_t *tlv = of_bsn_tlv_rx_packets_new(OF_VERSION_1_3); |
| of_bsn_tlv_rx_packets_value_set(tlv, 100); |
| of_list_append(tlvs, tlv); |
| of_object_delete(tlv); |
| } |
| { |
| of_object_t *tlv = of_bsn_tlv_tx_packets_new(OF_VERSION_1_3); |
| of_bsn_tlv_tx_packets_value_set(tlv, 101); |
| of_list_append(tlvs, tlv); |
| of_object_delete(tlv); |
| } |
| of_bsn_gentable_entry_stats_entry_stats_set(entry, tlvs); |
| of_object_delete(tlvs); |
| } |
| of_list_append(list, entry); |
| of_object_delete(entry); |
| } |
| { |
| of_object_t *entry = of_bsn_gentable_entry_stats_entry_new(OF_VERSION_1_3); |
| { |
| of_object_t *tlvs = of_list_bsn_tlv_new(OF_VERSION_1_3); |
| { |
| of_object_t *tlv = of_bsn_tlv_port_new(OF_VERSION_1_3); |
| of_bsn_tlv_port_value_set(tlv, 6); |
| of_list_append(tlvs, tlv); |
| of_object_delete(tlv); |
| } |
| of_bsn_gentable_entry_stats_entry_key_set(entry, tlvs); |
| of_object_delete(tlvs); |
| } |
| { |
| of_object_t *tlvs = of_list_bsn_tlv_new(OF_VERSION_1_3); |
| { |
| of_object_t *tlv = of_bsn_tlv_rx_packets_new(OF_VERSION_1_3); |
| of_bsn_tlv_rx_packets_value_set(tlv, 100); |
| of_list_append(tlvs, tlv); |
| of_object_delete(tlv); |
| } |
| { |
| of_object_t *tlv = of_bsn_tlv_tx_packets_new(OF_VERSION_1_3); |
| of_bsn_tlv_tx_packets_value_set(tlv, 101); |
| of_list_append(tlvs, tlv); |
| of_object_delete(tlv); |
| } |
| of_bsn_gentable_entry_stats_entry_stats_set(entry, tlvs); |
| of_object_delete(tlvs); |
| } |
| of_list_append(list, entry); |
| of_object_delete(entry); |
| } |
| of_bsn_gentable_entry_stats_reply_entries_set(obj, list); |
| of_object_delete(list); |
| } |