21 #ifndef IPV4_ADDRESS_H
22 #define IPV4_ADDRESS_H
26 #include "ns3/address.h"
27 #include "ns3/attribute-helper.h"
62 uint32_t
Get (
void)
const;
67 void Set (uint32_t address);
77 void Set (
char const *address);
107 void Print (std::ostream &os)
const;
258 uint32_t
Get (
void)
const;
263 void Set (uint32_t mask);
274 void Print (std::ostream &os)
const;
Ipv4Mask()
Will initialize to a garbage value (0x66666666)
static Ipv4Address Deserialize(const uint8_t buf[4])
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
static Ipv4Mask GetOnes(void)
static Ipv4Address GetAny(void)
size_t operator()(Ipv4Address const &x) const
Returns the hash of the address.
friend bool operator<(Ipv4Address const &a, Ipv4Address const &b)
Less than operator.
bool IsMatch(Ipv4Address a, Ipv4Address b) const
a class to represent an Ipv4 address mask
uint32_t m_address
IPv4 address.
bool IsLocalMulticast(void) const
bool IsMulticast(void) const
Ipv4Address CombineMask(Ipv4Mask const &mask) const
Combine this address with a network mask.
Ipv4Address GetSubnetDirectedBroadcast(Ipv4Mask const &mask) const
Generate subnet-directed broadcast address corresponding to mask.
a polymophic address class
bool IsSubnetDirectedBroadcast(Ipv4Mask const &mask) const
Generate subnet-directed broadcast address corresponding to mask.
uint32_t Get(void) const
Get the host-order 32-bit IP address.
static Ipv4Mask GetZero(void)
bool IsBroadcast(void) const
void Serialize(uint8_t buf[4]) const
Serialize this address to a 4-byte buffer.
void Print(std::ostream &os) const
Print this address to the given output stream.
static bool IsMatchingType(const Address &address)
static Ipv4Address GetBroadcast(void)
bool operator<(const int64x64_t &lhs, const int64x64_t &rhs)
Less than operator.
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
bool operator!=(Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > a, Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > b)
Inequality test.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool IsEqual(const Ipv4Address &other) const
Comparison operation between two Ipv4Addresses.
void Set(uint32_t mask)
input mask is in host order.
static Ipv4Address GetZero(void)
static Ipv4Address GetLoopback(void)
void Print(std::ostream &os) const
Print this mask to the given output stream.
static Ipv4Mask GetLoopback(void)
Address ConvertTo(void) const
Convert to an Address type.
void Set(uint32_t address)
input address is in host order.
Ipv4 addresses are stored in host order in this class.
friend bool operator==(Ipv4Address const &a, Ipv4Address const &b)
Equal to operator.
bool IsEqual(Ipv4Mask other) const
bool operator==(const EventId &a, const EventId &b)
static uint8_t GetType(void)
Get the underlying address type (automatically assigned).
uint32_t Get(void) const
Get the host-order 32-bit IP mask.
friend bool operator!=(Ipv4Address const &a, Ipv4Address const &b)
Not equal to operator.
static Ipv4Address ConvertFrom(const Address &address)
uint32_t GetInverse(void) const
Return the inverse mask in host order.
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type.
uint16_t GetPrefixLength(void) const
Class providing an hash for IPv4 addresses.