30#include <basictypes.h>
31#include <nbprintfinternal.h>
43 void Compactformat(
char *cp)
const;
66 bool IsEmbeddedIPV4()
const {
return ((val[2] == 0xFFFF) && (val[0] == 0) && (val[1] == 0)); }
101 bool IsNull()
const {
return ((val[0] | val[1] | val[3] | ((val[2] != 0xFFFF) && (val[2] != 0))) == 0); }
122 {
return ((val[3] == 1) && (val[2] == 0) && (val[1] == 0) && (val[0] == 0)); }
132 inline bool IsMultiCast()
const {
return ((val[0] & 0xff000000) == 0xff000000); };
143 inline bool IsLinkLocal()
const {
return ((val[0] & 0xffc00000) == 0xfe800000); };
166 void print(
bool bCompact =
true,
bool bShowV4Raw =
false)
const;
178 void fdprint(
int fd,
bool bCompact =
true,
bool bShowV4Raw =
false)
const;
193 int sprintf(
char *cp,
int maxl,
bool bCompact =
true,
bool bShowV4Raw =
false)
const;
251 void SetSolicitedNodeIP6(
const IPADDR6 &ip6);
254 void SetFromIPMask(
MACADR &ma,
const IPADDR6 &g_root,
int mask_len);
310 int GetPrintLen(
bool compact);
311 int PrintHelper(PutCharsFunction *pf,
void *data,
bool compact);
314 beuint32_t
inline GetInternalValue(
int i)
const {
return val[i]; };
325} __attribute__((packed));
333 return ((i.val[3] == j.val[3]) && (i.val[2] == j.val[2]) && (i.val[1] == j.val[1]) && (i.val[0] == j.val[0]));
338 return !((i.val[3] == j.val[3]) && (i.val[2] == j.val[2]) && (i.val[1] == j.val[1]) && (i.val[0] == j.val[0]));
343 if (i.val[0] > j.val[0])
return true;
345 if (i.val[0] == j.val[0])
347 if (i.val[1] > j.val[1])
return true;
349 if (i.val[1] == j.val[1])
351 if (i.val[2] > j.val[2])
return true;
353 if (i.val[2] == j.val[2])
355 if (i.val[3] > j.val[3])
return true;
364 if (i.val[0] < j.val[0])
return true;
366 if (i.val[0] == j.val[0])
368 if (i.val[1] < j.val[1])
return true;
369 if (i.val[1] == j.val[1])
371 if (i.val[2] < j.val[2])
return true;
372 if (i.val[2] == j.val[2])
374 if (i.val[3] < j.val[3])
return true;
Used to store and manipulate IPv4 addresses in dual stack mode.
Definition nettypes.h:208
bool IsLoopBack() const
Check if the IP address is the loopback address for the interface.
Definition nettypes.h:287
Used to hold and manipulate IPv4 and IPv6 addresses in dual stack mode.
Definition ipv6_addr.h:41
void print(bool bCompact=true, bool bShowV4Raw=false) const
Print the IP address value to stdout.
int sprintf(char *cp, int maxl, bool bCompact=true, bool bShowV4Raw=false) const
Print the IP address to the specified buffer.
void SetFromAscii(const char *cp, bool bembed_v4addresses=true)
Set the IP address value of an IPADDR6 object.
IPADDR4 Extract4() const
Extracts an IPv4 address from the object.
Definition ipv6_addr.h:73
bool IsLinkLocal() const
Check if the IP address is the link-local address for the interface.
Definition ipv6_addr.h:143
void SetFromIP4(IPADDR4 ip)
Set the IP address value of an IPADDR6 object from an IPADD4 object.
bool IsEmbeddedIPV4() const
An IPADDR6 object can store a IPv4 or IPv6 address. This function returns true if the instance contai...
Definition ipv6_addr.h:66
MACADR McastMac() const
Return the MAC address used for Multicasts for the interface.
void SetNull()
Set the IP address value of an IPADDR6 object to null.
Definition ipv6_addr.h:288
bool IsMultiCast() const
Check if the IPADDR6 object contains a Multicast IP address the interface.
Definition ipv6_addr.h:132
bool IsNull() const
Check if the IP address is null.
Definition ipv6_addr.h:101
void SetFromUint32Shortcut(uint32_t w0, uint32_t w1, uint32_t w2, uint32_t w3)
Set the IP address value of an IPADDR6 object from 4 discrete uint32_t values.
Definition ipv6_addr.h:275
static IPADDR6 NullIP()
Static function to return a null IPADDR6 object.
void fdprint(int fd, bool bCompact=true, bool bShowV4Raw=false) const
Print the IP address to the specified file descriptor.
static IPADDR6 AsciiToIp6(const char *cp, bool bembed_v4addresses=true)
Static function to return an IPADDR6 object created from an ASCII value IPv4 or IPv6 address.
bool IsLoopBack() const
Check if the IP address is the loopback address for the interface.
Definition ipv6_addr.h:119
bool NotNull() const
Check if the IP address is not null.
Definition ipv6_addr.h:110
Used to store and manipulate MAC addresses.
Definition nettypes.h:69
NetBurner IPADDR4 Class. See the IPADDR4 Class page for complete documentation.