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;
207 uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
209 const uint8_t payload[8]);
211 uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
213 const uint8_t payload[8]);
Ptr< Socket > CreateSocket(void)
Create a TCP socket.
TypeId m_socketTypeId
The socket TypeId.
Ptr< Node > m_node
the node this stack is associated with
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...
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...
virtual void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
Ipv6EndPoint * Allocate6(void)
Allocate an IPv6 Endpoint.
void Send(Ptr< Packet > packet, Ipv4Address saddr, Ipv4Address daddr, uint16_t sport, uint16_t dport, Ptr< NetDevice > oif=0)
Send a packet via TCP (IPv4)
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.
void DeAllocate(Ipv4EndPoint *endPoint)
Remove an IPv4 Endpoint.
A layer between the sockets interface and IP.
virtual void NotifyNewAggregate()
This method is invoked whenever two sets of objects are aggregated together.
Demultiplexes packets to various transport layer endpoints.
TcpL4Protocol & operator=(const TcpL4Protocol &)
Copy constructor.
virtual enum IpL4Protocol::RxStatus Receive(Ptr< Packet > p, Ipv4Header const &header, Ptr< Ipv4Interface > incomingInterface)
Called from lower-level layers to send the packet up in the stack.
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...
A base class for implementation of a stream socket using TCP.
std::vector< Ptr< TcpSocketBase > > m_sockets
list of sockets
static const uint8_t PROT_NUMBER
protocol number (0x6)
Ipv6EndPointDemux * m_endPoints6
A list of IPv6 end points.
virtual int GetProtocolNumber(void) const
void SendPacket(Ptr< Packet >, const TcpHeader &, Ipv4Address, Ipv4Address, Ptr< NetDevice > oif=0)
L4 Protocol abstract base class.
Ipv4EndPoint * Allocate(void)
Allocate an IPv4 Endpoint.
Ipv4EndPointDemux * m_endPoints
A list of IPv4 end points.
void SetNode(Ptr< Node > node)
Set node associated with this stack.
Describes an IPv6 address.
Ipv4 addresses are stored in host order in this class.
static TypeId GetTypeId(void)
Get the type ID.
Demultiplexor for end points.
A representation of an internet IPv6 endpoint/connection.
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...
TypeId m_rttTypeId
The RTT Estimator TypeId.
a unique identifier for an interface.
IpL4Protocol::DownTargetCallback6 m_downTarget6
Callback to send packets over IPv6.
A representation of an internet endpoint/connection.
IpL4Protocol::DownTargetCallback m_downTarget
Callback to send packets over IPv4.