ns3::Ipv4L4Protocol Class Reference

L4 Protocol abstract base class. More...

#include <ipv4-l4-protocol.h>

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

List of all members.

Public Types

enum  RxStatus { RX_OK, RX_CSUM_FAILED, RX_ENDPOINT_UNREACH }

Public Member Functions

virtual ~Ipv4L4Protocol ()
virtual int GetProtocolNumber (void) const =0
virtual enum RxStatus Receive (Ptr< Packet > p, Ipv4Address const &source, Ipv4Address const &destination, Ptr< Ipv4Interface > incomingInterface)=0
virtual void ReceiveIcmp (Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo, Ipv4Address payloadSource, Ipv4Address payloadDestination, const uint8_t payload[8])

Static Public Member Functions

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

Detailed Description

L4 Protocol abstract base class.

This is an abstract base class for layer four protocols which use IPv4 as the network layer.

Definition at line 42 of file ipv4-l4-protocol.h.


Member Enumeration Documentation

Enumerator:
RX_OK 
RX_CSUM_FAILED 
RX_ENDPOINT_UNREACH 

Definition at line 45 of file ipv4-l4-protocol.h.


Constructor & Destructor Documentation

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

Definition at line 44 of file ipv4-l4-protocol.cc.


Member Function Documentation

virtual int ns3::Ipv4L4Protocol::GetProtocolNumber ( void   )  const [pure virtual]
Returns:
the protocol number of this protocol.

Implemented in ns3::Icmpv4L4Protocol, ns3::NscTcpL4Protocol, ns3::TcpL4Protocol, and ns3::UdpL4Protocol.

Referenced by GetTypeId().

TypeId ns3::Ipv4L4Protocol::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::Object.

Reimplemented in ns3::Icmpv4L4Protocol, ns3::NscTcpL4Protocol, ns3::TcpL4Protocol, and ns3::UdpL4Protocol.

Definition at line 32 of file ipv4-l4-protocol.cc.

References GetProtocolNumber(), and ns3::TypeId::SetParent().

virtual enum RxStatus ns3::Ipv4L4Protocol::Receive ( Ptr< Packet p,
Ipv4Address const &  source,
Ipv4Address const &  destination,
Ptr< Ipv4Interface incomingInterface 
) [pure virtual]
Parameters:
p packet to forward up
source source address of packet received
destination address of packet received
incomingInterface the Ipv4Interface on which the packet arrived

Called from lower-level layers to send the packet up in the stack.

Implemented in ns3::Icmpv4L4Protocol, ns3::NscTcpL4Protocol, ns3::TcpL4Protocol, and ns3::UdpL4Protocol.

void ns3::Ipv4L4Protocol::ReceiveIcmp ( Ipv4Address  icmpSource,
uint8_t  icmpTtl,
uint8_t  icmpType,
uint8_t  icmpCode,
uint32_t  icmpInfo,
Ipv4Address  payloadSource,
Ipv4Address  payloadDestination,
const uint8_t  payload[8] 
) [virtual]
Parameters:
icmpSource the source address of the icmp message
icmpTtl the ttl of the icmp message
icmpType the 'type' field of the icmp message
icmpCode the 'code' field of the icmp message
icmpInfo extra information dependent on the icmp message generated by Icmpv4L4Protocol
payloadSource the source address of the packet which triggered the icmp message
payloadDestination the destination address of the packet which triggered the icmp message.
payload the first 8 bytes of the udp header of the packet which triggered the icmp message.

Reimplemented in ns3::UdpL4Protocol.

Definition at line 48 of file ipv4-l4-protocol.cc.


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