ns3::Icmpv4L4Protocol Class Reference

#include <icmpv4-l4-protocol.h>

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

List of all members.

Public Member Functions

 Icmpv4L4Protocol ()
virtual ~Icmpv4L4Protocol ()
void SetNode (Ptr< Node > node)
virtual int GetProtocolNumber (void) const
virtual enum
Ipv4L4Protocol::RxStatus 
Receive (Ptr< Packet > p, const Ipv4Address &source, const Ipv4Address &destination, Ptr< Ipv4Interface > incomingInterface)
void SendDestUnreachFragNeeded (Ipv4Header header, Ptr< const Packet > orgData, uint16_t nextHopMtu)
void SendTimeExceededTtl (Ipv4Header header, Ptr< const Packet > orgData)
void SendDestUnreachPort (Ipv4Header header, Ptr< const Packet > orgData)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::Icmpv4L4Protocol.
static uint16_t GetStaticProtocolNumber (void)

Private Member Functions

void HandleEcho (Ptr< Packet > p, Icmpv4Header header, Ipv4Address source, Ipv4Address destination)
void HandleDestUnreach (Ptr< Packet > p, Icmpv4Header header, Ipv4Address source, Ipv4Address destination)
void HandleTimeExceeded (Ptr< Packet > p, Icmpv4Header icmp, Ipv4Address source, Ipv4Address destination)
void SendDestUnreach (Ipv4Header header, Ptr< const Packet > orgData, uint8_t code, uint16_t nextHopMtu)
void SendMessage (Ptr< Packet > packet, Ipv4Address dest, uint8_t type, uint8_t code)
void SendMessage (Ptr< Packet > packet, Ipv4Address source, Ipv4Address dest, uint8_t type, uint8_t code)
void Forward (Ipv4Address source, Icmpv4Header icmp, uint32_t info, Ipv4Header ipHeader, const uint8_t payload[8])
virtual void DoDispose (void)

Private Attributes

Ptr< Nodem_node
bool m_calcChecksum

Detailed Description

Definition at line 13 of file icmpv4-l4-protocol.h.


Constructor & Destructor Documentation

ns3::Icmpv4L4Protocol::Icmpv4L4Protocol (  ) 

Definition at line 28 of file icmpv4-l4-protocol.cc.

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

Definition at line 31 of file icmpv4-l4-protocol.cc.


Member Function Documentation

void ns3::Icmpv4L4Protocol::DoDispose ( void   )  [private, 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 208 of file icmpv4-l4-protocol.cc.

void ns3::Icmpv4L4Protocol::Forward ( Ipv4Address  source,
Icmpv4Header  icmp,
uint32_t  info,
Ipv4Header  ipHeader,
const uint8_t  payload[8] 
) [private]

Definition at line 137 of file icmpv4-l4-protocol.cc.

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

Implements ns3::Ipv4L4Protocol.

Definition at line 49 of file icmpv4-l4-protocol.cc.

References ns3::ICMP_PROTOCOL.

uint16_t ns3::Icmpv4L4Protocol::GetStaticProtocolNumber ( void   )  [static]

Definition at line 43 of file icmpv4-l4-protocol.cc.

References m_node.

Referenced by ns3::Ipv4L3Protocol::GetIcmp().

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

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

Attributes defined for this type:

  • CalcChecksum: Control whether the icmp header checksum is calculated and stored in outgoing icmpv4 headers
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read

Attributes defined in parent class ns3::Ipv4L4Protocol:

  • ProtocolNumber: The Ipv4 protocol number.

No TraceSources defined for this type.

Reimplemented from ns3::Ipv4L4Protocol.

Definition at line 14 of file icmpv4-l4-protocol.cc.

void ns3::Icmpv4L4Protocol::HandleDestUnreach ( Ptr< Packet p,
Icmpv4Header  header,
Ipv4Address  source,
Ipv4Address  destination 
) [private]
void ns3::Icmpv4L4Protocol::HandleEcho ( Ptr< Packet p,
Icmpv4Header  header,
Ipv4Address  source,
Ipv4Address  destination 
) [private]

Definition at line 123 of file icmpv4-l4-protocol.cc.

void ns3::Icmpv4L4Protocol::HandleTimeExceeded ( Ptr< Packet p,
Icmpv4Header  icmp,
Ipv4Address  source,
Ipv4Address  destination 
) [private]

Definition at line 165 of file icmpv4-l4-protocol.cc.

enum Ipv4L4Protocol::RxStatus ns3::Icmpv4L4Protocol::Receive ( Ptr< Packet p,
const Ipv4Address source,
const Ipv4Address destination,
Ptr< Ipv4Interface incomingInterface 
) [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.

Implements ns3::Ipv4L4Protocol.

Definition at line 182 of file icmpv4-l4-protocol.cc.

void ns3::Icmpv4L4Protocol::SendDestUnreach ( Ipv4Header  header,
Ptr< const Packet orgData,
uint8_t  code,
uint16_t  nextHopMtu 
) [private]
void ns3::Icmpv4L4Protocol::SendDestUnreachFragNeeded ( Ipv4Header  header,
Ptr< const Packet orgData,
uint16_t  nextHopMtu 
)

Definition at line 82 of file icmpv4-l4-protocol.cc.

void ns3::Icmpv4L4Protocol::SendDestUnreachPort ( Ipv4Header  header,
Ptr< const Packet orgData 
)
void ns3::Icmpv4L4Protocol::SendMessage ( Ptr< Packet packet,
Ipv4Address  source,
Ipv4Address  dest,
uint8_t  type,
uint8_t  code 
) [private]

Definition at line 68 of file icmpv4-l4-protocol.cc.

void ns3::Icmpv4L4Protocol::SendMessage ( Ptr< Packet packet,
Ipv4Address  dest,
uint8_t  type,
uint8_t  code 
) [private]

Definition at line 54 of file icmpv4-l4-protocol.cc.

void ns3::Icmpv4L4Protocol::SendTimeExceededTtl ( Ipv4Header  header,
Ptr< const Packet orgData 
)

Definition at line 111 of file icmpv4-l4-protocol.cc.

void ns3::Icmpv4L4Protocol::SetNode ( Ptr< Node node  ) 

Definition at line 37 of file icmpv4-l4-protocol.cc.


Member Data Documentation

Definition at line 57 of file icmpv4-l4-protocol.h.

Definition at line 56 of file icmpv4-l4-protocol.h.

Referenced by GetStaticProtocolNumber().


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