ns3::NscTcpL4Protocol Class Reference
[NscTcp]

Nsc wrapper glue, to interface with the Ipv4 protocol underneath. More...

#include <nsc-tcp-l4-protocol.h>

Inheritance diagram for ns3::NscTcpL4Protocol:
Inheritance graph
[legend]
Collaboration diagram for ns3::NscTcpL4Protocol:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 NscTcpL4Protocol ()
 Constructor.
virtual ~NscTcpL4Protocol ()
void SetNode (Ptr< Node > node)
void SetNscLibrary (const std::string &lib)
virtual int GetProtocolNumber (void) const
virtual int GetVersion (void) const
Ptr< SocketCreateSocket (void)
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)
virtual Ipv4L4Protocol::RxStatus Receive (Ptr< Packet > p, Ipv4Address const &source, Ipv4Address const &destination, Ptr< Ipv4Interface > incomingInterface)
 Recieve a packet up the protocol stack.
virtual void send_callback (const void *data, int datalen)
virtual void wakeup ()
virtual void gettime (unsigned int *, unsigned int *)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::Ipv4L4Protocol.

Static Public Attributes

static const uint8_t PROT_NUMBER = 6

Protected Member Functions

virtual void DoDispose (void)

Private Member Functions

void AddInterface (void)
void SoftInterrupt (void)

Static Private Member Functions

static ObjectFactory GetDefaultRttEstimatorFactory (void)

Private Attributes

Ptr< Nodem_node
Ipv4EndPointDemuxm_endPoints
ObjectFactory m_rttFactory
INetStackm_nscStack
void * m_dlopenHandle
Timer m_softTimer

Friends

class NscTcpSocketImpl

Detailed Description

Nsc wrapper glue, to interface with the Ipv4 protocol underneath.

Definition at line 45 of file nsc-tcp-l4-protocol.h.


Constructor & Destructor Documentation

ns3::NscTcpL4Protocol::NscTcpL4Protocol (  ) 

Constructor.

Definition at line 82 of file nsc-tcp-l4-protocol.cc.

References m_dlopenHandle, and NS_LOG_LOGIC.

ns3::NscTcpL4Protocol::~NscTcpL4Protocol (  )  [virtual]

Definition at line 91 of file nsc-tcp-l4-protocol.cc.

References m_dlopenHandle, and NS_LOG_FUNCTION.


Member Function Documentation

void ns3::NscTcpL4Protocol::AddInterface ( void   )  [private]
Ipv4EndPoint * ns3::NscTcpL4Protocol::Allocate ( Ipv4Address  localAddress,
uint16_t  localPort,
Ipv4Address  peerAddress,
uint16_t  peerPort 
)
Ipv4EndPoint * ns3::NscTcpL4Protocol::Allocate ( Ipv4Address  address,
uint16_t  port 
)
Ipv4EndPoint * ns3::NscTcpL4Protocol::Allocate ( uint16_t  port  ) 
Ipv4EndPoint * ns3::NscTcpL4Protocol::Allocate ( Ipv4Address  address  ) 
Ipv4EndPoint * ns3::NscTcpL4Protocol::Allocate ( void   ) 
Ptr< Socket > ns3::NscTcpL4Protocol::CreateSocket ( void   ) 
Returns:
A smart Socket pointer to a NscTcpSocketImpl, allocated by this instance of the TCP protocol

Definition at line 167 of file nsc-tcp-l4-protocol.cc.

References ns3::ObjectFactory::Create(), m_node, m_rttFactory, and NS_LOG_FUNCTION.

void ns3::NscTcpL4Protocol::DeAllocate ( Ipv4EndPoint endPoint  ) 

Definition at line 217 of file nsc-tcp-l4-protocol.cc.

References NS_LOG_FUNCTION.

void ns3::NscTcpL4Protocol::DoDispose ( void   )  [protected, virtual]

This method is called by Object::Dispose or by the object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.

Reimplemented from ns3::Object.

Definition at line 154 of file nsc-tcp-l4-protocol.cc.

References m_endPoints, m_node, and NS_LOG_FUNCTION.

ObjectFactory ns3::NscTcpL4Protocol::GetDefaultRttEstimatorFactory ( void   )  [static, private]
int ns3::NscTcpL4Protocol::GetProtocolNumber ( void   )  const [virtual]
Returns:
the protocol number of this protocol.

Implements ns3::Ipv4L4Protocol.

