21 #ifndef IPV4_ADDRESS_H
22 #define IPV4_ADDRESS_H
26 #include "ns3/address.h"
27 #include "ns3/attribute-helper.h"
60 uint32_t
Get (
void)
const;
65 void Set (uint32_t address);
75 void Set (
char const *address);
83 return m_address == other.m_address;
105 void Print (std::ostream &os)
const;
192 Address ConvertTo (
void)
const;
193 static uint8_t GetType (
void);
242 uint32_t
Get (
void)
const;
247 void Set (uint32_t mask);
258 void Print (std::ostream &os)
const;
299 return (a.m_address == b.m_address);
301 inline bool operator != (
const Ipv4Address &a,
const Ipv4Address &b)
303 return (a.m_address != b.m_address);
305 inline bool operator < (
const Ipv4Address &a,
const Ipv4Address &b)
307 return (a.m_address < b.m_address);
static Ipv4Address Deserialize(const uint8_t buf[4])
std::istream & operator>>(std::istream &is, Angles &a)
static Ipv4Mask GetOnes(void)
static Ipv4Address GetAny(void)
bool IsMatch(Ipv4Address a, Ipv4Address b) const
a class to represent an Ipv4 address mask
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.
static Ipv4Mask GetZero(void)
bool IsBroadcast(void) const
void Serialize(uint8_t buf[4]) const
void Print(std::ostream &os) const
Print this address to the given output stream.
static bool IsMatchingType(const Address &address)
static Ipv4Address GetBroadcast(void)
#define ATTRIBUTE_HELPER_HEADER(type)
std::ostream & operator<<(std::ostream &os, const Angles &a)
bool IsEqual(const Ipv4Address &other) const
Comparison operation between two Ipv4Addresses.
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)
void Set(uint32_t address)
Ipv4 addresses are stored in host order in this class.
bool IsEqual(Ipv4Mask other) const
static Ipv4Address ConvertFrom(const Address &address)
uint32_t GetInverse(void) const
Return the inverse mask in host order.
uint16_t GetPrefixLength(void) const