Skip to content
This repository was archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
agent: add DeviceInformation TLV to topology response
Browse files Browse the repository at this point in the history
DeviceInformation TLV contains dummy data

Signed-off-by: Mario Maz <[email protected]>
  • Loading branch information
mariomaz committed Jan 17, 2020
1 parent 304a4f0 commit 9e895bc
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <tlvf/ieee_1905_1/eMessageType.h>
#include <tlvf/ieee_1905_1/tlvAlMacAddressType.h>
#include <tlvf/ieee_1905_1/tlvAutoconfigFreqBand.h>
#include <tlvf/ieee_1905_1/tlvDeviceInformation.h>
#include <tlvf/ieee_1905_1/tlvEndOfMessage.h>
#include <tlvf/ieee_1905_1/tlvMacAddress.h>
#include <tlvf/ieee_1905_1/tlvSearchedRole.h>
Expand Down Expand Up @@ -1766,6 +1767,15 @@ bool backhaul_manager::handle_1905_topology_query(ieee1905_1::CmduMessageRx &cmd
return false;
}

auto tlvDeviceInformation = cmdu_tx.addClass<ieee1905_1::tlvDeviceInformation>();
if (!tlvDeviceInformation) {
LOG(ERROR) << "addClass ieee1905_1::tlvDeviceInformation failed, mid=" << std::hex
<< (int)mid;
return false;
}

tlvDeviceInformation->mac() = network_utils::mac_from_string(bridge_info.mac);

auto tlvSupportedService = cmdu_tx.addClass<wfa_map::tlvSupportedService>();
if (!tlvSupportedService) {
LOG(ERROR) << "addClass wfa_map::tlvSupportedService failed, mid=" << std::hex << (int)mid;
Expand Down

0 comments on commit 9e895bc

Please sign in to comment.