A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::PacketSocketAddress Class Reference

an address for a packet socket More...

#include <packet-socket-address.h>

+ Collaboration diagram for ns3::PacketSocketAddress:

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

Detailed Description

an address for a packet socket

Definition at line 38 of file packet-socket-address.h.

Constructor & Destructor Documentation

ns3::PacketSocketAddress::PacketSocketAddress ( )

Definition at line 25 of file packet-socket-address.cc.

Member Function Documentation

PacketSocketAddress ns3::PacketSocketAddress::ConvertFrom ( const Address address)
static
Parameters
addressa polymorphic address

Convert a polymorphic address to an Mac48Address instance. The conversion performs a type check.

Definition at line 93 of file packet-socket-address.cc.

References ns3::Address::CopyAllFrom(), ns3::Address::CopyTo(), IsMatchingType(), ns3::Address::MAX_SIZE, NS_ASSERT, SetAllDevices(), SetPhysicalAddress(), SetProtocol(), and SetSingleDevice().

Referenced by ns3::PacketSocket::Bind(), ns3::PacketSocket::GetSockName(), ns3::PacketSocket::GetTxAvailable(), and ns3::PacketSocket::SendTo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Address ns3::PacketSocketAddress::ConvertTo ( void  ) const
private

Definition at line 78 of file packet-socket-address.cc.

References ns3::Address::CopyAllTo(), GetType(), m_address, m_device, m_isSingleDevice, m_protocol, and ns3::Address::MAX_SIZE.

+ Here is the call graph for this function:

Address ns3::PacketSocketAddress::GetPhysicalAddress ( void  ) const

Definition at line 67 of file packet-socket-address.cc.

References m_address.

Referenced by ns3::PacketSocket::SendTo().

+ Here is the caller graph for this function:

uint16_t ns3::PacketSocketAddress::GetProtocol ( void  ) const

Definition at line 52 of file packet-socket-address.cc.

References m_protocol.

Referenced by ns3::PacketSocket::DoBind(), and ns3::PacketSocket::SendTo().

+ Here is the caller graph for this function:

uint32_t ns3::PacketSocketAddress::GetSingleDevice ( void  ) const

Definition at line 62 of file packet-socket-address.cc.

References m_device.

Referenced by ns3::PacketSocket::DoBind(), ns3::PacketSocket::GetMinMtu(), ns3::PacketSocket::GetSockName(), and ns3::PacketSocket::SendTo().

+ Here is the caller graph for this function:

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

Definition at line 129 of file packet-socket-address.cc.

References ns3::Address::Register().

Referenced by ConvertTo(), and IsMatchingType().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 124 of file packet-socket-address.cc.

References GetType(), and ns3::Address::IsMatchingType().

Referenced by ns3::PacketSocket::Bind(), ns3::PacketSocket::Connect(), ConvertFrom(), and ns3::PacketSocket::SendTo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::PacketSocketAddress::IsSingleDevice ( void  ) const

Definition at line 57 of file packet-socket-address.cc.

References m_isSingleDevice.

Referenced by ns3::PacketSocket::DoBind(), ns3::PacketSocket::GetMinMtu(), and ns3::PacketSocket::SendTo().

+ Here is the caller graph for this function:

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

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

Definition at line 72 of file packet-socket-address.cc.

void ns3::PacketSocketAddress::SetAllDevices ( void  )

Definition at line 34 of file packet-socket-address.cc.

References m_device, and m_isSingleDevice.

Referenced by ns3::PacketSocket::Bind(), ConvertFrom(), and ns3::PacketSocket::GetSockName().

+ Here is the caller graph for this function:

void ns3::PacketSocketAddress::SetPhysicalAddress ( const Address  address)
void ns3::PacketSocketAddress::SetProtocol ( uint16_t  protocol)
void ns3::PacketSocketAddress::SetSingleDevice ( uint32_t  device)

Member Data Documentation

Address ns3::PacketSocketAddress::m_address
private

Definition at line 77 of file packet-socket-address.h.

Referenced by ConvertTo(), GetPhysicalAddress(), and SetPhysicalAddress().

uint32_t ns3::PacketSocketAddress::m_device
private

Definition at line 76 of file packet-socket-address.h.

Referenced by ConvertTo(), GetSingleDevice(), SetAllDevices(), and SetSingleDevice().

bool ns3::PacketSocketAddress::m_isSingleDevice
private

Definition at line 75 of file packet-socket-address.h.

Referenced by ConvertTo(), IsSingleDevice(), SetAllDevices(), and SetSingleDevice().

uint16_t ns3::PacketSocketAddress::m_protocol
private

Definition at line 74 of file packet-socket-address.h.

Referenced by ConvertTo(), GetProtocol(), and SetProtocol().


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