14#include "ns3/attribute-helper.h"
15#include "ns3/attribute.h"
115 Address(uint8_t type,
const uint8_t* buffer, uint8_t len);
a polymophic address class
friend std::istream & operator>>(std::istream &is, Address &address)
Stream extraction operator.
uint32_t GetSerializedSize() const
Get the number of bytes needed to serialize the underlying Address Typically, this is GetLength () + ...
void Serialize(TagBuffer buffer) const
Serialize this address in host byte order to a byte buffer.
uint32_t CopyFrom(const uint8_t *buffer, uint8_t len)
friend std::ostream & operator<<(std::ostream &os, const Address &address)
Stream insertion operator.
static constexpr uint32_t MAX_SIZE
The maximum size of a byte buffer which can be stored in an Address instance.
uint8_t m_len
Length of the address.
uint8_t m_data[MAX_SIZE]
The address value.
uint8_t m_type
Type of the address.
Address & operator=(const Address &address)
Basic assignment operator.
Address()
Create an invalid address.
friend bool operator!=(const Address &a, const Address &b)
Not equal to operator.
uint32_t CopyAllFrom(const uint8_t *buffer, uint8_t len)
bool CheckCompatible(uint8_t type, uint8_t len) const
static uint8_t Register()
Allocate a new type id for a new type of address.
uint8_t GetLength() const
Get the length of the underlying address.
uint32_t CopyTo(uint8_t buffer[MAX_SIZE]) const
Copy the address bytes into a buffer.
void Deserialize(TagBuffer buffer)
friend bool operator<(const Address &a, const Address &b)
Less than operator.
bool IsMatchingType(uint8_t type) const
friend bool operator==(const Address &a, const Address &b)
Equal to operator.
uint32_t CopyAllTo(uint8_t *buffer, uint8_t len) const
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type
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)
std::ostream & operator<<(std::ostream &os, const Angles &a)
std::istream & operator>>(std::istream &is, Angles &a)
bool operator<(const EventId &a, const EventId &b)