21 #ifndef TCP_L4_PROTOCOL_H
22 #define TCP_L4_PROTOCOL_H
26 #include "ns3/packet.h"
27 #include "ns3/ipv4-address.h"
28 #include "ns3/ipv6-address.h"
30 #include "ns3/object-factory.h"
32 #include "ns3/net-device.h"
39 class Ipv4EndPointDemux;
40 class Ipv6EndPointDemux;
133 uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
135 const uint8_t payload[8]);
137 uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
139 const uint8_t payload[8]);
Ptr< Socket > CreateSocket(void)
virtual void SetDownTarget6(IpL4Protocol::DownTargetCallback6 cb)
virtual IpL4Protocol::DownTargetCallback6 GetDownTarget6(void) const
virtual void DoDispose(void)
Ipv6EndPoint * Allocate6(void)
void Send(Ptr< Packet > packet, Ipv4Address saddr, Ipv4Address daddr, uint16_t sport, uint16_t dport, Ptr< NetDevice > oif=0)
Send a packet via TCP.
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])
Receive an ICMP packet.
void DeAllocate(Ipv4EndPoint *endPoint)
A layer between the sockets interface and IP.
virtual void NotifyNewAggregate()
Demultiplexes packets to various transport layer endpoints.
virtual enum IpL4Protocol::RxStatus Receive(Ptr< Packet > p, Ipv4Header const &header, Ptr< Ipv4Interface > incomingInterface)
Receive a packet up the protocol stack.
TcpL4Protocol()
Constructor.
virtual IpL4Protocol::DownTargetCallback GetDownTarget(void) const
A base class for implementation of a stream socket using TCP.
std::vector< Ptr< TcpSocketBase > > m_sockets
static const uint8_t PROT_NUMBER
Ipv6EndPointDemux * m_endPoints6
virtual int GetProtocolNumber(void) const
TcpL4Protocol & operator=(const TcpL4Protocol &o)
void SendPacket(Ptr< Packet >, const TcpHeader &, Ipv4Address, Ipv4Address, Ptr< NetDevice > oif=0)
L4 Protocol abstract base class.
Ipv4EndPoint * Allocate(void)
Ipv4EndPointDemux * m_endPoints
void SetNode(Ptr< Node > node)
Describes an IPv6 address.
Ipv4 addresses are stored in host order in this class.
static TypeId GetTypeId(void)
Demultiplexor for end points.
An IPv6 end point, four tuples identification.
virtual void SetDownTarget(IpL4Protocol::DownTargetCallback cb)
a unique identifier for an interface.
IpL4Protocol::DownTargetCallback6 m_downTarget6
A representation of an internet endpoint/connection.
IpL4Protocol::DownTargetCallback m_downTarget