NetBurner 3.5.0
PDF Version
 
IPADDR4 Class Reference

Used to store and manipulate IPv4 addresses in dual stack mode. More...

#include <nettypes.h>

Public Member Functions

 IPADDR4 ()=default
 Constructor to create an IPv4 object initialized to null.
 
 IPADDR4 (const IPADDR4 &v)=default
 Constructor to create an IPv4 object initialized to to the specified IPADDR4 IP address.
 
bool IsNull () const
 Check if the IP address is null.
 
bool NotNull () const
 Check if the IP address is not null.
 
void SetNull ()
 Set the IP address to null.
 
bool IsLoopBack () const
 Check if the IP address is the loopback address for the interface.
 
bool IsMultiCast () const
 Check if the IPADDR4 object contains a Multicast IP address the interface.
 
bool IsmDns ()
 Check if the IPADDR4 object contains a mDNS IP address the interface.
 
bool IsGlobalBroadCast () const
 Check if the IPADDR4 object contains a global broadcast address: 255.255.255.255.
 
bool IsAutoIP ()
 Check if the IPADDR4 object contains an AutoIP address.
 
void print () const
 Print an IPv4 address to the stdout serial port.
 
void fdprint (int fd) const
 Print an IPv4 address to the specified file descriptor.
 
int sprintf (char *cp, int maxl) const
 sprintf an IPv4 address to the specified buffer
 
void SetFromAscii (const char *cp)
 Set the IPv4 address from a character string.
 

Static Public Member Functions

static IPADDR4 NullIP ()
 C++ static function for a null IP address.
 
static IPADDR4 GlobalBroadCast ()
 C++ static function for a global broadcast IP address.
 

Friends

class CUR_IPADDR4
 

Detailed Description

Used to store and manipulate IPv4 addresses in dual stack mode.

It is recommended to use the IPADDR object, which can hold either an IPv4 or IPv6 address, rather than explicitly specifying IPv4.

Constructor & Destructor Documentation

◆ IPADDR4()

IPADDR4::IPADDR4 ( const IPADDR4 & v)
default

Constructor to create an IPv4 object initialized to to the specified IPADDR4 IP address.

Parameters
vIPADDR4 object used for initialization.

Member Function Documentation

◆ fdprint()

void IPADDR4::fdprint ( int fd) const

Print an IPv4 address to the specified file descriptor.

Parameters
fdFile descriptor used to send IP address

◆ IsAutoIP()

bool IPADDR4::IsAutoIP ( )
inline

Check if the IPADDR4 object contains an AutoIP address.

Return values
trueif the IP address value is an AutoIP address
See also
IsLoopBack(), IsLinkLocal()

◆ IsGlobalBroadCast()

bool IPADDR4::IsGlobalBroadCast ( ) const
inline

Check if the IPADDR4 object contains a global broadcast address: 255.255.255.255.

Return values
trueif the IP address value is a global broadcast
See also
IsLoopBack(), IsLinkLocal()

◆ IsLoopBack()

bool IPADDR4::IsLoopBack ( ) const
inline

Check if the IP address is the loopback address for the interface.

Return values
trueif the IP address value is the loopback address
See also
IsMultiCast(), IsLinkLocal()

◆ IsmDns()

bool IPADDR4::IsmDns ( )
inline

Check if the IPADDR4 object contains a mDNS IP address the interface.

Return values
trueif the IP address value is a mDNS address
See also
IsLoopBack(), IsLinkLocal()

◆ IsMultiCast()

bool IPADDR4::IsMultiCast ( ) const
inline

Check if the IPADDR4 object contains a Multicast IP address the interface.

Return values
trueif the IP address value is a Multicast address
See also
IsLoopBack(), IsLinkLocal()

◆ IsNull()

bool IPADDR4::IsNull ( ) const
inline

Check if the IP address is null.

Return values
trueif the IP address value is null
See also
NotNull(), SetNull()

◆ NotNull()

bool IPADDR4::NotNull ( ) const
inline

Check if the IP address is not null.

Return values
trueif the IP address value is not null
See also
IsNull(), SetNull()

◆ SetFromAscii()

void IPADDR4::SetFromAscii ( const char * cp)

Set the IPv4 address from a character string.

Parameters
cpCharacter string. For example, "192.168.1.10"

◆ SetNull()

void IPADDR4::SetNull ( )
inline

Set the IP address to null.

See also
IsNull(), NotNull()

◆ sprintf()

int IPADDR4::sprintf ( char * cp,
int maxl ) const

sprintf an IPv4 address to the specified buffer

Parameters
cpDestination character buffer
maxlMaximum number of characters
Returns
Number of characters

The documentation for this class was generated from the following file: