![]() |
VR-Link API Documentation for DIS
|
Collaboration diagram for DtInetDevice:Public Member Functions | |
| DtInetDevice (const DtInetAddr &addr) | |
| Basic Constructors. | |
| DtInetDevice (const DtString &deviceName, DtInetUtils::DtInetAddrFamily fam=DtInetUtils::DtInetAddrFamily_IPv4) | |
| DtInetDevice (int sock, struct ifreq *devInfo, struct ifreq_in6 *ipv6DevInfo, DtInetUtils::DtInetAddrFamily fam=DtInetUtils::DtInetAddrFamily_IPv4) | |
| Constructors. | |
| DtInetDevice (const DtInetDevice &orig) | |
| Copy Constructor. | |
| DtInetDevice & | operator= (const DtInetDevice &orig) |
| Assignment Operator. | |
| virtual | ~DtInetDevice () |
| Destructor. | |
| virtual const DtString & | deviceName () const |
| Returns a DtString representation of the device name, eg. | |
| virtual const DtInetAddr * | addr () const |
| Returns the IP address of the device corresponding to the default address family the user specified via the constructor. | |
| virtual const DtInetAddr * | broadcastAddr () const |
| Returns the broadcast IP address of the device corresponding to the default address family the user specified via the constructor. | |
| virtual const DtInetAddr * | ipv4Addr () const |
| Returns the IPv4 address object for this device. | |
| virtual const DtInetAddr * | ipv4Netmask () const |
| Returns the IPv4 address object representing the netmask set for this device. | |
| virtual const DtInetAddr * | ipv4BroadcastAddr () const |
| Returns the IPv4 address object representing the broadcast address set for this device. | |
| virtual const DtInetAddr * | ipv6Addr () const |
| Returns the IPv6 address object for this device. | |
| virtual const DtInetAddr * | ipv6BroadcastAddr () const |
| Returns the IPv6 address object representing the broadcast address for this device. | |
| virtual unsigned int | macAddr (DtInetMacAddr &mac) const |
| Returns size of the device's MAC address with the MAC address in the byte array pointed to by the argument. | |
| virtual const DtString & | macAddrString () const |
| Returns a DtString representation of the MAC address. | |
| virtual DtInetIfLinkType | type () const |
| Returns the device type: Ethernet, loopback, IEEE 1395, FDDI, etc of the device. | |
| virtual unsigned int | mtu () const |
| Returns MTU (Maximum Transfer Unit) of device. | |
| virtual unsigned int | linkState () const |
| Returns the link state enum equivalent. | |
| virtual DtInetIpv6Scope | linkScope () const |
| Returns the link scope of the device (IPv6 only). | |
| virtual unsigned int | interfaceIndex () const |
| Return the interface index. | |
| virtual bool | isOk () const |
| Return indication that the device is not in an error state. | |
| virtual const DtString & | getLastErrorString () const |
| Return string describing last error and clear error indication. | |
| virtual bool | isUp () const |
| Return true if the queried condition is met. | |
| virtual bool | isActive () const |
| Return true if the queried condition is met. | |
| virtual bool | isBroadcastCapable () const |
| Return true if the queried condition is met. | |
| virtual bool | isMulticastCapable () const |
| Return true if the queried condition is met. | |
| virtual bool | hasIpv4Addr () const |
| Return true if the queried condition is met. | |
| virtual bool | hasIpv6Addr () const |
| Return true if the queried condition is met. | |
Protected Member Functions | |
| void | scanDeviceByName (const DtString &deviceName) |
| void | initMACAddrString () |
| void | init (int sockFd, struct ifreq *devInfo, struct ifreq_in6 *ipv6DevInfo) |
Protected Attributes | |
| DtString | myDeviceName |
| DtInetMacAddr | myMACAddr |
| unsigned int | myMACAddrLen |
| DtString | myMACAddrString |
| DtInetAddr * | myIpv4Addr |
| DtInetAddr * | myIpv4Netmask |
| DtInetAddr * | myIpv6Addr |
| DtInetIpv6Scope | myLinkScope |
| bool | myBroadcastEnabled |
| DtInetAddr * | myIpv4BroadcastAddr |
| DtInetAddr * | myIpv6BroadcastAddr |
| DtInetUtils::DtInetAddrFamily | myDefaultAddrFam |
| bool | myMulticastEnabled |
| std::vector< DtInetAddr * > | myIpv4McastAddrList |
| std::vector< DtInetAddr * > | myIpv6McastAddrList |
| unsigned int | myMtu |
| unsigned int | myLinkState |
| DtInetIfLinkType | myLinkHwType |
| unsigned int | myIfIndex |
| bool | myDeviceError |
| DtString | myLastErrorString |
| unsigned int | myIfconfBufferSize |
| unsigned int | myIfconfResizeFactor |
Friends | |
| bool | operator== (const DtInetDevice &dev1, const DtInetDevice &dev2) |
| Comparison Operators. | |
| DtInetDevice::DtInetDevice | ( | const DtInetAddr & | addr | ) |
Basic Constructors.
Take a device name (which could be the IP address string) or IP address object (IPv4 or IPv6) and scans the host device list to retrieve interface info.
| DtInetDevice::DtInetDevice | ( | const DtString & | deviceName, |
| DtInetUtils::DtInetAddrFamily | fam = DtInetUtils::DtInetAddrFamily_IPv4 |
||
| ) |
| DtInetDevice::DtInetDevice | ( | int | sock, |
| struct ifreq * | devInfo, | ||
| struct ifreq_in6 * | ipv6DevInfo, | ||
| DtInetUtils::DtInetAddrFamily | fam = DtInetUtils::DtInetAddrFamily_IPv4 |
||
| ) |
Constructors.
Takes a pointer to a structure containing the host device information. Structures are platform dependent.
| DtInetDevice::DtInetDevice | ( | const DtInetDevice & | orig | ) |
Copy Constructor.
|
virtual |
Destructor.
|
virtual |
Returns the IP address of the device corresponding to the default address family the user specified via the constructor.
|
virtual |
Returns the broadcast IP address of the device corresponding to the default address family the user specified via the constructor.
|
virtual |
Returns a DtString representation of the device name, eg.
eth0, en0 Local Area Connection, etc.
|
virtual |
Return string describing last error and clear error indication.
|
virtual |
Return true if the queried condition is met.
|
virtual |
Return true if the queried condition is met.
|
protected |
|
protected |
|
virtual |
Return the interface index.
Should be used with care, as it can be outdated if interface is restarted.
|
virtual |
Returns the IPv4 address object for this device.
|
virtual |
Returns the IPv4 address object representing the broadcast address set for this device.
The broadcast address set for the device may not be the same as the default broadcast address derived from the device's IPv4 address class.
|
virtual |
Returns the IPv4 address object representing the netmask set for this device.
The set netmask may not be the same as the default netmask associated with the device's IPv4 address class.
|
virtual |
Returns the IPv6 address object for this device.
|
virtual |
Returns the IPv6 address object representing the broadcast address for this device.
|
virtual |
Return true if the queried condition is met.
|
virtual |
Return true if the queried condition is met.
|
virtual |
Return true if the queried condition is met.
|
virtual |
Return indication that the device is not in an error state.
Possible errors include: device not found, device not initialized, invalid name
|
virtual |
Return true if the queried condition is met.
|
virtual |
Returns the link scope of the device (IPv6 only).
(eg. link-local, global)
|
virtual |
Returns the link state enum equivalent.
|
virtual |
Returns size of the device's MAC address with the MAC address in the byte array pointed to by the argument.
|
virtual |
Returns a DtString representation of the MAC address.
Uses *nix notation convention (ie. colon separated hexadecimal) or Windows notation convention (ie. dash separated hexadecimal) depending on OS.
|
virtual |
Returns MTU (Maximum Transfer Unit) of device.
| DtInetDevice& DtInetDevice::operator= | ( | const DtInetDevice & | orig | ) |
Assignment Operator.
|
protected |
|
virtual |
Returns the device type: Ethernet, loopback, IEEE 1395, FDDI, etc of the device.
|
friend |
Comparison Operators.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |