A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
nsc-sysctl.h
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
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;
6  *
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.
11  *
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
15  *
16  * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
17  */
18 
19 #include <string>
20 
21 #include "ns3/attribute.h"
22 #include "ns3/object.h"
23 
24 struct INetStack;
25 
26 namespace ns3 {
27 
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
32 {
33 public:
34  static TypeId GetTypeId (void);
35  virtual TypeId GetInstanceTypeId (void) const;
36  void SetStack (INetStack *stack) { m_stack = stack; }
37 
38 private:
39  friend class NscStackStringAccessor;
40  void Set (std::string name, std::string value);
41  std::string Get (std::string name) const;
42  INetStack *m_stack;
43 };
44 } // namespace ns3
virtual TypeId GetInstanceTypeId(void) const
Definition: nsc-sysctl.cc:84
a base class which provides memory management and object aggregation
Definition: object.h:63
a unique identifier for an interface.
Definition: type-id.h:44