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