A Discrete-Event Network Simulator
API
ns3::Mac64Address Class Reference

an EUI-64 address More...

#include "mac64-address.h"

Public Member Functions

 Mac64Address ()
 
 Mac64Address (const char *str)
 
void CopyFrom (const uint8_t buffer[8])
 
void CopyTo (uint8_t buffer[8]) const
 
 operator Address () const
 

Static Public Member Functions

static Mac64Address Allocate (void)
 Allocate a new Mac64Address. More...
 
static Mac64Address ConvertFrom (const Address &address)
 
static bool IsMatchingType (const Address &address)
 

Private Member Functions

Address ConvertTo (void) const
 

Static Private Member Functions

static uint8_t GetType (void)
 Return the Type of address. More...
 

Private Attributes

uint8_t m_address [8]
 address value More...
 

Friends

bool operator!= (const Mac64Address &a, const Mac64Address &b)
 Not equal to operator. More...
 
bool operator< (const Mac64Address &a, const Mac64Address &b)
 Less than operator. More...
 
std::ostream & operator<< (std::ostream &os, const Mac64Address &address)
 Stream insertion operator. More...
 
bool operator== (const Mac64Address &a, const Mac64Address &b)
 Equal to operator. More...
 
std::istream & operator>> (std::istream &is, Mac64Address &address)
 Stream extraction operator. More...
 

Detailed Description

an EUI-64 address

This class can contain 64 bit IEEE addresses.

See also
Mac64Address Attribute

Definition at line 43 of file mac64-address.h.

Constructor & Destructor Documentation

ns3::Mac64Address::Mac64Address ( )

Definition at line 60 of file mac64-address.cc.

References m_address, and NS_LOG_FUNCTION.

ns3::Mac64Address::Mac64Address ( const char *  str)
Parameters
stra string representing the new Mac64Address

The format of the string is "xx:xx:xx:xx:xx:xx"

Definition at line 65 of file mac64-address.cc.

References ASCII_a, ASCII_COLON, ASCII_ZERO, ns3::AsciiToLowCase(), m_address, NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Function Documentation

Mac64Address ns3::Mac64Address::Allocate ( void  )
static

Allocate a new Mac64Address.

Returns
newly allocated mac64Address

Definition at line 137 of file mac64-address.cc.

References first::address, m_address, and NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::LrWpanMac::LrWpanMac().

+ Here is the caller graph for this function:

Mac64Address ns3::Mac64Address::ConvertFrom ( const Address address)
static
Parameters
addressa polymorphic address
Returns
a new Mac64Address from the polymorphic address

This function performs a type check and asserts if the type of the input address is not compatible with an Mac64Address.

Definition at line 120 of file mac64-address.cc.

References ns3::Address::CheckCompatible(), ns3::Address::CopyTo(), GetType(), NS_ASSERT, and NS_LOG_FUNCTION.

Referenced by ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::Ipv6Interface::DoSetup(), ns3::SixLowPanNetDevice::MakeGlobalAddressFromMac(), ns3::SixLowPanNetDevice::MakeLinkLocalAddressFromMac(), ns3::Ipv6AddressHelper::NewAddress(), and ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Address ns3::Mac64Address::ConvertTo ( void  ) const
private
Returns
a new Address instance

Convert an instance of this class to a polymorphic Address instance.

Definition at line 130 of file mac64-address.cc.

References GetType(), m_address, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

void ns3::Mac64Address::CopyFrom ( const uint8_t  buffer[8])
Parameters
bufferaddress in network order

Copy the input address to our internal buffer.

Definition at line 97 of file mac64-address.cc.

References m_address, and NS_LOG_FUNCTION.

Referenced by ns3::ReadFrom().

+ Here is the caller graph for this function:

void ns3::Mac64Address::CopyTo ( uint8_t  buffer[8]) const
Parameters
bufferaddress in network order

Copy the internal address to the input buffer.

Definition at line 103 of file mac64-address.cc.

References m_address, and NS_LOG_FUNCTION.

Referenced by ns3::Ipv6Address::MakeAutoconfiguredAddress(), ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(), ns3::operator<<(), and ns3::WriteTo().

+ Here is the caller graph for this function:

uint8_t ns3::Mac64Address::GetType ( void  )
staticprivate

Return the Type of address.

Returns
type of address

Definition at line 154 of file mac64-address.cc.

References NS_LOG_FUNCTION_NOARGS, and ns3::Address::Register().

Referenced by ConvertFrom(), ConvertTo(), and IsMatchingType().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::Mac64Address::IsMatchingType ( const Address address)
static
Parameters
addressaddress to test
Returns
true if the address matches, false otherwise.

Definition at line 110 of file mac64-address.cc.

References ns3::Address::CheckCompatible(), GetType(), and NS_LOG_FUNCTION.

Referenced by ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::Ipv6Interface::DoSetup(), ns3::SixLowPanNetDevice::MakeGlobalAddressFromMac(), ns3::SixLowPanNetDevice::MakeLinkLocalAddressFromMac(), ns3::Ipv6AddressHelper::NewAddress(), and ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ns3::Mac64Address::operator Address ( ) const
Returns
a new Address instance

Convert an instance of this class to a polymorphic Address instance.

Definition at line 115 of file mac64-address.cc.

Friends And Related Function Documentation

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

Not equal to operator.

Parameters
athe first operand
bthe first operand
Returns
true if the operands are not equal

Definition at line 164 of file mac64-address.h.

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

Less than operator.

Parameters
athe first operand
bthe first operand
Returns
true if the operand a is less than operand b

Definition at line 168 of file mac64-address.h.

std::ostream& operator<< ( std::ostream &  os,
const Mac64Address address 
)
friend

Stream insertion operator.

Parameters
osthe stream
addressthe address
Returns
a reference to the stream

Definition at line 161 of file mac64-address.cc.

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

Equal to operator.

Parameters
athe first operand
bthe first operand
Returns
true if the operands are equal

Definition at line 160 of file mac64-address.h.

std::istream& operator>> ( std::istream &  is,
Mac64Address address 
)
friend

Stream extraction operator.

Parameters
isthe stream
addressthe address
Returns
a reference to the stream

Definition at line 179 of file mac64-address.cc.

Member Data Documentation

uint8_t ns3::Mac64Address::m_address[8]
private

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