* Added Index() method, was not even declared yet.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39593 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2010-11-23 21:04:19 +00:00
parent 2087545cc0
commit 2bd61a6f33
2 changed files with 12 additions and 0 deletions

View File

@ -31,6 +31,7 @@ public:
void SetTo(const char* name);
const char* Name() const;
uint32 Index() const;
uint32 Flags() const;
bool HasLink() const;

View File

@ -137,6 +137,17 @@ BNetworkDevice::Name() const
}
uint32
BNetworkDevice::Index() const
{
ifreq request;
if (do_request(request, Name(), SIOCGIFINDEX) != B_OK)
return 0;
return request.ifr_index;
}
uint32
BNetworkDevice::Flags() const
{