A Discrete-Event Network Simulator
API
Public Types | Public Member Functions | Private Attributes | Friends | List of all members
ns3::OrganizationIdentifier Class Reference

the organization identifier is a public organizationally unique identifier assigned by the IEEE. More...

#include "vendor-specific-action.h"

Public Types

enum  OrganizationIdentifierType { OUI24 = 3, OUI36 = 5, Unknown = 0 }
 OrganizationIdentifierType enumeration. More...
 

Public Member Functions

 OrganizationIdentifier (void)
 
 OrganizationIdentifier (const uint8_t *str, uint32_t length)
 Constructor. More...
 
virtual ~OrganizationIdentifier (void)
 
uint32_t Deserialize (Buffer::Iterator start)
 Deserialize from buffer. More...
 
uint8_t GetManagementId (void) const
 
uint32_t GetSerializedSize (void) const
 Get serialized size. More...
 
enum OrganizationIdentifierType GetType (void) const
 
bool IsNull (void) const
 
OrganizationIdentifieroperator= (const OrganizationIdentifier &oi)
 assignment operator More...
 
void Serialize (Buffer::Iterator start) const
 Serialize to buffer. More...
 
void SetType (enum OrganizationIdentifierType type)
 

Private Attributes

uint8_t m_oi [5]
 organization identifier More...
 
enum OrganizationIdentifierType m_type
 OI type. More...
 

Friends

bool operator!= (const OrganizationIdentifier &a, const OrganizationIdentifier &b)
 inequality operator More...
 
bool operator< (const OrganizationIdentifier &a, const OrganizationIdentifier &b)
 less than operator More...
 
std::ostream & operator<< (std::ostream &os, const OrganizationIdentifier &oi)
 output operator More...
 
bool operator== (const OrganizationIdentifier &a, const OrganizationIdentifier &b)
 equality operator More...
 
std::istream & operator>> (std::istream &is, const OrganizationIdentifier &oi)
 input operator More...
 

Detailed Description

the organization identifier is a public organizationally unique identifier assigned by the IEEE.

Similar to protocol field of data packets that indicates which entity of higher layer should handle received packets, Organization Identifier field is used in Vendor Specific Action frames to indicate which entity or higher layer should handle vendor specific content. Normally the value is assigned by IEEE and the length of field is either 24 bits or 36 bits. For more, see IEEE802.11p-2010 section 7.3.1.31 and 7.4.5

See also
OrganizationIdentifier Attribute

Definition at line 53 of file vendor-specific-action.h.

Member Enumeration Documentation

◆ OrganizationIdentifierType

OrganizationIdentifierType enumeration.

Enumerator
OUI24 
OUI36 
Unknown 

Definition at line 69 of file vendor-specific-action.h.

Constructor & Destructor Documentation

◆ OrganizationIdentifier() [1/2]

ns3::OrganizationIdentifier::OrganizationIdentifier ( void  )

Definition at line 34 of file vendor-specific-action.cc.

References m_oi, m_type, NS_LOG_FUNCTION, and Unknown.

◆ OrganizationIdentifier() [2/2]

ns3::OrganizationIdentifier::OrganizationIdentifier ( const uint8_t *  str,
uint32_t  length 
)

Constructor.

Parameters
stridentifier name
lengthidentifier length

Definition at line 42 of file vendor-specific-action.cc.

References m_oi, m_type, NS_FATAL_ERROR, NS_LOG_FUNCTION, OUI24, OUI36, and Unknown.

◆ ~OrganizationIdentifier()

ns3::OrganizationIdentifier::~OrganizationIdentifier ( void  )
virtual

Definition at line 70 of file vendor-specific-action.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ Deserialize()

uint32_t ns3::OrganizationIdentifier::Deserialize ( Buffer::Iterator  start)

Deserialize from buffer.

Parameters
startthe iterator
Returns
the deserialize size

Definition at line 133 of file vendor-specific-action.cc.

References m_oi, m_type, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::OrganizationIdentifiers, OUI24, OUI36, and visualizer.core::start().

