|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
21 #ifndef ICMPV4_L4_PROTOCOL_H
22 #define ICMPV4_L4_PROTOCOL_H
26 #include "ns3/ipv4-address.h"
176 uint8_t code, uint16_t nextHopMtu);
208 const uint8_t payload[8]);
a unique identifier for an interface.
void SendDestUnreachPort(Ipv4Header header, Ptr< const Packet > orgData)
Send a Time Exceeded ICMP error.
virtual IpL4Protocol::DownTargetCallback6 GetDownTarget6(void) const
This method allows a caller to get the current down target callback set for this L4 protocol (IPv6 ca...
void SetNode(Ptr< Node > node)
Set the node the protocol is associated with.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual enum IpL4Protocol::RxStatus Receive(Ptr< Packet > p, Ipv4Header const &header, Ptr< Ipv4Interface > incomingInterface)
Receive method.
void HandleEcho(Ptr< Packet > p, Icmpv4Header header, Ipv4Address source, Ipv4Address destination)
Handles an incoming ICMP Echo packet.
void SendDestUnreachFragNeeded(Ipv4Header header, Ptr< const Packet > orgData, uint16_t nextHopMtu)
Send a Destination Unreachable - Fragmentation needed ICMP error.
Ipv4 addresses are stored in host order in this class.
virtual void DoDispose(void)
Destructor implementation.
virtual int GetProtocolNumber(void) const
Get the protocol number.
This is the implementation of the ICMP protocol as described in RFC 792.
static const uint8_t PROT_NUMBER
ICMP protocol number (0x1)
void SendTimeExceededTtl(Ipv4Header header, Ptr< const Packet > orgData, bool isFragment)
Send a Time Exceeded ICMP error.
static uint16_t GetStaticProtocolNumber(void)
Get the protocol number.
void HandleDestUnreach(Ptr< Packet > p, Icmpv4Header header, Ipv4Address source, Ipv4Address destination)
Handles an incoming ICMP Destination Unreachable packet.
virtual ~Icmpv4L4Protocol()
static TypeId GetTypeId(void)
Get the type ID.
Ptr< Node > m_node
the node this protocol is associated with
L4 Protocol abstract base class.
void Forward(Ipv4Address source, Icmpv4Header icmp, uint32_t info, Ipv4Header ipHeader, const uint8_t payload[8])
Forward the message to an L4 protocol.
IpL4Protocol::DownTargetCallback m_downTarget
callback to Ipv4::Send
void SendDestUnreach(Ipv4Header header, Ptr< const Packet > orgData, uint8_t code, uint16_t nextHopMtu)
Send an ICMP Destination Unreachable packet.
virtual IpL4Protocol::DownTargetCallback GetDownTarget(void) const
This method allows a caller to get the current down target callback set for this L4 protocol (IPv4 ca...
virtual void NotifyNewAggregate()
Notify all Objects aggregated to this one of a new Object being aggregated.
void SendMessage(Ptr< Packet > packet, Ipv4Address dest, uint8_t type, uint8_t code)
Send a generic ICMP packet.
virtual void SetDownTarget(IpL4Protocol::DownTargetCallback cb)
This method allows a caller to set the current down target callback set for this L4 protocol (IPv4 ca...
void HandleTimeExceeded(Ptr< Packet > p, Icmpv4Header icmp, Ipv4Address source, Ipv4Address destination)
Handles an incoming ICMP Time Exceeded packet.
virtual void SetDownTarget6(IpL4Protocol::DownTargetCallback6 cb)
This method allows a caller to set the current down target callback set for this L4 protocol (IPv6 ca...