hwdet::LinuxDetector::InterfaceInfo Class Reference

Stores data about one network interface. More...


Public Member Functions

 InterfaceInfo (const char *name, int socket_fd)
 Ctor.
NetworkAdapterGetNetworkAdapter (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.


Detailed Description

Stores data about one network interface.


Constructor & Destructor Documentation

hwdet::LinuxDetector::InterfaceInfo::InterfaceInfo ( const char *  name,
int  socket_fd 
)

Ctor.

Query interface data from kernel via ioctl.

Parameters:
name Name of the interface to query.
socket_fd Open socket to use in ioctl.


Member Function Documentation

NetworkAdapter * hwdet::LinuxDetector::InterfaceInfo::GetNetworkAdapter ( void   )  const

Convert to XML NetworkAdapter.

Returns:
NetworkAdapter object containing same data as this class.

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).


Field Documentation

unsigned char hwdet::LinuxDetector::InterfaceInfo::hw_addr_bytes[HW_ADDRESS_LENGTH]

MAC address data.

String hwdet::LinuxDetector::InterfaceInfo::hw_address

Hardware address string (MAC).

const size_t hwdet::LinuxDetector::InterfaceInfo::HW_ADDRESS_LENGTH = 6 [static]

Length of the hardware address of the device.

String hwdet::LinuxDetector::InterfaceInfo::iface_name

Name of the interface.

String hwdet::LinuxDetector::InterfaceInfo::iface_type

Type of the iface.

String hwdet::LinuxDetector::InterfaceInfo::vendor_name

Vendor's name (always unknown on Linux).


The documentation for this class was generated from the following files:
Generated on Tue Dec 19 17:43:51 2006 for Detector for Linux by  doxygen 1.4.7