Referenced by ns3::VendorSpecificActionHeader::Deserialize().

◆ GetManagementId()

uint8_t ns3::OrganizationIdentifier::GetManagementId ( void  ) const
Returns
last 4 bits when OrganizationIdentifier is OUI36

Definition at line 76 of file vendor-specific-action.cc.

References m_oi, m_type, NS_ASSERT, NS_LOG_FUNCTION, and OUI36.

Referenced by ns3::VsaManager::ReceiveVsc().

◆ GetSerializedSize()

uint32_t ns3::OrganizationIdentifier::GetSerializedSize ( void  ) const

Get serialized size.

Returns
the serialized size

Definition at line 91 of file vendor-specific-action.cc.

References m_type, NS_FATAL_ERROR_NO_MSG, NS_LOG_FUNCTION, OUI24, OUI36, and Unknown.

Referenced by ns3::VendorSpecificActionHeader::GetSerializedSize(), and Serialize().

◆ GetType()

enum OrganizationIdentifier::OrganizationIdentifierType ns3::OrganizationIdentifier::GetType ( void  ) const
Returns
whether this OrganizationIdentifier is OUI24 or OUI36.

Definition at line 115 of file vendor-specific-action.cc.

References m_type, and NS_LOG_FUNCTION.

◆ IsNull()

bool ns3::OrganizationIdentifier::IsNull ( void  ) const
Returns
whether current OrganizationIdentifier is initial state

Definition at line 84 of file vendor-specific-action.cc.

References m_type, NS_LOG_FUNCTION, and Unknown.

Referenced by ns3::VsaManager::SendVsa(), and ns3::WaveNetDevice::StartVsa().

◆ operator=()

OrganizationIdentifier & ns3::OrganizationIdentifier::operator= ( const OrganizationIdentifier oi)

assignment operator

Definition at line 63 of file vendor-specific-action.cc.

References m_oi, and m_type.

◆ Serialize()

void ns3::OrganizationIdentifier::Serialize ( Buffer::Iterator  start) const

Serialize to buffer.

Parameters
startthe iterator

Definition at line 122 of file vendor-specific-action.cc.

References GetSerializedSize(), m_oi, NS_LOG_FUNCTION, and visualizer.core::start().

Referenced by ns3::VendorSpecificActionHeader::Serialize().

◆ SetType()

void ns3::OrganizationIdentifier::SetType ( enum OrganizationIdentifierType  type)
Parameters
typeset the type of current OrganizationIdentifier

Definition at line 108 of file vendor-specific-action.cc.

References m_type, and NS_LOG_FUNCTION.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const OrganizationIdentifier a,
const OrganizationIdentifier b 
)
friend

inequality operator

Parameters
aleft side object
bright side object
Returns
true if not equal

Definition at line 203 of file vendor-specific-action.cc.

◆ operator<

bool operator< ( const OrganizationIdentifier a,
const OrganizationIdentifier b 
)
friend

less than operator

Parameters
aleft side object
bright side object
Returns
true if a < b

Definition at line 214 of file vendor-specific-action.cc.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const OrganizationIdentifier oi 
)
friend

output operator

Parameters
osoutput stream
oiorganization identifier
Returns
output stream

Definition at line 225 of file vendor-specific-action.cc.

◆ operator==

bool operator== ( const OrganizationIdentifier a,
const OrganizationIdentifier b 
)
friend

equality operator

Parameters
aleft side object
bright side object
Returns
true if equal

Definition at line 176 of file vendor-specific-action.cc.

◆ operator>>

std::istream& operator>> ( std::istream &  is,
const OrganizationIdentifier oi 
)
friend

input operator

Parameters
isinput stream
oiorganization identifier
Returns
input stream

Definition at line 241 of file vendor-specific-action.cc.

Member Data Documentation

◆ m_oi

uint8_t ns3::OrganizationIdentifier::m_oi[5]
private

◆ m_type

enum OrganizationIdentifierType ns3::OrganizationIdentifier::m_type
private

The documentation for this class was generated from the following files: