12#ifndef IP_L4_PROTOCOL_H
13#define IP_L4_PROTOCOL_H
18#include "ns3/callback.h"
19#include "ns3/object.h"
112 const uint8_t payload[8]);
136 const uint8_t payload[8]);
L4 Protocol abstract base class.
virtual void SetDownTarget6(DownTargetCallback6 cb)=0
This method allows a caller to set the current down target callback set for this L4 protocol (IPv6 ca...
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])
Called from lower-level layers to send the ICMP packet up in the stack.
virtual RxStatus Receive(Ptr< Packet > p, const Ipv4Header &header, Ptr< Ipv4Interface > incomingInterface)=0
Called from lower-level layers to send the packet up in the stack.
virtual int GetProtocolNumber() const =0
Returns the protocol number of this protocol.
virtual DownTargetCallback GetDownTarget() const =0
This method allows a caller to get the current down target callback set for this L4 protocol (IPv4 ca...
Callback< void, Ptr< Packet >, Ipv4Address, Ipv4Address, uint8_t, Ptr< Ipv4Route > > DownTargetCallback
callback to send packets over IPv4
Callback< void, Ptr< Packet >, Ipv6Address, Ipv6Address, uint8_t, Ptr< Ipv6Route > > DownTargetCallback6
callback to send packets over IPv6
virtual void SetDownTarget(DownTargetCallback cb)=0
This method allows a caller to set the current down target callback set for this L4 protocol (IPv4 ca...
virtual DownTargetCallback6 GetDownTarget6() const =0
This method allows a caller to get the current down target callback set for this L4 protocol (IPv6 ca...
virtual RxStatus Receive(Ptr< Packet > p, const Ipv6Header &header, Ptr< Ipv6Interface > incomingInterface)=0
Called from lower-level layers to send the packet up in the stack.
static TypeId GetTypeId()
Get the type ID.
Ipv4 addresses are stored in host order in this class.
Describes an IPv6 address.
A base class which provides memory management and object aggregation.
Smart pointer class similar to boost::intrusive_ptr.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.