Public Member Functions | |
InterfaceInfo (const char *name, int socket_fd) | |
Ctor. | |
NetworkAdapter * | GetNetworkAdapter (void) const |
Convert to XML NetworkAdapter. | |
Data Fields | |
String | iface_name |
Name of the interface. | |
String | vendor_name |
Vendor's name (always unknown on Linux). | |
String | hw_address |
Hardware address string (MAC). | |
String | iface_type |
Type of the iface. | |
unsigned char | hw_addr_bytes [HW_ADDRESS_LENGTH] |
MAC address data. | |
Static Public Attributes | |
static const size_t | HW_ADDRESS_LENGTH = 6 |
Length of the hardware address of the device. | |
Private Member Functions | |
void | HwAddressString (void) |
Fill string version of the MAC. |
hwdet::LinuxDetector::InterfaceInfo::InterfaceInfo | ( | const char * | name, | |
int | socket_fd | |||
) |
Ctor.
Query interface data from kernel via ioctl.
name | Name of the interface to query. | |
socket_fd | Open socket to use in ioctl. |
NetworkAdapter * hwdet::LinuxDetector::InterfaceInfo::GetNetworkAdapter | ( | void | ) | const |
void hwdet::LinuxDetector::InterfaceInfo::HwAddressString | ( | void | ) | [private] |
Fill string version of the MAC.
Convert bytes in the MAC address to the standard notation (hex bytes separated by colons).
MAC address data.
Hardware address string (MAC).
const size_t hwdet::LinuxDetector::InterfaceInfo::HW_ADDRESS_LENGTH = 6 [static] |
Length of the hardware address of the device.
Name of the interface.
Type of the iface.
Vendor's name (always unknown on Linux).