ns-3
|
an EUI-48 address More...
#include <mac48-address.h>
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) |
an EUI-48 address
This class can contain 48 bit IEEE addresses.
ns3::Mac48Address::Mac48Address | ( | const char * | str | ) |
str | a string representing the new Mac48Address |
The format of the string is "xx:xx:xx:xx:xx:xx"
References NS_ASSERT.
Mac48Address ns3::Mac48Address::Allocate | ( | void | ) | [static] |
Allocate a new Mac48Address.
Referenced by ns3::LteHelper::Install(), ns3::AdhocAlohaNoackIdealPhyHelper::Install(), ns3::PointToPointHelper::Install(), ns3::WifiHelper::Install(), and ns3::WimaxHelper::Install().
Mac48Address ns3::Mac48Address::ConvertFrom | ( | const Address & | address | ) | [static] |
address | a 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::SimplePacketScheduler::DoRunPacketScheduler(), 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::LteNetDevice::SendFrom(), ns3::AlohaNoackNetDevice::SendFrom(), ns3::EmuNetDevice::SendFrom(), ns3::WimaxNetDevice::SendFrom(), ns3::CsmaNetDevice::SendFrom(), ns3::LoopbackNetDevice::SetAddress(), ns3::SimpleNetDevice::SetAddress(), ns3::WifiNetDevice::SetAddress(), ns3::BridgeNetDevice::SetAddress(), ns3::MeshPointDevice::SetAddress(), ns3::LteNetDevice::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] | ) |
buffer | address 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 |
buffer | address in network order |
Copy the internal address to the input buffer.
Referenced by GetMulticast(), ns3::Ipv6Address::MakeAutoconfiguredAddress(), ns3::Ipv6Address::MakeAutoconfiguredLinkLocalAddress(), ns3::dot11s::HwmpTag::Serialize(), and ns3::flame::FlameTag::Serialize().
Mac48Address ns3::Mac48Address::GetBroadcast | ( | void | ) | [static] |
Referenced by ns3::MeshWifiBeacon::CreateHeader(), IsBroadcast(), ns3::dot11s::HwmpRtable::LookupResult::IsValid(), ns3::flame::FlameRtable::LookupResult::IsValid(), ns3::flame::FlameProtocolMac::Receive(), ns3::dot11s::PeerManagementProtocol::ReceiveBeacon(), ns3::flame::FlameProtocol::RemoveRoutingStuff(), ns3::dot11s::HwmpProtocol::RequestRoute(), ns3::flame::FlameProtocol::RequestRoute(), ns3::MeshWifiInterfaceMac::SendManagementFrame(), and ns3::flame::FlameProtocolMac::UpdateOutcomingFrame().
Mac48Address ns3::Mac48Address::GetMulticast | ( | Ipv4Address | address | ) | [static] |
address | base IPv4 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.
address | base IPv6 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).
Referenced by GetMulticast().
Mac48Address ns3::Mac48Address::GetMulticastPrefix | ( | void | ) | [static] |
Referenced by GetMulticast().
bool ns3::Mac48Address::IsBroadcast | ( | void | ) | const |
References GetBroadcast().
Referenced by ns3::ApWifiMac::Enqueue(), ns3::AlohaNoackNetDevice::NotifyReceptionEndOk(), ns3::CsmaNetDevice::Receive(), and ns3::LoopbackNetDevice::SendFrom().
bool ns3::Mac48Address::IsGroup | ( | void | ) | const |
Referenced by ns3::WifiRemoteStationManager::AddSupportedMode(), ns3::WifiRemoteStationManager::GetAckMode(), ns3::WifiRemoteStationManager::GetCtsMode(), ns3::WifiRemoteStationManager::GetDataMode(), ns3::WifiRemoteStationManager::GetFragmentOffset(), ns3::WifiRemoteStationManager::GetFragmentSize(), ns3::WifiRemoteStationManager::GetRtsMode(), ns3::WifiRemoteStationManager::IsLastFragment(), ns3::WifiRemoteStationManager::NeedDataRetransmission(), ns3::WifiRemoteStationManager::NeedFragmentation(), ns3::WifiRemoteStationManager::NeedRts(), ns3::WifiRemoteStationManager::NeedRtsRetransmission(), ns3::AlohaNoackNetDevice::NotifyReceptionEndOk(), ns3::WifiRemoteStationManager::PrepareForQueue(), ns3::MacRxMiddle::Receive(), ns3::CsmaNetDevice::Receive(), ns3::MacLow::ReceiveOk(), ns3::WifiRemoteStationManager::ReportDataFailed(), ns3::WifiRemoteStationManager::ReportDataOk(), ns3::WifiRemoteStationManager::ReportFinalDataFailed(), ns3::WifiRemoteStationManager::ReportFinalRtsFailed(), ns3::WifiRemoteStationManager::ReportRtsFailed(), ns3::WifiRemoteStationManager::ReportRtsOk(), ns3::WifiRemoteStationManager::ReportRxOk(), ns3::WifiRemoteStationManager::Reset(), ns3::BridgeNetDevice::SendFrom(), and ns3::dot11s::PeerManagementProtocolMac::UpdateOutcomingFrame().
bool ns3::Mac48Address::IsMatchingType | ( | const Address & | address | ) | [static] |
address | address to test |
References ns3::Address::CheckCompatible().
Referenced by ns3::Ipv6L3Protocol::AddAutoconfiguredAddress(), ns3::BridgeNetDevice::AddBridgePort(), ns3::MeshPointDevice::AddInterface(), ns3::WifiNetDevice::Send(), ns3::WifiNetDevice::SendFrom(), and ns3::TapBridge::SetBridgedNetDevice().
ns3::Mac48Address::operator Address | ( | void | ) | const |