an address for a packet socket More...
#include <packet-socket-address.h>
Public Member Functions | |
PacketSocketAddress () | |
void | SetProtocol (uint16_t protocol) |
void | SetAllDevices (void) |
void | SetSingleDevice (uint32_t device) |
void | SetPhysicalAddress (const Address address) |
uint16_t | GetProtocol (void) const |
uint32_t | GetSingleDevice (void) const |
bool | IsSingleDevice (void) const |
Address | GetPhysicalAddress (void) const |
operator Address () const | |
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 | |
uint16_t | m_protocol |
bool | m_isSingleDevice |
uint32_t | m_device |
Address | m_address |
an address for a packet socket
Definition at line 38 of file packet-socket-address.h.
ns3::PacketSocketAddress::PacketSocketAddress | ( | ) |
Definition at line 23 of file packet-socket-address.cc.
PacketSocketAddress ns3::PacketSocketAddress::ConvertFrom | ( | const Address & | address | ) | [static] |
address | a polymorphic address |
Convert a polymorphic address to an Mac48Address instance. The conversion performs a type check.
Definition at line 90 of file packet-socket-address.cc.
Referenced by ns3::PacketSocket::Bind(), ns3::PacketSocket::GetSockName(), ns3::PacketSocket::GetTxAvailable(), and ns3::PacketSocket::SendTo().
Address ns3::PacketSocketAddress::ConvertTo | ( | void | ) | const [private] |
Definition at line 75 of file packet-socket-address.cc.
References ns3::Address::CopyAllTo(), GetType(), m_address, m_device, m_isSingleDevice, m_protocol, and ns3::Address::MAX_SIZE.
Address ns3::PacketSocketAddress::GetPhysicalAddress | ( | void | ) | const |
Definition at line 64 of file packet-socket-address.cc.
Referenced by ns3::PacketSocket::SendTo().
uint16_t ns3::PacketSocketAddress::GetProtocol | ( | void | ) | const |
Definition at line 49 of file packet-socket-address.cc.
References m_protocol.
Referenced by ns3::PacketSocket::DoBind(), and ns3::PacketSocket::SendTo().
uint32_t ns3::PacketSocketAddress::GetSingleDevice | ( | void | ) | const |
Definition at line 59 of file packet-socket-address.cc.
Referenced by ns3::PacketSocket::DoBind(), ns3::PacketSocket::GetMinMtu(), ns3::PacketSocket::GetSockName(), and ns3::PacketSocket::SendTo().
uint8_t ns3::PacketSocketAddress::GetType | ( | void | ) | [static, private] |
Definition at line 126 of file packet-socket-address.cc.
Referenced by ConvertTo().
bool ns3::PacketSocketAddress::IsMatchingType | ( | const Address & | address | ) | [static] |
Definition at line 121 of file packet-socket-address.cc.
Referenced by ns3::PacketSocket::Bind(), ns3::PacketSocket::Connect(), and ns3::PacketSocket::SendTo().
bool ns3::PacketSocketAddress::IsSingleDevice | ( | void | ) | const |
Definition at line 54 of file packet-socket-address.cc.
Referenced by ns3::PacketSocket::DoBind(), ns3::PacketSocket::GetMinMtu(), and ns3::PacketSocket::SendTo().
ns3::PacketSocketAddress::operator Address | ( | void | ) | const |
Convert an instance of this class to a polymorphic Address instance.
Definition at line 69 of file packet-socket-address.cc.
void ns3::PacketSocketAddress::SetAllDevices | ( | void | ) |
Definition at line 31 of file packet-socket-address.cc.
Referenced by ns3::PacketSocket::Bind(), and ns3::PacketSocket::GetSockName().
void ns3::PacketSocketAddress::SetPhysicalAddress | ( | const Address | address | ) |
Definition at line 43 of file packet-socket-address.cc.
Referenced by ns3::PacketSocket::ForwardUp(), and ns3::PacketSocket::GetSockName().
void ns3::PacketSocketAddress::SetProtocol | ( | uint16_t | protocol | ) |
Definition at line 26 of file packet-socket-address.cc.
Referenced by ns3::PacketSocket::Bind(), ns3::PacketSocket::ForwardUp(), and ns3::PacketSocket::GetSockName().
void ns3::PacketSocketAddress::SetSingleDevice | ( | uint32_t | device | ) |
Definition at line 37 of file packet-socket-address.cc.
Referenced by ns3::PacketSocket::ForwardUp(), and ns3::PacketSocket::GetSockName().
Address ns3::PacketSocketAddress::m_address [private] |
Definition at line 76 of file packet-socket-address.h.
Referenced by ConvertTo().
uint32_t ns3::PacketSocketAddress::m_device [private] |
Definition at line 75 of file packet-socket-address.h.
Referenced by ConvertTo().
bool ns3::PacketSocketAddress::m_isSingleDevice [private] |
Definition at line 74 of file packet-socket-address.h.
Referenced by ConvertTo().
uint16_t ns3::PacketSocketAddress::m_protocol [private] |
Definition at line 73 of file packet-socket-address.h.
Referenced by ConvertTo(), and GetProtocol().