1.1 --- a/src/internet-stack/nsc-tcp-l4-protocol.h Thu May 28 21:37:25 2009 -0700
1.2 +++ b/src/internet-stack/nsc-tcp-l4-protocol.h Wed Jul 15 18:46:14 2009 +0200
1.3 @@ -29,10 +29,8 @@
1.4
1.5 #include "tcp-header.h"
1.6
1.7 -#include "ns3/timer.h"
1.8 +#include "nsc-tcp-socket-impl.h"
1.9 #include "sim_interface.h"
1.10 -#include "nsc-tcp-socket-impl.h"
1.11 -
1.12 namespace ns3 {
1.13
1.14 class Node;
1.15 @@ -40,10 +38,10 @@
1.16 class TcpHeader;
1.17 /**
1.18 * \ingroup nsctcp
1.19 - *
1.20 + *
1.21 * \brief Nsc wrapper glue, to interface with the Ipv4 protocol underneath.
1.22 */
1.23 -class NscTcpL4Protocol : public Ipv4L4Protocol, ISendCallback, IInterruptCallback {
1.24 +class NscTcpL4Protocol : public Ipv4L4Protocol {
1.25 public:
1.26 static const uint8_t PROT_NUMBER;
1.27 static TypeId GetTypeId (void);
1.28 @@ -51,11 +49,13 @@
1.29 * \brief Constructor
1.30 */
1.31 NscTcpL4Protocol ();
1.32 - virtual ~NscTcpL4Protocol ();
1.33
1.34 void SetNode (Ptr<Node> node);
1.35 +
1.36 + // legacy, moved to node/node.cc
1.37 void SetNscLibrary (const std::string &lib);
1.38 std::string GetNscLibrary (void) const;
1.39 +
1.40 virtual int GetProtocolNumber (void) const;
1.41 virtual int GetVersion (void) const;
1.42
1.43 @@ -81,27 +81,12 @@
1.44 * \param destination The destinations Ipv4Address
1.45 * \param incomingInterface The Ipv4Interface it was received on
1.46 */
1.47 +
1.48 + // Stub function, not used in nsc
1.49 virtual Ipv4L4Protocol::RxStatus Receive (Ptr<Packet> p,
1.50 - Ipv4Address const &source,
1.51 - Ipv4Address const &destination,
1.52 - Ptr<Ipv4Interface> incomingInterface);
1.53 -
1.54 - // NSC callbacks.
1.55 - // NSC invokes these hooks to interact with the simulator.
1.56 - // In any case, these methods are only to be called by NSC.
1.57 - //
1.58 - // send_callback is invoked by NSCs 'ethernet driver' to re-inject
1.59 - // a packet (i.e. an octet soup consisting of an IP Header, TCP Header
1.60 - // and user payload, if any), into ns-3.
1.61 - virtual void send_callback(const void *data, int datalen);
1.62 - // This is called by the NSC stack whenever something of interest
1.63 - // has happened, e.g. when data arrives on a socket, a listen socket
1.64 - // has a new connection pending, etc.
1.65 - virtual void wakeup();
1.66 - // This is called by the Linux stack RNG initialization.
1.67 - // Its also used by the cradle code to add a timestamp to
1.68 - // printk/printf/debug output.
1.69 - virtual void gettime(unsigned int *, unsigned int *);
1.70 + Ipv4Address const &source,
1.71 + Ipv4Address const &destination,
1.72 + Ptr<Ipv4Interface> incomingInterface);
1.73
1.74 protected:
1.75 virtual void DoDispose (void);
1.76 @@ -111,14 +96,11 @@
1.77 Ipv4EndPointDemux *m_endPoints;
1.78 ObjectFactory m_rttFactory;
1.79 private:
1.80 - void AddInterface (void);
1.81 - void SoftInterrupt (void);
1.82 static ObjectFactory GetDefaultRttEstimatorFactory (void);
1.83 friend class NscTcpSocketImpl;
1.84 INetStack* m_nscStack;
1.85 - void *m_dlopenHandle;
1.86 + void Wakeup (void);
1.87 std::string m_nscLibrary;
1.88 - Timer m_softTimer;
1.89 std::vector<Ptr<NscTcpSocketImpl> > m_sockets;
1.90 };
1.91