diff --git a/src/kits/network/libnetapi/NetworkDevice.cpp b/src/kits/network/libnetapi/NetworkDevice.cpp index 2f709ce790..15da58a5f5 100644 --- a/src/kits/network/libnetapi/NetworkDevice.cpp +++ b/src/kits/network/libnetapi/NetworkDevice.cpp @@ -13,7 +13,7 @@ #include extern "C" { -#include +# include } @@ -40,6 +40,7 @@ get_80211(const char* name, int32 type, void* data, int32& length) return B_OK; } + #if 0 static status_t set_80211(const char* name, int32 type, void* data, @@ -76,6 +77,7 @@ set_80211(const char* name, int32 type, T& data, int32 length = 0, } #endif + template status_t do_request(T& request, const char* name, int option) { @@ -211,6 +213,21 @@ BNetworkDevice::GetHardwareAddress(BNetworkAddress& address) } +bool +BNetworkDevice::IsEthernet() +{ + return !IsWireless(); +} + + +bool +BNetworkDevice::IsWireless() +{ + // TODO: fix me! + return strstr(Name(), "wifi") != NULL; +} + + ssize_t BNetworkDevice::CountScanResults() {