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