ns3::Ipv4EndPointDemux Class Reference

Demultiplexes packets to various transport layer endpoints. More...

#include <ipv4-end-point-demux.h>

List of all members.

Public Types

typedef std::list< Ipv4EndPoint * > EndPoints
typedef std::list
< Ipv4EndPoint * >::iterator 
EndPointsI

Public Member Functions

 Ipv4EndPointDemux ()
 ~Ipv4EndPointDemux ()
EndPoints GetAllEndPoints (void)
bool LookupPortLocal (uint16_t port)
bool LookupLocal (Ipv4Address addr, uint16_t port)
EndPoints Lookup (Ipv4Address daddr, uint16_t dport, Ipv4Address saddr, uint16_t sport, Ptr< Ipv4Interface > incomingInterface)
Ipv4EndPointSimpleLookup (Ipv4Address daddr, uint16_t dport, Ipv4Address saddr, uint16_t sport)
Ipv4EndPointAllocate (void)
Ipv4EndPointAllocate (Ipv4Address address)
Ipv4EndPointAllocate (uint16_t port)
Ipv4EndPointAllocate (Ipv4Address address, uint16_t port)
Ipv4EndPointAllocate (Ipv4Address localAddress, uint16_t localPort, Ipv4Address peerAddress, uint16_t peerPort)
void DeAllocate (Ipv4EndPoint *endPoint)

Private Member Functions

uint16_t AllocateEphemeralPort (void)

Private Attributes

uint16_t m_ephemeral
EndPoints m_endPoints

Detailed Description

Demultiplexes packets to various transport layer endpoints.

This class serves as a lookup table to match partial or full information about a four-tuple to an ns3::Ipv4EndPoint. It internally contains a list of endpoints, and has APIs to add and find endpoints in this demux. This code is shared in common to TCP and UDP protocols in ns3. This demux sits between ns3's layer four and the socket layer

Definition at line 43 of file ipv4-end-point-demux.h.


Member Typedef Documentation

Definition at line 45 of file ipv4-end-point-demux.h.

typedef std::list<Ipv4EndPoint *>::iterator ns3::Ipv4EndPointDemux::EndPointsI

Definition at line 46 of file ipv4-end-point-demux.h.


Constructor & Destructor Documentation

ns3::Ipv4EndPointDemux::Ipv4EndPointDemux (  ) 

Definition at line 27 of file ipv4-end-point-demux.cc.

ns3::Ipv4EndPointDemux::~Ipv4EndPointDemux (  ) 

Definition at line 33 of file ipv4-end-point-demux.cc.


Member Function Documentation

Ipv4EndPoint * ns3::Ipv4EndPointDemux::Allocate ( Ipv4Address  localAddress,
uint16_t  localPort,
Ipv4Address  peerAddress,
uint16_t  peerPort 
)
Ipv4EndPoint * ns3::Ipv4EndPointDemux::Allocate ( Ipv4Address  address,
uint16_t  port 
)
Ipv4EndPoint * ns3::Ipv4EndPointDemux::Allocate ( uint16_t  port  ) 

Definition at line 106 of file ipv4-end-point-demux.cc.

References Allocate(), ns3::Ipv4Address::GetAny(), and NS_LOG_FUNCTION.

Ipv4EndPoint * ns3::Ipv4EndPointDemux::Allocate ( Ipv4Address  address  ) 
Ipv4EndPoint * ns3::Ipv4EndPointDemux::Allocate ( void   ) 
uint16_t ns3::Ipv4EndPointDemux::AllocateEphemeralPort ( void   )  [private]

Definition at line 330 of file ipv4-end-point-demux.cc.

References LookupPortLocal(), m_ephemeral, and NS_LOG_FUNCTION_NOARGS.

Referenced by Allocate().

void ns3::Ipv4EndPointDemux::DeAllocate ( Ipv4EndPoint endPoint  ) 
Ipv4EndPointDemux::EndPoints ns3::Ipv4EndPointDemux::GetAllEndPoints ( void   ) 

Definition at line 173 of file ipv4-end-point-demux.cc.

References m_endPoints, and NS_LOG_FUNCTION_NOARGS.

Referenced by ns3::NscTcpL4Protocol::wakeup().

Ipv4EndPointDemux::EndPoints ns3::Ipv4EndPointDemux::Lookup ( Ipv4Address  daddr,
uint16_t  dport,
Ipv4Address  saddr,
uint16_t  sport,
Ptr< Ipv4Interface incomingInterface 
)
bool ns3::Ipv4EndPointDemux::LookupLocal ( Ipv4Address  addr,
uint16_t  port 
)

Definition at line 59 of file ipv4-end-point-demux.cc.

References m_endPoints, and NS_LOG_FUNCTION_NOARGS.

Referenced by Allocate().

bool ns3::Ipv4EndPointDemux::LookupPortLocal ( uint16_t  port  ) 

Definition at line 45 of file ipv4-end-point-demux.cc.

References m_endPoints, and NS_LOG_FUNCTION_NOARGS.

Referenced by AllocateEphemeralPort().

Ipv4EndPoint * ns3::Ipv4EndPointDemux::SimpleLookup ( Ipv4Address  daddr,
uint16_t  dport,
Ipv4Address  saddr,
uint16_t  sport 
)

Definition at line 289 of file ipv4-end-point-demux.cc.

References ns3::Ipv4Address::GetAny(), and m_endPoints.

Referenced by ns3::UdpL4Protocol::ReceiveIcmp().


Member Data Documentation

Definition at line 79 of file ipv4-end-point-demux.h.

Referenced by AllocateEphemeralPort().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:11:39 2009 for NS-3 by  doxygen 1.6.3