nsc: move nsc glue code from nsc-tcp-l4-protocol to node/nsc-glue.cc.
known problems:
- sim_interface.h is duplicated
- nsc-glue.cc adds hooks in node.cc, "hijacks" incoming packets
- nsc-glue exports NSCs INetStack (instead of wrapping it completely)
- nsc-tcp-l4-protocol and nsc-tcp-socket-impl make calls into nsc-glue
- nsc-tcp-socket-impl should really be "nsc-socket-core" (or something
like that)
needs fixing on nsc side:
- no support for multiple interfaces yet (also not yet supported
on nsc side)
- nsc initialisation still tied to IP (Adding an Interface and assigning the
IP address is a single step; it should be separate)
maybe there is more.
There is a NSC_NEXT define in nsc-glue.h, its main purpose is to flag
the places where the NSC API needs to be adapted to support multiple
interfaces in nsc.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 as
5 * published by the Free Software Foundation;
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
21 #include "ns3/attribute.h"
22 #include "ns3/object.h"
28 // This object represents the underlying nsc stack,
29 // which is aggregated to a Node object, and which provides access to the
30 // sysctls of the nsc stack through attributes.
31 class Ns3NscStack : public Object
34 static TypeId GetTypeId (void);
35 virtual TypeId GetInstanceTypeId (void) const;
36 void SetStack (INetStack *stack) {m_stack = stack;}
39 friend class NscStackStringAccessor;
40 void Set (std::string name, std::string value);
41 std::string Get (std::string name) const;