Public Member Functions | Static Public Member Functions | Protected Member Functions

ns3::Ipv4L4Demux Class Reference

L4 Ipv4 Demux. More...

#include <ipv4-l4-demux.h>

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

List of all members.

Public Member Functions

void Insert (Ptr< Ipv4L4Protocol > protocol)
Ptr< Ipv4L4ProtocolGetProtocol (int protocolNumber)
void Remove (Ptr< Ipv4L4Protocol > protocol)

Static Public Member Functions

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

Protected Member Functions

virtual void DoDispose (void)

Detailed Description

L4 Ipv4 Demux.

This class demultiplexes IP datagrams to the correct layer four protocol object. This demux sits between IP and layer 4.


Member Function Documentation

virtual void ns3::Ipv4L4Demux::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.

Ptr<Ipv4L4Protocol> ns3::Ipv4L4Demux::GetProtocol ( int  protocolNumber  ) 
Parameters:
protocolNumber number of protocol to lookup in this L4 Demux
Returns:
a matching L4 Protocol

This method is typically called by lower layers to forward packets up the stack to the right protocol. It is also called from NodeImpl::GetUdp for example.

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

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

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/$ns3Ipv4L4Demux

Attributes defined for this type:

No TraceSources defined for this type.

Reimplemented from ns3::Object.

void ns3::Ipv4L4Demux::Insert ( Ptr< Ipv4L4Protocol protocol  ) 
Parameters:
protocol a template for the protocol to add to this L4 Demux.
Returns:
the L4Protocol effectively added.

Invoke Copy on the input template to get a copy of the input protocol which can be used on the Node on which this L4 Demux is running. The new L4Protocol is registered internally as a working L4 Protocol and returned from this method. The caller does not get ownership of the returned pointer.

void ns3::Ipv4L4Demux::Remove ( Ptr< Ipv4L4Protocol protocol  ) 
Parameters:
protocol protocol to remove from this demux.

The input value to this method should be the value returned from the Ipv4L4Protocol::Insert method.


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