23 #include "ns3/assert.h"
39 std::memset (
m_oi, 0, 5);
48 std::memcpy (
m_oi, str, length);
53 std::memcpy (
m_oi, str, length);
58 NS_FATAL_ERROR (
"cannot support organization identifier with length=" << length);
66 std::memcpy (this->
m_oi, oi.
m_oi, 5);
80 return (
m_oi[4] & 0x0f);
140 if ((i->m_type ==
OUI24)
141 && (std::memcmp (i->m_oi,
m_oi, 3) == 0 ))
152 if ((i->m_type ==
OUI36)
153 && (std::memcmp (i->m_oi,
m_oi, 4) == 0 ))
156 if ((i->m_oi[4] & 0xf0) == (
m_oi[4] & 0xf0))
166 NS_FATAL_ERROR (
"cannot deserialize the organization identifier field successfully");
179 return memcmp (a.
m_oi, b.
m_oi, 3) == 0;
184 return (memcmp (a.
m_oi, b.
m_oi, 4) == 0)
185 && ((a.
m_oi[4] & 0xf0) == (b.
m_oi[4] & 0xf0));
203 for (
int i = 0; i < oi.
m_type; i++)
205 os <<
"0x" << std::hex << static_cast<int> (oi.
m_oi[i]) <<
" ";
248 static TypeId tid =
TypeId (
"ns3::VendorSpecificActionHeader")
250 .AddConstructor<VendorSpecificActionHeader> ()
274 os <<
"VendorSpecificActionHeader[ "
275 <<
"category = 0x" << std::hex << (int)
m_category
276 <<
"organization identifier = " <<
m_oi
void Serialize(Buffer::Iterator start) const
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
virtual ~VendorSpecificContentManager(void)
uint32_t GetSerializedSize(void) const
#define NS_LOG_FUNCTION(parameters)
void RegisterVscCallback(OrganizationIdentifier oi, VscCallback cb)
#define NS_FATAL_ERROR_NO_MSG()
fatal error handling
VendorSpecificContentManager(void)
uint32_t Deserialize(Buffer::Iterator start)
#define NS_ASSERT(condition)
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
bool operator<(const Room &a, const Room &b)
OrganizationIdentifier(void)
#define NS_FATAL_ERROR(msg)
fatal error handling
void SetType(enum OrganizationIdentifierType type)
iterator in a Buffer instance
a polymophic address class
void DeregisterVscCallback(OrganizationIdentifier &oi)
enum OrganizationIdentifierType GetType() const
the organization identifier is a public organizationally unique identifier assigned by the IEEE...
NS_LOG_COMPONENT_DEFINE("VendorSpecificAction")
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.
virtual ~OrganizationIdentifier(void)
void Read(uint8_t *buffer, uint32_t size)
OrganizationIdentifier & operator=(const OrganizationIdentifier &oi)
VscCallback FindVscCallback(OrganizationIdentifier &oi)
static const uint8_t CATEGORY_OF_VSA
see IEEE 802.11-2007 chapter 7.3.1.11 Table 7-24—Category values
static VscCallback null_callback
void WriteU8(uint8_t data)
static std::vector< OrganizationIdentifier > OrganizationIdentifiers
bool operator==(const EventId &a, const EventId &b)
OrganizationIdentifierType
void Write(uint8_t const *buffer, uint32_t size)
uint8_t GetManagementId(void) const
ATTRIBUTE_HELPER_CPP(ObjectFactory)
a unique identifier for an interface.
enum OrganizationIdentifierType m_type
TypeId SetParent(TypeId tid)
std::map< OrganizationIdentifier, VscCallback >::iterator VscCallbacksI