NetServices Stack source

Dependents:   HelloWorld ServoInterfaceBoardExample1 4180_Lab4

Embed: (wiki syntax)

« Back to documentation index

IpAddr Class Reference

IpAddr Class Reference

IP Address container. More...

#include <ipaddr.h>

Public Member Functions

 IpAddr (uint8_t ip0, uint8_t ip1, uint8_t ip2, uint8_t ip3)
 Initializes IP address with provided values.
 IpAddr ()
 Initializes IP address with null values.
uint8_t operator[] (unsigned int i) const
 Returns IP address byte #.
bool isEq (const IpAddr &b) const
 Compares too addresses.
bool operator== (const IpAddr &b) const
 Compares too addresses.
bool operator!= (const IpAddr &b) const
 Compares too addresses.
bool isNull () const
 Checks whether the address is null.
bool isBroadcast () const
 Checks whether the address is a broadcast address.
bool isMulticast () const
 Checks whether the address is a multicast address.

Detailed Description

IP Address container.

This class is a container for an IPv4 address.

Definition at line 38 of file ipaddr.h.


Constructor & Destructor Documentation

IpAddr ( uint8_t  ip0,
uint8_t  ip1,
uint8_t  ip2,
uint8_t  ip3 
)

Initializes IP address with provided values.

Definition at line 40 of file ipaddr.cpp.

IpAddr (  )

Initializes IP address with null values.

Definition at line 50 of file ipaddr.cpp.


Member Function Documentation

bool isBroadcast (  ) const

Checks whether the address is a broadcast address.

Returns:
true if the address is a broadcast address

Definition at line 96 of file ipaddr.cpp.

bool isEq ( const IpAddr b ) const

Compares too addresses.

Returns:
true if the two addresses are equal

Definition at line 76 of file ipaddr.cpp.

bool isMulticast (  ) const

Checks whether the address is a multicast address.

Returns:
true if the address is a multicast address

Definition at line 101 of file ipaddr.cpp.

bool isNull (  ) const

Checks whether the address is null.

Returns:
true if the address is null

Definition at line 91 of file ipaddr.cpp.

bool operator!= ( const IpAddr b ) const

Compares too addresses.

Returns:
true if the two addresses are different

Definition at line 86 of file ipaddr.cpp.

bool operator== ( const IpAddr b ) const

Compares too addresses.

Returns:
true if the two addresses are equal

Definition at line 81 of file ipaddr.cpp.

uint8_t operator[] ( unsigned int  i ) const

Returns IP address byte #.

Definition at line 68 of file ipaddr.cpp.