src/routing/static-router.cc
author Craig Dowell <craigdo@ee.washington.edu>
Fri, 06 Jul 2007 15:05:47 -0700
changeset 1035 258aae8a6007
parent 1028 56460b160cef
child 1045 c2c43e021fb7
permissions -rw-r--r--
static routing
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1028
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     2
/*
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     3
 * This program is free software; you can redistribute it and/or modify
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     4
 * it under the terms of the GNU General Public License version 2 as
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     5
 * published by the Free Software Foundation;
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     6
 *
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     7
 * This program is distributed in the hope that it will be useful,
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
     9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    10
 * GNU General Public License for more details.
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    11
 *
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    12
 * You should have received a copy of the GNU General Public License
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    13
 * along with this program; if not, write to the Free Software
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    14
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    15
 */
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    16
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    17
#include "ns3/debug.h"
1035
258aae8a6007 static routing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1028
diff changeset
    18
#include "ns3/internet-node.h"
1028
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    19
#include "static-router.h"
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    20
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    21
NS_DEBUG_COMPONENT_DEFINE ("StaticRouter");
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    22
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    23
namespace ns3 {
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    24
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    25
const InterfaceId StaticRouter::iid = 
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    26
  MakeInterfaceId ("StaticRouter", Object::iid);
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    27
1035
258aae8a6007 static routing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1028
diff changeset
    28
StaticRouter::StaticRouter (Ptr<Node> node)
258aae8a6007 static routing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1028
diff changeset
    29
  : m_node(node)
1028
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    30
{
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    31
  SetInterfaceId (StaticRouter::iid);
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    32
  NS_DEBUG("StaticRouter::StaticRouter ()");
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    33
}
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    34
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    35
StaticRouter::~StaticRouter ()
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    36
{
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    37
  NS_DEBUG("StaticRouter::~StaticRouter ()");
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    38
}
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    39
56460b160cef beginnings of static routing
Craig Dowell <craigdo@ee.washington.edu>
parents:
diff changeset
    40
} // namespace ns3