00001 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ 00002 /* 00003 * This program is free software; you can redistribute it and/or modify 00004 * it under the terms of the GNU General Public License version 2 as 00005 * published by the Free Software Foundation; 00006 * 00007 * This program is distributed in the hope that it will be useful, 00008 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00009 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00010 * GNU General Public License for more details. 00011 * 00012 * You should have received a copy of the GNU General Public License 00013 * along with this program; if not, write to the Free Software 00014 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00015 * 00016 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> 00017 */ 00018 00019 #include <string> 00020 00021 #include "ns3/attribute.h" 00022 #include "ns3/object.h" 00023 00024 struct INetStack; 00025 00026 namespace ns3 { 00027 00028 // This object represents the underlying nsc stack, 00029 // which is aggregated to a Node object, and which provides access to the 00030 // sysctls of the nsc stack through attributes. 00031 class Ns3NscStack : public Object 00032 { 00033 public: 00034 static TypeId GetTypeId (void); 00035 virtual TypeId GetInstanceTypeId (void) const; 00036 void SetStack (INetStack *stack) {m_stack = stack;} 00037 00038 private: 00039 friend class NscStackStringAccessor; 00040 void Set (std::string name, std::string value); 00041 std::string Get (std::string name) const; 00042 INetStack *m_stack; 00043 }; 00044 } // namespace ns3