19 #ifndef MAC16_ADDRESS_H
20 #define MAC16_ADDRESS_H
25 #include "ns3/attribute-helper.h"
26 #include "ns3/attribute.h"
66 void CopyFrom(
const uint8_t buffer[2]);
73 void CopyTo(uint8_t buffer[2])
const;
a polymophic address class
Describes an IPv6 address.
This class can contain 16 bit addresses.
friend bool operator<(const Mac16Address &a, const Mac16Address &b)
Less than operator.
static Mac16Address GetMulticast(Ipv6Address address)
Returns the multicast address associated with an IPv6 address according to RFC 4944 Section 9.
static bool IsMatchingType(const Address &address)
static uint64_t m_allocationIndex
Address allocation index.
friend bool operator!=(const Mac16Address &a, const Mac16Address &b)
Not equal to operator.
friend std::ostream & operator<<(std::ostream &os, const Mac16Address &address)
Stream insertion operator.
static Mac16Address ConvertFrom(const Address &address)
uint16_t ConvertToInt() const
void CopyTo(uint8_t buffer[2]) const
friend bool operator==(const Mac16Address &a, const Mac16Address &b)
Equal to operator.
static Mac16Address Allocate()
Allocate a new Mac16Address.
friend std::istream & operator>>(std::istream &is, Mac16Address &address)
Stream extraction operator.
Address ConvertTo() const
void CopyFrom(const uint8_t buffer[2])
bool IsMulticast() const
Checks if the address is a multicast address according to RFC 4944 Section 9 (i.e....
uint8_t m_address[2]
Address value.
static void ResetAllocationIndex()
Reset the Mac16Address allocation index.
static Mac16Address GetBroadcast()
bool IsBroadcast() const
Checks if the address is a broadcast address according to 802.15.4 scheme (i.e., 0xFFFF).
static uint8_t GetType()
Return the Type of address.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator!=(Callback< R, Args... > a, Callback< R, Args... > b)
Inequality test.
bool operator==(const EventId &a, const EventId &b)
ATTRIBUTE_HELPER_HEADER(ValueClassTest)
bool operator<(const EventId &a, const EventId &b)
std::istream & operator>>(std::istream &is, Angles &a)
std::ostream & operator<<(std::ostream &os, const Angles &a)