|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
17 #ifndef NSC_TCP_L4_PROTOCOL_H
18 #define NSC_TCP_L4_PROTOCOL_H
22 #include "ns3/packet.h"
23 #include "ns3/ipv4-address.h"
25 #include "ns3/object-factory.h"
26 #include "ns3/timer.h"
35 class Ipv4EndPointDemux;
37 class NscTcpSocketImpl;
39 class NscInterfaceImpl;
196 void gettime (
unsigned int *sec,
unsigned int *usec);
a unique identifier for an interface.
void * m_dlopenHandle
dynamic library handle.
NscInterfaceImpl * m_nscInterface
the NSC Interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetNode(Ptr< Node > node)
Set node associated with this stack.
Nsc interface implementation class.
void gettime(unsigned int *sec, unsigned int *usec)
Called by the Linux stack RNG initialization.
Ipv4 addresses are stored in host order in this class.
void wakeup()
Called by the NSC stack whenever something of interest has happened.
Ptr< Socket > CreateSocket(void)
INetStack * m_nscStack
the NSC stack.
Nsc wrapper glue, to interface with the Ipv4 protocol underneath.
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...
Ipv4EndPointDemux * m_endPoints
A list of IPv4 end points.
virtual ~NscTcpL4Protocol()
A simple virtual Timer class.
virtual int GetVersion(void) const
Get the NSC version.
static TypeId GetTypeId(void)
Get the type ID.
std::string GetNscLibrary(void) const
Get the NSC library being used.
void DeAllocate(Ipv4EndPoint *endPoint)
Remove an IPv4 Endpoint.
Ipv4EndPoint * Allocate(void)
Allocate an IPv4 Endpoint.
static const uint8_t PROT_NUMBER
protocol number (0x6)
Demultiplexes packets to various transport layer endpoints.
virtual 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.
Socket logic for the NSC TCP sockets.
void AddInterface(void)
Add an interface.
std::string m_nscLibrary
path to the NSC library.
L4 Protocol abstract base class.
std::vector< Ptr< NscTcpSocketImpl > > m_sockets
list of sockets
virtual void DoDispose(void)
Destructor implementation.
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...
void SoftInterrupt(void)
Provide a "soft" interrupt to NSC.
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...
Ptr< Node > m_node
the node this stack is associated with
void send_callback(const void *data, int datalen)
Invoked by NSCs 'ethernet driver' to re-inject a packet into ns-3.
NscTcpL4Protocol(NscTcpL4Protocol const &)
Copy constructor.
IpL4Protocol::DownTargetCallback m_downTarget
Callback to send packets over IPv4.
void SetNscLibrary(const std::string &lib)
Set the NSC library to be used.
Timer m_softTimer
Soft interrupt timer.
virtual void NotifyNewAggregate()
Notify all Objects aggregated to this one of a new Object being aggregated.
Struct interface to NSC stack.
virtual int GetProtocolNumber(void) const
Returns the protocol number of this protocol.
NscTcpL4Protocol & operator=(NscTcpL4Protocol const &)
Copy constructor.
A representation of an internet endpoint/connection.
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...