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");
185 return memcmp (a.
m_oi, b.
m_oi, 3) == 0;
190 return (memcmp (a.
m_oi, b.
m_oi, 4) == 0)
191 && ((a.
m_oi[4] & 0xf0) == (b.
m_oi[4] & 0xf0));
227 for (
int i = 0; i < oi.
m_type; i++)
229 os <<
"0x" << std::hex << static_cast<int> (oi.
m_oi[i]) <<
" ";
278 static TypeId tid =
TypeId (
"ns3::VendorSpecificActionHeader")
280 .SetGroupName (
"Wave")
305 os <<
"VendorSpecificActionHeader[ "
306 <<
"category = 0x" << std::hex << (int)
m_category
307 <<
"organization identifier = " <<
m_oi
357 NS_LOG_WARN (
"there is already a VsaCallback registered for OrganizationIdentifier " << oi);
a polymophic address class
iterator in a Buffer instance
the organization identifier is a public organizationally unique identifier assigned by the IEEE.
OrganizationIdentifierType
OrganizationIdentifierType enumeration.
uint32_t GetSerializedSize(void) const
Get serialized size.
OrganizationIdentifier & operator=(const OrganizationIdentifier &oi)
Assignment operator.
OrganizationIdentifier(void)
enum OrganizationIdentifierType m_type
OI type.
enum OrganizationIdentifierType GetType(void) const
void Serialize(Buffer::Iterator start) const
Serialize to buffer.
virtual ~OrganizationIdentifier(void)
uint32_t Deserialize(Buffer::Iterator start)
Deserialize from buffer.
uint8_t GetManagementId(void) const
uint8_t m_oi[5]
organization identifier
void SetType(enum OrganizationIdentifierType type)
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
void RegisterVscCallback(OrganizationIdentifier oi, VscCallback cb)
bool IsVscCallbackRegistered(OrganizationIdentifier &oi)
VendorSpecificContentManager(void)
VscCallback FindVscCallback(OrganizationIdentifier &oi)
std::map< OrganizationIdentifier, VscCallback >::iterator VscCallbacksI
VSC callback iterator typedef.
void DeregisterVscCallback(OrganizationIdentifier &oi)
VscCallbacks m_callbacks
VSC callbacks.
virtual ~VendorSpecificContentManager(void)
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_FATAL_ERROR_NO_MSG()
Report a fatal error and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static VscCallback null_callback
VSC callback function.
static std::vector< OrganizationIdentifier > OrganizationIdentifiers
the OIs
bool operator==(const EventId &a, const EventId &b)
ATTRIBUTE_HELPER_CPP(Length)
bool operator<(const EventId &a, const EventId &b)
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.
std::istream & operator>>(std::istream &is, Angles &a)
std::ostream & operator<<(std::ostream &os, const Angles &a)
static const uint8_t CATEGORY_OF_VSA
see IEEE 802.11-2007 chapter 7.3.1.11 Table 7-24—Category values