Definition at line 143 of file nsc-tcp-l4-protocol.cc.

References PROT_NUMBER.

void ns3::NscTcpL4Protocol::gettime ( unsigned int *  sec,
unsigned int *  usec 
) [virtual]

Implements IInterruptCallback.

Definition at line 309 of file nsc-tcp-l4-protocol.cc.

References ns3::TimeUnit< 1 >::GetMicroSeconds(), and ns3::Now().

TypeId ns3::NscTcpL4Protocol::GetTypeId ( void   )  [static]

This method returns the TypeId associated to ns3::Ipv4L4Protocol.

Attributes defined for this type:

  • ProtocolNumber: The Ipv4 protocol number.

No TraceSources defined for this type.

Reimplemented from ns3::Ipv4L4Protocol.

Definition at line 63 of file nsc-tcp-l4-protocol.cc.

References GetDefaultRttEstimatorFactory(), m_rttFactory, and ns3::TypeId::SetParent().

int ns3::NscTcpL4Protocol::GetVersion ( void   )  const [virtual]

Definition at line 148 of file nsc-tcp-l4-protocol.cc.

Ipv4L4Protocol::RxStatus ns3::NscTcpL4Protocol::Receive ( Ptr< Packet p,
Ipv4Address const &  source,
Ipv4Address const &  destination,
Ptr< Ipv4Interface incomingInterface 
) [virtual]

Recieve a packet up the protocol stack.

Parameters:
p The Packet to dump the contents into
source The source's Ipv4Address
destination The destinations Ipv4Address
incomingInterface The Ipv4Interface it was received on

Implements ns3::Ipv4L4Protocol.

Definition at line 224 of file nsc-tcp-l4-protocol.cc.

References ns3::Ipv4Header::EnableChecksum(), INetStack::if_receive_packet(), m_nscStack, NS_LOG_FUNCTION, PROT_NUMBER, ns3::Ipv4L4Protocol::RX_OK, ns3::Ipv4Header::SetDestination(), ns3::Ipv4Header::SetPayloadSize(), ns3::Ipv4Header::SetProtocol(), ns3::Ipv4Header::SetSource(), ns3::Ipv4Header::SetTtl(), and wakeup().

void ns3::NscTcpL4Protocol::send_callback ( const void *  data,
int  datalen 
) [virtual]
void ns3::NscTcpL4Protocol::SetNode ( Ptr< Node node  ) 
void ns3::NscTcpL4Protocol::SetNscLibrary ( const std::string &  lib  ) 

Definition at line 98 of file nsc-tcp-l4-protocol.cc.

References m_dlopenHandle, NS_ASSERT, and NS_FATAL_ERROR.

void ns3::NscTcpL4Protocol::SoftInterrupt ( void   )  [private]
void ns3::NscTcpL4Protocol::wakeup (  )  [virtual]

Implements IInterruptCallback.

Definition at line 295 of file nsc-tcp-l4-protocol.cc.

References ns3::Ipv4EndPointDemux::GetAllEndPoints(), and m_endPoints.

Referenced by Receive().


Friends And Related Function Documentation

friend class NscTcpSocketImpl [friend]

Definition at line 115 of file nsc-tcp-l4-protocol.h.


Member Data Documentation

Definition at line 117 of file nsc-tcp-l4-protocol.h.

Referenced by NscTcpL4Protocol(), SetNode(), SetNscLibrary(), and ~NscTcpL4Protocol().

Definition at line 109 of file nsc-tcp-l4-protocol.h.

Referenced by Allocate(), DoDispose(), and wakeup().

Definition at line 108 of file nsc-tcp-l4-protocol.h.

Referenced by AddInterface(), CreateSocket(), DoDispose(), send_callback(), and SetNode().

Definition at line 116 of file nsc-tcp-l4-protocol.h.

Referenced by AddInterface(), Receive(), send_callback(), SetNode(), and SoftInterrupt().

Definition at line 110 of file nsc-tcp-l4-protocol.h.

Referenced by CreateSocket(), and GetTypeId().

Definition at line 118 of file nsc-tcp-l4-protocol.h.

Referenced by SetNode(), and SoftInterrupt().

const uint8_t ns3::NscTcpL4Protocol::PROT_NUMBER = 6 [static]

Definition at line 47 of file nsc-tcp-l4-protocol.h.

Referenced by GetProtocolNumber(), Receive(), and send_callback().


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