helper/linux-stack-helper.h
author Hajime Tazaki <tazaki@sfc.wide.ad.jp>
Tue, 07 Jan 2014 00:26:21 +0900
changeset 541 de7335a01743
parent 403 6998fb05cf4f
permissions -rw-r--r--
Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
239
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
     2
/*
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
     3
 * Copyright (c) 2012 INRIA
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
     4
 *
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
     7
 * published by the Free Software Foundation;
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
     8
 *
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    12
 * GNU General Public License for more details.
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    13
 *
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    17
 *
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    18
 * Author: Frédéric Urbani
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    19
 */
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    20
#ifndef LINUX_STACK_HELPER_H
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    21
#define LINUX_STACK_HELPER_H
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    22
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    23
#include "ns3/object.h"
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    24
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    25
namespace ns3 {
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    26
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    27
class Node;
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    28
class NodeContainer;
330
c7fa4f378af8 Add a sysctl interface of Linux via LinuxStackHelper
Hajime Tazaki <tazaki@nict.go.jp>
parents: 239
diff changeset
    29
class Time;
541
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    30
class Ipv4RoutingHelper;
239
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    31
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    32
/**
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    33
 * \brief aggregate Ipv4Linux to nodes
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    34
 *
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    35
 * Today the first goal of the Ipv4Linux is to be able to use the standards NS-3 Helpers for two tasks:
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    36
 *   1 - assign address to devices using Ipv4AddressHelper,
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    37
 *   2 - create the static routes using Ipv4GlobalRoutingHelper
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    38
 *
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    39
 *
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    40
 */
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    41
class LinuxStackHelper
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    42
{
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    43
public:
541
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    44
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    45
  LinuxStackHelper ();
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    46
  ~LinuxStackHelper ();
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    47
239
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    48
  /**
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    49
   * Aggregate ns3::Ipv4Linux classe onto the provided node.
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    50
   * This method will assert if called on a node that
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    51
   * already has an Ipv4 object aggregated to it.
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    52
   *
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    53
   * \param nodeName The name of the node on which to install the stack.
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    54
   */
541
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    55
  void Install (std::string nodeName);
239
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    56
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    57
  /**
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    58
   * Aggregate ns3::Ipv4Linux classe onto the provided node.
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    59
   * This method will assert if called on a node that
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    60
   * already has an Ipv4 object aggregated to it.
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    61
   *
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    62
   * \param node The node on which to install the stack.
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    63
   */
541
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    64
  void Install (Ptr<Node> node);
239
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    65
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    66
  /**
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    67
   * Aggregate ns3::Ipv4Linux class onto the provided node.
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    68
   * This method will assert if called on a node that
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    69
   * already has an Ipv4 object aggregated to it.
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    70
   *
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    71
   * \param c NodeContainer that holds the set of nodes on which to install the
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    72
   * new stacks.
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    73
   */
541
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    74
  void Install (NodeContainer c);
239
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    75
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    76
  /**
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    77
   * Aggregate ns3::Ipv4Linux to all nodes in the simulation
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    78
   */
541
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    79
  void InstallAll (void);
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    80
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    81
  /**
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    82
   * \param routing a new routing helper
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    83
   *
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    84
   * Set the routing helper to use during Install. The routing
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    85
   * helper is really an object factory which is used to create 
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    86
   * an object of type ns3::Ipv4RoutingProtocol per node. This routing
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    87
   * object is then associated to a single ns3::Ipv4 object through its 
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    88
   * ns3::Ipv4::SetRoutingProtocol.
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    89
   */
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
    90
  void SetRoutingHelper (const Ipv4RoutingHelper &routing);
239
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
    91
403
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
    92
  /**
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
    93
   * Configure Linux kernel parameters with traditional 'sysctl' interface.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
    94
   *
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
    95
   * \param c NodeContainer that holds the set of nodes to configure this parameter.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
    96
   * \param path a string value for sysctl parameter. it starts from '.' following the name of parameter.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
    97
   *             e.g., ".net.ipv4.conf.default.forwarding"
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
    98
   * \param value a string value to set for sysctl parameter.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
    99
   */
330
c7fa4f378af8 Add a sysctl interface of Linux via LinuxStackHelper
Hajime Tazaki <tazaki@nict.go.jp>
parents: 239
diff changeset
   100
  void SysctlSet (NodeContainer c, std::string path, std::string value);
403
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   101
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   102
  /**
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   103
   * Obtain Linux kernel state with traditional 'sysctl' interface.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   104
   *
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   105
   * \param node The node pointer Ptr<Node> that will ask the status.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   106
   * \param at the delta from the begining of simulation to ask this query.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   107
   * \param path a string value for sysctl parameter. it starts from '.' following the name of parameter.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   108
   *             e.g., ".net.ipv4.conf.default.forwarding"
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   109
   * \param callback a callback function to parse the result of sysctl query.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   110
   */
367
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 330
diff changeset
   111
  static void SysctlGet (Ptr<Node> node, Time at, std::string path,
330
c7fa4f378af8 Add a sysctl interface of Linux via LinuxStackHelper
Hajime Tazaki <tazaki@nict.go.jp>
parents: 239
diff changeset
   112
                         void (*callback)(std::string, std::string));
403
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   113
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   114
  /**
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   115
   * Populate routing information to all the nodes in network from GlobalRoutingTable.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   116
   *
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   117
   * Limitation:
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   118
   * 1) This method SHOULD call after Ipv4GlobalRoutingHelper::PopulateRoutingTables () so that
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   119
   * LinuxStackHelper can obtain the route information.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   120
   * 2) This feature is only available for IPv4 route information. IPv6 is not implemented.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   121
   *
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   122
   */
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   123
  static void PopulateRoutingTables ();
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   124
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   125
  /**
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   126
   * Execute "ip" command (of Linux) on a specific node to configure the ip address/route/etc information.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   127
   *
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   128
   * \param node The node pointer Ptr<Node> to configure.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   129
   * \param at the delta from the begining of simulation to execute this command.
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   130
   * \param str a string for the command line argument of ip command. e.g., "route add 10.0.1.0/24 via 10.0.0.1"
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   131
   */
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   132
  static void RunIp (Ptr<Node> node, Time at, std::string str);
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   133
330
c7fa4f378af8 Add a sysctl interface of Linux via LinuxStackHelper
Hajime Tazaki <tazaki@nict.go.jp>
parents: 239
diff changeset
   134
private:
541
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
   135
  void Initialize ();
de7335a01743 Bug 1713 - Ipv6 address configuration support for LinuxStackHelper
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 403
diff changeset
   136
  const Ipv4RoutingHelper *m_routing;
367
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 330
diff changeset
   137
  static void SysctlGetCallback (Ptr<Node> node, std::string path,
330
c7fa4f378af8 Add a sysctl interface of Linux via LinuxStackHelper
Hajime Tazaki <tazaki@nict.go.jp>
parents: 239
diff changeset
   138
                                 void (*callback)(std::string, std::string));
367
be749a6bbde0 coding style adapted. check-style.py applied with manuay modification.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 330
diff changeset
   139
403
6998fb05cf4f Bug 1448 - DCE Kernel mode. Create a helper in order to create automatically the static routes.
Hajime Tazaki <tazaki@nict.go.jp>
parents: 367
diff changeset
   140
239
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
   141
};
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
   142
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
   143
} // namespace ns3
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
   144
46380fd02339 Add LinuxStackHelper classes which help you to assign ip to devices,
frederic.urbani@inria.fr
parents:
diff changeset
   145
#endif // LINUX_STACK_HELPER_H