|
| IP4Address () |
| Initialises new instance of IP4Address object
|
|
| IP4Address (sp2plib::UInt32 i4Adr) |
| Initialises new instance of IP4Address object with given address value (machine byte order int32)
|
|
| IP4Address (const char *s4Address) |
| Initialises new instance of IP4Address object with given human readable text address value
|
|
| ~IP4Address () |
| Clears all resources taken by IP4Address object
|
|
sp2plib::UInt32 | Get () |
| Gets address as Int32 value in machiine byte order
|
|
void | Set (sp2plib::UInt32 value) |
| Sets address value using Int32 value in machine byte order
|
|
void | Set (in_addr value) |
| Sets address value using in_addr [CPP:<netinet/in.h>/ W:<winsock2.h>] structure value
|
|
void | Parse (char *str_address) |
| Parses addess value from human readable string example "12.13.14.15"
|
|
void | ParseFromBytes (unsigned char *byte_array, int startIndex=0) |
| Parses addess value from byte array in machine order
|
|
::std::string | ToString () |
| Gets human readable presentation of address in format: d.d.d.d
|
|
void | ToByteArray (unsigned char *buffer, int startIndex=0) |
| Writes 4 address bytes to existing byte array starting from startIndex
|
|
void | As_sockaddr_in (sockaddr_in &adr, sp2plib::UInt16 Port) |
| Injects data from this object into sockaddr_in structure, also port value is passed as aux argument
|
|
IP4Address & | operator= (const IP4Address &rhs) |
| Assignment operator.
|
|
IP4Address & | operator= (const sp2plib::UInt32 &rhs) |
| Assignment operator.
|
|
bool | operator== (const IP4Address &other) const |
| Equality operator.
|
|
bool | operator!= (const IP4Address &other) const |
| Inequality operator.
|
|
sp2plib::IP4Address::IP4Address |
( |
| ) |
|
sp2plib::IP4Address::IP4Address |
( |
sp2plib::UInt32 |
i4Adr | ) |
|
Initialises new instance of IP4Address object with given address value (machine byte order int32)
- Parameters
-
i4Adr | Machine byte order addrress value |
sp2plib::IP4Address::IP4Address |
( |
const char * |
s4Address | ) |
|
Initialises new instance of IP4Address object with given human readable text address value
- Parameters
-
s4Address | Addess in human readable format 000.000.000.000 |
sp2plib::IP4Address::~IP4Address |
( |
| ) |
|
Gets IP address ANY coresponding to int32 value of 0 (ANY)
- Returns
- .
void sp2plib::IP4Address::As_sockaddr_in |
( |
sockaddr_in & |
adr, |
|
|
sp2plib::UInt16 |
Port |
|
) |
| |
Injects data from this object into sockaddr_in structure, also port value is passed as aux argument
- Parameters
-
adr | sockaddr_in address object |
Port | Port |
sp2plib::UInt32 sp2plib::IP4Address::Get |
( |
| ) |
|
Gets address as Int32 value in machiine byte order
- Returns
- Machine byte order addrress value
static bool sp2plib::IP4Address::IsIP4AddressFormat |
( |
const char * |
s_adr | ) |
|
|
static |
Checks it given string is IP 4 address in humar readable text format
- Parameters
-
s_adr | Human readable address string to check |
- Returns
- true if IP 4 address format, false if not.
static IP4Address* sp2plib::IP4Address::new_Parse |
( |
char * |
str_address | ) |
|
|
static |
Creates IP4Address object from human readable string example : IP4Address *adr = IP4Address::new_Parse("12.13.14.15");
- Parameters
-
str_address | Addess in human readable format 000.000.000.000 |
- Returns
- null if it fails, else new IP4address object
static IP4Address* sp2plib::IP4Address::new_ParseFromBytes |
( |
unsigned char * |
byte_array, |
|
|
int |
startIndex = 0 |
|
) |
| |
|
static |
Creates IP4Address object from byte array
char b_adr[4] = {0x0C,0x0D,0x0E,0x0F}; IP4Address *adr = IP4Address::new_ParseFromBytes(b_adr);
- Parameters
-
byte_array | Byte array holding address bytes |
startIndex | (optional) the start index from whict to start parsing |
- Returns
- null if it fails, else new IP4Adddress object
bool sp2plib::IP4Address::operator!= |
( |
const IP4Address & |
other | ) |
const |
Inequality operator.
- Parameters
-
- Returns
- true if the parameters are not considered equivalent.
Assignment operator.
- Parameters
-
- Returns
- A shallow copy of this object.
IP4Address& sp2plib::IP4Address::operator= |
( |
const sp2plib::UInt32 & |
rhs | ) |
|
Assignment operator.
- Parameters
-
- Returns
- A shallow copy of this object.
bool sp2plib::IP4Address::operator== |
( |
const IP4Address & |
other | ) |
const |
Equality operator.
- Parameters
-
- Returns
- true if the parameters are considered equivalent.
void sp2plib::IP4Address::Parse |
( |
char * |
str_address | ) |
|
Parses addess value from human readable string example "12.13.14.15"
- Parameters
-
str_address | Addess in human readable format 000.000.000.000. |
void sp2plib::IP4Address::ParseFromBytes |
( |
unsigned char * |
byte_array, |
|
|
int |
startIndex = 0 |
|
) |
| |
Parses addess value from byte array in machine order
- Parameters
-
byte_array | Byte array holding address bytes. |
startIndex | (optional) the start index from whict to start parsing. |
void sp2plib::IP4Address::Set |
( |
sp2plib::UInt32 |
value | ) |
|
Sets address value using Int32 value in machine byte order
- Parameters
-
value | Machine byte order addrress value |
void sp2plib::IP4Address::Set |
( |
in_addr |
value | ) |
|
Sets address value using in_addr [CPP:<netinet/in.h>/ W:<winsock2.h>] structure value
- Parameters
-
value | Sets value from in_addr object |
void sp2plib::IP4Address::ToByteArray |
( |
unsigned char * |
buffer, |
|
|
int |
startIndex = 0 |
|
) |
| |
Writes 4 address bytes to existing byte array starting from startIndex
- Parameters
-
buffer | Byte array to store address bytes to |
startIndex | (optional) the start index from whict to start writing |
::std::string sp2plib::IP4Address::ToString |
( |
| ) |
|
Gets human readable presentation of address in format: d.d.d.d
The documentation for this class was generated from the following file: