friendev EtherDune TCP/IP library
Public Member Functions | Public Attributes | List of all members
IPAddress Union Reference

represents an IP address in memory More...

#include <inet.h>

Public Member Functions

void operator= (IPAddress_P_ *ip)
 Assigns from an IP address stored in PROGMEM More...
 
void operator= (IPAddress_P_ &ip)
 Assigns from an IP address stored in memory More...
 
void zero ()
 Sets the IP address to zero. More...
 
void setBroadcastIP ()
 Sets the IP to 255.255.255.255 More...
 
char * toString () const
 Converts the IP address to a string for display. More...
 

Public Attributes

uint8_t b [4]
 byte-wise access to IP address More...
 
uint32_t u
 access the IP as a uint32_t for convenience More...
 

Detailed Description

represents an IP address in memory

Definition at line 181 of file inet.h.

Member Function Documentation

void IPAddress::operator= ( IPAddress_P_ ip)
inline

Assigns from an IP address stored in PROGMEM

Parameters
ipThe ip.

Definition at line 190 of file inet.h.

void IPAddress::operator= ( IPAddress_P_ ip)
inline

Assigns from an IP address stored in memory

Parameters
ipThe ip.

Definition at line 199 of file inet.h.

void IPAddress::setBroadcastIP ( )
inline

Sets the IP to 255.255.255.255

Definition at line 215 of file inet.h.

char* IPAddress::toString ( ) const
inline

Converts the IP address to a string for display.

Returns
string representing the IP address

**Warning** if this function is used anywhere in your code, it will permanently allocate 16 bytes of RAM. It is recommended you only use it for debugging purposes.

Definition at line 227 of file inet.h.

void IPAddress::zero ( )
inline

Sets the IP address to zero.

Definition at line 207 of file inet.h.

Member Data Documentation

uint8_t IPAddress::b[4]

byte-wise access to IP address

Definition at line 183 of file inet.h.

uint32_t IPAddress::u

access the IP as a uint32_t for convenience

Definition at line 184 of file inet.h.


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