Retreive speed, mtu for BSD/MacOS ports

This commit is contained in:
Srivats P 2021-11-15 22:31:11 +05:30
parent 7e16004c7f
commit 8ea89f2607

View File

@ -214,8 +214,11 @@ void BsdPort::populateInterfaceInfo()
}
interfaceInfo_ = new InterfaceInfo;
// FIXME: speed, mtu
interfaceInfo_->mac = mac;
if (mac) {
interfaceInfo_->speed = ((struct if_data*)addr->ifa_data)->ifi_baudrate/1e6;
interfaceInfo_->mtu = ((struct if_data*)addr->ifa_data)->ifi_mtu;
}
//
// Find gateways