NetBurner 3.5.0
PDF Version |
|
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 |
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.
|
default |
void IPADDR4::fdprint | ( | int | fd | ) | const |
Print an IPv4 address to the specified file descriptor.
fd | File descriptor used to send IP address |
|
inline |
Check if the IPADDR4 object contains an AutoIP address.
true | if the IP address value is an AutoIP address |
|
inline |
Check if the IPADDR4 object contains a global broadcast address: 255.255.255.255.
true | if the IP address value is a global broadcast |
|
inline |
Check if the IP address is the loopback address for the interface.
true | if the IP address value is the loopback address |
|
inline |
Check if the IPADDR4 object contains a mDNS IP address the interface.
true | if the IP address value is a mDNS address |
|
inline |
Check if the IPADDR4 object contains a Multicast IP address the interface.
true | if the IP address value is a Multicast address |
|
inline |
|
inline |
void IPADDR4::SetFromAscii | ( | const char * | cp | ) |
Set the IPv4 address from a character string.
cp | Character string. For example, "192.168.1.10" |
int IPADDR4::sprintf | ( | char * | cp, |
int | maxl ) const |
sprintf an IPv4 address to the specified buffer
cp | Destination character buffer |
maxl | Maximum number of characters |