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

an address for a packet socket More...

#include <packet-socket-address.h>

Public Member Functions

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.

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 106 of file packet-socket-address.cc.

References ns3::Address::CopyAllFrom(), ns3::Address::CopyTo(), IsMatchingType(), NS_ASSERT, and NS_LOG_FUNCTION.

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

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

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

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

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

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

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

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


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