static routing

This commit is contained in:
Craig Dowell
2007-07-06 15:06:26 -07:00
parent d0ff4c3306
commit 42bc462559
2 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "ns3/debug.h"
#include "ns3/default-value.h"
#include "routing-environment.h"
NS_DEBUG_COMPONENT_DEFINE ("RoutingEnvironment");
namespace ns3 {
namespace RoutingEnvironment {
BooleanDefaultValue g_doStaticRoutingDefaultValue ("DoStaticRouting",
"Enable global static routing", false);
bool
StaticRoutingEnabled(void)
{
return g_doStaticRoutingDefaultValue.GetValue();
}
} // namespace RoutingEnvironment
} // namespace ns3

View File

@@ -0,0 +1,32 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef ROUTING_ENVIRONMENT_H
#define ROUTING_ENVIRONMENT_H
#include <stdint.h>
#include "ns3/object.h"
#include "ns3/ptr.h"
#include "ns3/ipv4-address.h"
namespace ns3 {
namespace RoutingEnvironment {
bool StaticRoutingEnabled(void);
} // namespace RoutingEnvironment
} // namespace ns3
#endif /* ROUTING_ENVIRONMENT_H */