an address for a packet socket More...
#include <packet-socket-address.h>
Public Member Functions | |
PacketSocketAddress () | |
Address | GetPhysicalAddress (void) const |
uint16_t | GetProtocol (void) const |
uint32_t | GetSingleDevice (void) const |
bool | IsSingleDevice (void) const |
operator Address () const | |
void | SetAllDevices (void) |
void | SetPhysicalAddress (const Address address) |
void | SetProtocol (uint16_t protocol) |
void | SetSingleDevice (uint32_t device) |
Static Public Member Functions | |
static PacketSocketAddress | 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) |
Private Attributes | |
Address | m_address |
uint32_t | m_device |
bool | m_isSingleDevice |
uint16_t | m_protocol |
an address for a packet socket
Definition at line 38 of file packet-socket-address.h.
ns3::PacketSocketAddress::PacketSocketAddress | ( | ) |
Definition at line 28 of file packet-socket-address.cc.
References NS_LOG_FUNCTION.
|
static |
address | a polymorphic address |
Convert a polymorphic address to an Mac48Address instance. The conversion performs a type check.
Definition at line 106 of file packet-socket-address.cc.
References ns3::Address::CopyAllFrom(), ns3::Address::CopyTo(), IsMatchingType(), ns3::Address::MAX_SIZE, NS_ASSERT, NS_LOG_FUNCTION, SetAllDevices(), SetPhysicalAddress(), SetProtocol(), and SetSingleDevice().
Referenced by ns3::PacketSocket::Bind(), ns3::PacketSocket::GetSockName(), ns3::PacketSocket::GetTxAvailable(), and ns3::PacketSocket::SendTo().
|
private |
Definition at line 90 of file packet-socket-address.cc.
References first::address, ns3::Address::CopyAllTo(), GetType(), m_address, m_device, m_isSingleDevice, m_protocol, ns3::Address::MAX_SIZE, and NS_LOG_FUNCTION.
Address ns3::PacketSocketAddress::GetPhysicalAddress | ( | void | ) | const |
Definition at line 78 of file packet-socket-address.cc.
References m_address, and NS_LOG_FUNCTION.
Referenced by ns3::PacketSocket::SendTo().
uint16_t ns3::PacketSocketAddress::GetProtocol | ( | void | ) | const |
Definition at line 60 of file packet-socket-address.cc.
References m_protocol, and NS_LOG_FUNCTION.
Referenced by ns3::PacketSocket::DoBind(), and ns3::PacketSocket::SendTo().
uint32_t ns3::PacketSocketAddress::GetSingleDevice | ( | void | ) | const |
Definition at line 72 of file packet-socket-address.cc.
References m_device, and NS_LOG_FUNCTION.
Referenced by ns3::PacketSocket::DoBind(), ns3::PacketSocket::GetMinMtu(), ns3::PacketSocket::GetSockName(), and ns3::PacketSocket::SendTo().
|
staticprivate |
Definition at line 144 of file packet-socket-address.cc.
References NS_LOG_FUNCTION_NOARGS, and ns3::Address::Register().
Referenced by ConvertTo(), and IsMatchingType().
|
static |
address | address to test |
Definition at line 138 of file packet-socket-address.cc.
References GetType(), ns3::Address::IsMatchingType(), and NS_LOG_FUNCTION.
Referenced by ns3::PacketSocket::Bind(), ns3::PacketSocket::Connect(), ConvertFrom(), ns3::PacketSocket::SendTo(), and ns3::OnOffApplication::StartApplication().
bool ns3::PacketSocketAddress::IsSingleDevice | ( | void | ) | const |
Definition at line 66 of file packet-socket-address.cc.
References m_isSingleDevice, and NS_LOG_FUNCTION.
Referenced by ns3::PacketSocket::DoBind(), ns3::PacketSocket::GetMinMtu(), and ns3::PacketSocket::SendTo().
ns3::PacketSocketAddress::operator Address | ( | ) | const |
Convert an instance of this class to a polymorphic Address instance.
Definition at line 84 of file packet-socket-address.cc.
void ns3::PacketSocketAddress::SetAllDevices | ( | void | ) |
Definition at line 39 of file packet-socket-address.cc.
References m_device, m_isSingleDevice, and NS_LOG_FUNCTION.
Referenced by ns3::PacketSocket::Bind(), ConvertFrom(), and ns3::PacketSocket::GetSockName().
void ns3::PacketSocketAddress::SetPhysicalAddress | ( | const Address | address | ) |
Definition at line 53 of file packet-socket-address.cc.
References first::address, m_address, and NS_LOG_FUNCTION.
Referenced by ns3::PointToPointEpcHelper::AddEnb(), ConvertFrom(), ns3::SpectrumIdealPhyTestCase::DoRun(), CsmaPacketSocketTestCase::DoRun(), ns3::PacketSocket::ForwardUp(), ns3::PacketSocket::GetSockName(), main(), OcbWifiMacTestCase::PostDeviceConfiguration(), NetAnimExperiment::Run(), and Experiment::Run().
void ns3::PacketSocketAddress::SetProtocol | ( | uint16_t | protocol | ) |
Definition at line 33 of file packet-socket-address.cc.
References m_protocol, and NS_LOG_FUNCTION.
Referenced by ns3::PointToPointEpcHelper::AddEnb(), ns3::PacketSocket::Bind(), ConvertFrom(), ns3::SpectrumIdealPhyTestCase::DoRun(), CsmaPacketSocketTestCase::DoRun(), ns3::PacketSocket::ForwardUp(), ns3::PacketSocket::GetSockName(), main(), OcbWifiMacTestCase::PostDeviceConfiguration(), NetAnimExperiment::Run(), and Experiment::Run().
void ns3::PacketSocketAddress::SetSingleDevice | ( | uint32_t | device | ) |
Definition at line 46 of file packet-socket-address.cc.
References m_device, m_isSingleDevice, and NS_LOG_FUNCTION.
Referenced by ns3::PointToPointEpcHelper::AddEnb(), ConvertFrom(), ns3::SpectrumIdealPhyTestCase::DoRun(), CsmaPacketSocketTestCase::DoRun(), ns3::PacketSocket::ForwardUp(), ns3::PacketSocket::GetSockName(), main(), OcbWifiMacTestCase::PostDeviceConfiguration(), NetAnimExperiment::Run(), and Experiment::Run().
|
private |
Definition at line 77 of file packet-socket-address.h.
Referenced by ConvertTo(), GetPhysicalAddress(), and SetPhysicalAddress().
|
private |
Definition at line 76 of file packet-socket-address.h.
Referenced by ConvertTo(), GetSingleDevice(), SetAllDevices(), and SetSingleDevice().
|
private |
Definition at line 75 of file packet-socket-address.h.
Referenced by ConvertTo(), IsSingleDevice(), SetAllDevices(), and SetSingleDevice().
|
private |
Definition at line 74 of file packet-socket-address.h.
Referenced by ConvertTo(), GetProtocol(), and SetProtocol().