An Internet Protocol address. More...
#include <mi32/socket.h>
Public Member Functions | |
| IPADDR (UINT32 addr) | |
| IPADDR () | |
| int | Compare (const MISOCKET::IPADDR &rhs) const |
| void | GetString (MISTRING &mistr, bool bDoReverseDNSLookup) const |
| bool | IsLoopbackAddr () const |
| bool | IsRoutable () const |
| bool | SetByName (const char *name) |
Static Public Member Functions | |
| static void | GetAddressList (IPADDRLIST &AddrList, bool OnlyRoutable=false) |
Public Attributes | |
| union { | |
| UINT32 S_addr | |
| struct { | |
| UINT8 s_b1 | |
| UINT8 s_b2 | |
| UINT8 s_b3 | |
| UINT8 s_b4 | |
| } S_un_b | |
| } | S_un |
An Internet Protocol address.
Note: this is equivilant to struct in_addr the member names are the same for compatibility reasons.
| MISOCKET::IPADDR::IPADDR | ( | ) |
Empty constructor.
| MISOCKET::IPADDR::IPADDR | ( | UINT32 | addr | ) |
Initialize with a known address.
Address must be in network byte order (hi-lo) XXX ?maybe?
| int MISOCKET::IPADDR::Compare | ( | const MISOCKET::IPADDR & | rhs | ) | const |
Compare two IPADDR's.
| static void MISOCKET::IPADDR::GetAddressList | ( | IPADDRLIST & | AddrList, | |
| bool | OnlyRoutable = false | |||
| ) | [static] |
Get the list of available IP addresses for this machine NOTE: Only implemented for Windows.
| AddrList | List of IP addresses RETURNED | |
| OnlyRoutable | Only list routable addresses |
| void MISOCKET::IPADDR::GetString | ( | MISTRING & | mistr, | |
| bool | bDoReverseDNSLookup | |||
| ) | const |
| bool MISOCKET::IPADDR::IsLoopbackAddr | ( | ) | const |
Is 'this' a lookback address according to RFC1918 and RFC3330 ?
| bool MISOCKET::IPADDR::IsRoutable | ( | ) | const |
Is 'this' a routable address according to RFC1918 and RFC3330 ? Basically, the address is not in the 10 A class private range, the 192.168 B class private range the 172.16 - 172.31 B class private ranges, the 169.254 class B autoconfiguration range, the 127 class A loopback range, and the 224 - 239 class A multicast ranges.
| bool MISOCKET::IPADDR::SetByName | ( | const char * | name | ) |
Set the address by looking up a host name.
| union { ... } MISOCKET::IPADDR::S_un |
| struct { ... } MISOCKET::IPADDR::S_un_b |
1.6.1