#include <icmpv4-l4-protocol.h>
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< Node > | m_node |
bool | m_calcChecksum |
Definition at line 13 of file icmpv4-l4-protocol.h.
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.
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] |
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:
Attributes defined in parent class ns3::Ipv4L4Protocol:
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] |
Definition at line 150 of file icmpv4-l4-protocol.cc.
References ns3::Icmpv4Header::GetCode(), ns3::Ipv4Header::GetDestination(), ns3::Ipv4Header::GetSource(), ns3::Ipv4Header::GetTtl(), and ns3::Icmpv4Header::GetType().
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] |
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] |
Definition at line 97 of file icmpv4-l4-protocol.cc.
References NS_LOG_FUNCTION, and ns3::Icmpv4DestinationUnreachable::PORT_UNREACHABLE.
Referenced by SendDestUnreachPort().
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 | |||
) |
Definition at line 90 of file icmpv4-l4-protocol.cc.
References ns3::Icmpv4DestinationUnreachable::FRAG_NEEDED, NS_LOG_FUNCTION, and SendDestUnreach().
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.
Definition at line 37 of file icmpv4-l4-protocol.cc.
bool ns3::Icmpv4L4Protocol::m_calcChecksum [private] |
Definition at line 57 of file icmpv4-l4-protocol.h.
Ptr<Node> ns3::Icmpv4L4Protocol::m_node [private] |
Definition at line 56 of file icmpv4-l4-protocol.h.
Referenced by GetStaticProtocolNumber().