* 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:
parent
2087545cc0
commit
2bd61a6f33
@ -31,6 +31,7 @@ public:
|
||||
void SetTo(const char* name);
|
||||
|
||||
const char* Name() const;
|
||||
uint32 Index() const;
|
||||
|
||||
uint32 Flags() const;
|
||||
bool HasLink() const;
|
||||
|
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user