ns-3
ns3::Mac48Address Class Reference

an EUI-48 address More...

#include <mac48-address.h>

List of all members.

Public Member Functions

 Mac48Address (const char *str)
void CopyFrom (const uint8_t buffer[6])
void CopyTo (uint8_t buffer[6]) const
 operator Address () const
bool IsBroadcast (void) const
bool IsGroup (void) const

Static Public Member Functions

static Mac48Address ConvertFrom (const Address &address)
static bool IsMatchingType (const Address &address)
static Mac48Address Allocate (void)
static Mac48Address GetBroadcast (void)
static Mac48Address GetMulticast (Ipv4Address address)
static Mac48Address GetMulticast (Ipv6Address address)
 Get multicast address from IPv6 address.
static Mac48Address GetMulticastPrefix (void)
static Mac48Address GetMulticast6Prefix (void)
 Get the multicast prefix for IPv6 (33:33:00:00:00:00).

Friends

bool operator< (const Mac48Address &a, const Mac48Address &b)
bool operator== (const Mac48Address &a, const Mac48Address &b)
bool operator!= (const Mac48Address &a, const Mac48Address &b)
std::istream & operator>> (std::istream &is, Mac48Address &address)

Detailed Description

an EUI-48 address

This class can contain 48 bit IEEE addresses.


Constructor & Destructor Documentation

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

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

References NS_ASSERT.


Member Function Documentation

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

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

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

Referenced by ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::BridgeNetDevice::AddBridgePort(), ns3::MeshPointDevice::AddInterface(), ns3::dot11s::PeerManagementProtocol::Install(), ns3::dot11s::HwmpProtocol::Install(), ns3::flame::FlameProtocol::Install(), ns3::Ipv6AddressHelper::NewAddress(), ns3::Ipv6L3Protocol::RemoveAutoconfiguredAddress(), ns3::MeshHelper::Report(), ns3::LoopbackNetDevice::Send(), ns3::SimpleNetDevice::Send(), ns3::WifiNetDevice::Send(), ns3::MeshPointDevice::Send(), ns3::WimaxNetDevice::Send(), ns3::LoopbackNetDevice::SendFrom(), ns3::SimpleNetDevice::SendFrom(), ns3::MeshPointDevice::SendFrom(), ns3::BridgeNetDevice::SendFrom(), ns3::WifiNetDevice::SendFrom(), ns3::AlohaNoackNetDevice::SendFrom(), ns3::EmuNetDevice::SendFrom(), ns3::WimaxNetDevice::SendFrom(), ns3::CsmaNetDevice::SendFrom(), ns3::LoopbackNetDevice::SetAddress(), ns3::LteNetDevice::SetAddress(), ns3::SimpleNetDevice::SetAddress(), ns3::WifiNetDevice::SetAddress(), ns3::BridgeNetDevice::SetAddress(), ns3::MeshPointDevice::SetAddress(), ns3::EmuNetDevice::SetAddress(), ns3::PointToPointNetDevice::SetAddress(), ns3::AlohaNoackNetDevice::SetAddress(), ns3::TapBridge::SetAddress(), ns3::WimaxNetDevice::SetAddress(), and ns3::CsmaNetDevice::SetAddress().

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

Copy the input address to our internal buffer.

Referenced by ns3::dot11s::HwmpTag::Deserialize(), ns3::flame::FlameTag::Deserialize(), and GetMulticast().

void ns3::Mac48Address::CopyTo ( uint8_t  buffer[6]) const
Mac48Address ns3::Mac48Address::GetMulticast ( Ipv4Address  address)
static
Parameters:
addressbase IPv4 address
Returns:
a multicast address

References CopyFrom(), CopyTo(), GetMulticastPrefix(), and ns3::Ipv4Address::Serialize().

Referenced by ns3::WimaxNetDevice::GetMulticast().

Mac48Address ns3::Mac48Address::GetMulticast ( Ipv6Address  address)
static

Get multicast address from IPv6 address.

Parameters:
addressbase IPv6 address
Returns:
a multicast address

References CopyFrom(), CopyTo(), GetMulticast6Prefix(), and ns3::Ipv6Address::Serialize().

Mac48Address ns3::Mac48Address::GetMulticast6Prefix ( void  )
static

Get the multicast prefix for IPv6 (33:33:00:00:00:00).

Returns:
a multicast address.

Referenced by GetMulticast().

Mac48Address ns3::Mac48Address::GetMulticastPrefix ( void  )
static
Returns:
the multicast prefix (01:00:5e:00:00:00).

Referenced by GetMulticast().

bool ns3::Mac48Address::IsBroadcast ( void  ) const
Returns:
true if this is a broadcast address, false otherwise.

References GetBroadcast().

Referenced by ns3::ApWifiMac::Enqueue(), ns3::AlohaNoackNetDevice::NotifyReceptionEndOk(), ns3::CsmaNetDevice::Receive(), and ns3::LoopbackNetDevice::SendFrom().

bool ns3::Mac48Address::IsMatchingType ( const Address address)
static
ns3::Mac48Address::operator Address ( ) const
Returns:
a new Address instance

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


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