19 #ifdef DtUSE_UTILITIES_NAMESPACE
20 namespace DtUSE_UTILITIES_NAMESPACE
27 #define DtInet_MAX_PHYSADDR_LEN MAX_ADAPTER_ADDRESS_LENGTH
28 #define DtMAX_DEVICE_NAME_LEN 128 // Windows is ???? so be safe
29 #define DtInet_INITIAL_IFCONF_BUFF_SIZE sizeof(IP_ADAPTER_ADDRESSES)
31 #define DtInet_IFSTATE_UP IfOperStatusUp
32 #define DtInet_IFSTATE_DOWN IfOperStatusDown
33 #define DtInet_IFSTATE_ACTIVE IfOperStatusUp
34 #define DtInet_IFSTATE_UNKNOWN IfOperStatusUnknown
39 #define DtInet_MAX_PHYSADDR_LEN 8
40 #define DtMAX_DEVICE_NAME_LEN IFNAMSIZ // typically 16
41 #define DtInet_INITIAL_IFCONF_BUFF_SIZE sizeof(struct ifreq)
43 #define DtInet_INITIAL_LIFCONF_BUFF_SIZE sizeof(struct lifreq)
46 #define DtInet_IFSTATE_UP IFF_UP
47 #define DtInet_IFSTATE_DOWN 0
48 #define DtInet_IFSTATE_ACTIVE IFF_RUNNING
49 #define DtInet_IFSTATE_UNKNOWN 0
66 struct sockaddr_in6 ifinfo_addr;
67 struct sockaddr_in6 ifinfo_dstaddr;
68 struct sockaddr_in6 ifinfo_broadaddr;
84 #define ifr6_info_in6 ifr6_ifru_in6.ifru_info_in6
85 #define ifr6_data ifr6_ifru_in6.ifru_data
141 virtual const DtString& deviceName()
const;
149 virtual const DtInetAddr* broadcastAddr()
const;
157 virtual const DtInetAddr* ipv4Netmask()
const;
163 virtual const DtInetAddr* ipv4BroadcastAddr()
const;
170 virtual const DtInetAddr* ipv6BroadcastAddr()
const;
179 virtual const DtString& macAddrString()
const;
185 virtual unsigned int mtu()
const;
188 virtual unsigned int linkState()
const;
196 virtual bool isUp()
const;
197 virtual bool isActive()
const;
198 virtual bool isBroadcastCapable()
const;
199 virtual bool isMulticastCapable()
const;
200 virtual bool hasIpv4Addr()
const;
201 virtual bool hasIpv6Addr()
const;
206 virtual unsigned int interfaceIndex()
const;
210 virtual bool isOk()
const;
213 virtual const DtString& getLastErrorString()
const;
225 void scanDeviceByName(
const DtString& deviceName );
226 void initMACAddrString();
229 void init( PIP_ADAPTER_ADDRESSES devInfo );
232 void init(
int sockFd,
struct lifreq* devInfo,
235 void init(
int sockFd,
struct ifreq* devInfo,
284 #ifdef DtUSE_UTILITIES_NAMESPACE
DtString myDeviceName
Definition: vlInetDevice.h:242
const bool operator==(const DtU128 &lhs, const DtU128 &rhs)
DtInetIpv6Scope myLinkScope
Definition: vlInetDevice.h:250
caddr_t ifru_data
Definition: vlInetDevice.h:82
Definition: vlInetAddrUtils.h:58
DtString myLastErrorString
Definition: vlInetDevice.h:271
unsigned int myLinkState
Definition: vlInetDevice.h:262
DtBoost::shared_ptr< DtInetDevice > DtInetDeviceSP
Definition: vlInetDevice.h:98
Contains the DtString class declaration.
#define DtMAX_DEVICE_NAME_LEN
Definition: vlInetDevice.h:40
unsigned long ifinfo_prefix
Definition: vlInetDevice.h:70
unsigned int myMtu
Definition: vlInetDevice.h:261
Includes Boost smart pointers and aliases the Boost namespace.
DtInetIfLinkType
Definition: vlInetDevice.h:88
DtInetAddr * myIpv6BroadcastAddr
Definition: vlInetDevice.h:253
unsigned long ifinfo_scope
Definition: vlInetDevice.h:71
Definition: vlInetDevice.h:90
DtInetAddr * myIpv6Addr
Definition: vlInetDevice.h:249
Definition: vlInetDevice.h:94
DtInetAddrFamily
Definition: vlInetAddrUtils.h:55
#define DtInet_MAX_PHYSADDR_LEN
Definition: vlInetDevice.h:39
unsigned long ifinfo_flags
Definition: vlInetDevice.h:69
Represents a IPv4 or IPv6 address.
Definition: vlInetAddr.h:36
Definition: vlInetDevice.h:92
unsigned int myMACAddrLen
Definition: vlInetDevice.h:245
DtInetIfLinkType myLinkHwType
Definition: vlInetDevice.h:263
unsigned char DtU8
An eight bit unsigned integer value.
Definition: vlMachineTypes.h:137
DtInetAddr * myIpv4Addr
Definition: vlInetDevice.h:247
Definition: vlInetDevice.h:95
This file contains the declaration of the DtInetAddr class.
DtU8 DtInetMacAddr[DtInet_MAX_PHYSADDR_LEN]
Definition: vlInetDevice.h:59
Definition: vlInetDevice.h:101
DtInetUtils::DtInetAddrFamily myDefaultAddrFam
Definition: vlInetDevice.h:255
std::vector< DtInetAddr * > myIpv4McastAddrList
Definition: vlInetDevice.h:258
unsigned int myIfIndex
Definition: vlInetDevice.h:268
bool myBroadcastEnabled
Definition: vlInetDevice.h:251
Definition: vlInetDevice.h:64
unsigned int myIfconfResizeFactor
Definition: vlInetDevice.h:279
Definition: vlInetDevice.h:93
unsigned long ifinfo_mtu
Definition: vlInetDevice.h:73
Definition: vlInetDevice.h:91
u_short ifinfo_site6
Definition: vlInetDevice.h:72
unsigned int myIfconfBufferSize
Definition: vlInetDevice.h:278
DtInetAddr * myIpv4Netmask
Definition: vlInetDevice.h:248
bool myMulticastEnabled
Definition: vlInetDevice.h:257
DtInetIpv6Scope
Definition: vlInetAddr.h:22
DtString myMACAddrString
Definition: vlInetDevice.h:246
Instances of DtString are used to represent strings.
Definition: vlString.h:29
DtInetAddr * myIpv4BroadcastAddr
Definition: vlInetDevice.h:252
Definition: vlInetDevice.h:76
std::vector< DtInetAddr * > myIpv6McastAddrList
Definition: vlInetDevice.h:259
bool myDeviceError
Definition: vlInetDevice.h:270
This file declares useful defaults constants and static methods employed with the networking abstract...
DtInetMacAddr myMACAddr
Definition: vlInetDevice.h:244
#define DT_DLL_VLUTIL
Definition: vlMachineTypes.h:109