Ipv4 addresses are stored in host order in this class.
More...
#include <ipv4-address.h>
List of all members.
Detailed Description
Ipv4 addresses are stored in host order in this class.
Constructor & Destructor Documentation
ns3::Ipv4Address::Ipv4Address |
( |
uint32_t |
address |
) |
[explicit] |
input address is in host order.
- Parameters:
-
| address | The host order 32-bit address |
ns3::Ipv4Address::Ipv4Address |
( |
char const * |
address |
) |
|
Constructs an Ipv4Address by parsing a the input C-string.
Input address is in format: hhh.xxx.xxx.lll where h is the high byte and l the low byte
- Parameters:
-
| address | C-string containing the address as described above |
Member Function Documentation
Combine this address with a network mask.
This method returns an IPv4 address that is this address combined (bitwise and) with a network mask, yielding an IPv4 network address.
- Parameters:
-
static Ipv4Address ns3::Ipv4Address::Deserialize |
( |
const uint8_t |
buf[4] |
) |
[static] |
- Parameters:
-
| buf | buffer to read address from |
- Returns:
- an Ipv4Address
The input address is expected to be in network byte order format.
uint32_t ns3::Ipv4Address::Get |
( |
void |
|
) |
const |
Get the host-order 32-bit IP address
- Returns:
- the host-order 32-bit IP address
Generate subnet-directed broadcast address corresponding to mask.
The subnet-directed broadcast address has the host bits set to all ones.
- Parameters:
-
bool ns3::Ipv4Address::IsEqual |
( |
const Ipv4Address & |
other |
) |
const [inline] |
Comparison operation between two Ipv4Addresses.
- Parameters:
-
| other | address to which to compare this address |
- Returns:
- True if the addresses are equal. False otherwise.
void ns3::Ipv4Address::Print |
( |
std::ostream & |
os |
) |
const |
Print this address to the given output stream.
The print format is in the typical "192.168.1.1"
- Parameters:
-
| os | The output stream to which this Ipv4Address is printed |
void ns3::Ipv4Address::Serialize |
( |
uint8_t |
buf[4] |
) |
const |
Serialize this address to a 4-byte buffer
- Parameters:
-
| buf | output buffer to which this address gets overwritten with this Ipv4Address |
void ns3::Ipv4Address::Set |
( |
char const * |
address |
) |
|
Sets an Ipv4Address by parsing a the input C-string.
Input address is in format: hhh.xxx.xxx.lll where h is the high byte and l the low byte
- Parameters:
-
| address | C-string containing the address as described above |
void ns3::Ipv4Address::Set |
( |
uint32_t |
address |
) |
|
input address is in host order.
- Parameters:
-
| address | The host order 32-bit address |
The documentation for this class was generated from the following file: