#include <ipv4-l4-protocol.h>
Public Member Functions | |
virtual int | GetProtocolNumber (void) const =0 |
virtual enum RxStatus | Receive (Ptr< Packet > p, Ipv4Address const &source, Ipv4Address const &destination, Ptr< Ipv4Interface > incomingInterface)=0 |
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]) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::Ipv4L4Protocol. |
This is an abstract base class for layer four protocols which use IPv4 as the network layer.
virtual int ns3::Ipv4L4Protocol::GetProtocolNumber | ( | void | ) | const [pure virtual] |
Implemented in ns3::NscTcpL4Protocol, ns3::TcpL4Protocol, and ns3::UdpL4Protocol.
static TypeId ns3::Ipv4L4Protocol::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::Ipv4L4Protocol.
Attributes defined for this type:
Reimplemented from ns3::Object.
Reimplemented in ns3::NscTcpL4Protocol, ns3::TcpL4Protocol, and ns3::UdpL4Protocol.
virtual enum RxStatus ns3::Ipv4L4Protocol::Receive | ( | Ptr< Packet > | p, | |
Ipv4Address const & | source, | |||
Ipv4Address const & | destination, | |||
Ptr< Ipv4Interface > | incomingInterface | |||
) | [pure 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 |
Implemented in ns3::NscTcpL4Protocol, ns3::TcpL4Protocol, and ns3::UdpL4Protocol.
virtual void ns3::Ipv4L4Protocol::ReceiveIcmp | ( | Ipv4Address | icmpSource, | |
uint8_t | icmpTtl, | |||
uint8_t | icmpType, | |||
uint8_t | icmpCode, | |||
uint32_t | icmpInfo, | |||
Ipv4Address | payloadSource, | |||
Ipv4Address | payloadDestination, | |||
const uint8_t | payload[8] | |||
) | [virtual] |
icmpSource | the source address of the icmp message | |
icmpTtl | the ttl of the icmp message | |
icmpType | the 'type' field of the icmp message | |
icmpCode | the 'code' field of the icmp message | |
icmpInfo | extra information dependent on the icmp message generated by Icmpv4L4Protocol | |
payloadSource | the source address of the packet which triggered the icmp message | |
payloadDestination | the destination address of the packet which triggered the icmp message. | |
payload | the first 8 bytes of the udp header of the packet which triggered the icmp message. |
Reimplemented in ns3::UdpL4Protocol.