src/internet/model/ipv6-static-routing.h
author Mitch Watrous <watrous@u.washington.edu>
Tue, 17 May 2011 17:36:08 -0700
changeset 7233 be0d7443b4ff
parent 7176 9f2663992e99
child 7385 10beb0e53130
permissions -rw-r--r--
Updated the modules doxygen page
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
     1
/* -*-  Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
     2
/*
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
     3
 * Copyright (c) 2007-2009 Strasbourg University
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
     4
 *
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License version 2 as
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
     7
 * published by the Free Software Foundation;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
     8
 *
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    12
 * GNU General Public License for more details.
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    13
 *
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    17
 *
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    18
 * Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    19
 */
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    20
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    21
#ifndef IPV6_STATIC_ROUTING_H
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    22
#define IPV6_STATIC_ROUTING_H
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    23
5217
8a9dbc333e76 Export more IPv6 includes.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 4761
diff changeset
    24
#include <stdint.h>
8a9dbc333e76 Export more IPv6 includes.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 4761
diff changeset
    25
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    26
#include <list>
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    27
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    28
#include "ns3/ptr.h"
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    29
#include "ns3/ipv6-address.h"
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    30
#include "ns3/ipv6.h"
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    31
#include "ns3/ipv6-header.h"
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    32
#include "ns3/ipv6-routing-protocol.h"
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    33
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    34
namespace ns3
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    35
{
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    36
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    37
class Packet;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    38
class NetDevice;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    39
class Ipv6Interface;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    40
class Ipv6Route;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    41
class Node;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    42
class Ipv6RoutingTableEntry;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    43
class Ipv6MulticastRoutingTableEntry;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    44
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    45
/**
7233
be0d7443b4ff Updated the modules doxygen page
Mitch Watrous <watrous@u.washington.edu>
parents: 7176
diff changeset
    46
 * \ingroup internet
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    47
 * \defgroup ipv6StaticRouting Ipv6StaticRouting
4761
8c0b3a413f4b Add metric and longest prefix match support for IPv6.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 4741
diff changeset
    48
 */
8c0b3a413f4b Add metric and longest prefix match support for IPv6.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 4741
diff changeset
    49
/**
8c0b3a413f4b Add metric and longest prefix match support for IPv6.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 4741
diff changeset
    50
 * \ingroup ipv6StaticRouting
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    51
 * \class Ipv6StaticRouting
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    52
 * \brief Static routing protocol for IP version 6 stack.
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    53
 * \see Ipv6RoutingProtocol
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    54
 * \see Ipv6ListRouting
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    55
 */
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    56
class Ipv6StaticRouting : public Ipv6RoutingProtocol
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    57
{
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    58
public:
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    59
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    60
   * \brief The interface Id associated with this class.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    61
   * \return type identifier
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    62
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    63
  static TypeId GetTypeId ();
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    64
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    65
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    66
   * \brief Constructor.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    67
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    68
  Ipv6StaticRouting ();
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    69
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    70
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    71
   * \brief Destructor.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    72
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    73
  virtual ~Ipv6StaticRouting ();
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    74
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    75
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    76
   * \brief Add route to host.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    77
   * \param dest destination address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    78
   * \param nextHop next hop address to route the packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    79
   * \param interface interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    80
   * \param prefixToUse prefix that should be used for source address for this destination
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    81
   * \param metric metric of route in case of multiple routes to same destination
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    82
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    83
  void AddHostRouteTo (Ipv6Address dest, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address ("::"), uint32_t metric = 0);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    84
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    85
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    86
   * \brief Add route to host.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    87
   * \param dest destination address.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    88
   * \param interface interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    89
   * \param metric metric of route in case of multiple routes to same destination
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    90
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    91
  void AddHostRouteTo (Ipv6Address dest, uint32_t interface, uint32_t metric = 0);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    92
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    93
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    94
   * \brief Add route to network.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    95
   * \param network network address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    96
   * \param networkPrefix network prefix*
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    97
   * \param nextHop next hop address to route the packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    98
   * \param interface interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
    99
   * \param metric metric of route in case of multiple routes to same destination
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   100
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   101
  void AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, uint32_t metric = 0);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   102
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   103
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   104
   * \brief Add route to network.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   105
   * \param network network address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   106
   * \param networkPrefix network prefix*
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   107
   * \param nextHop next hop address to route the packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   108
   * \param interface interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   109
   * \param prefixToUse prefix that should be used for source address for this destination
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   110
   * \param metric metric of route in case of multiple routes to same destination
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   111
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   112
  void AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse, uint32_t metric = 0);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   113
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   114
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   115
   * \brief Add route to network.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   116
   * \param network network address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   117
   * \param networkPrefix network prefix
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   118
   * \param interface interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   119
   * \param metric metric of route in case of multiple routes to same destination
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   120
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   121
  void AddNetworkRouteTo (Ipv6Address network, Ipv6Prefix networkPrefix, uint32_t interface, uint32_t metric = 0);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   122
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   123
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   124
   * \brief Set the default route.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   125
   * \param nextHop next hop address to route the packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   126
   * \param interface interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   127
   * \param prefixToUse prefix to use (i.e for multihoming)
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   128
   * \param metric metric of route in case of multiple routes to same destination
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   129
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   130
  void SetDefaultRoute (Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address ("::"), uint32_t metric = 0);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   131
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   132
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   133
   * \brief Get the number or entries in the routing table.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   134
   * \return number of entries
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   135
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   136
  uint32_t GetNRoutes ();
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   137
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   138
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   139
   * \brief Get the default route.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   140
   *
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   141
   * If multiple default routes exist, the one with lowest metric is returned.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   142
   * \return default Ipv6Route
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   143
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   144
  Ipv6RoutingTableEntry GetDefaultRoute ();
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   145
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   146
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   147
   * \brief Get a specified route.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   148
   * \param i index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   149
   * \return the route whose index is i
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   150
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   151
  Ipv6RoutingTableEntry GetRoute (uint32_t i);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   152
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   153
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   154
   * \brief Get a metric for route from the static unicast routing table.
7176
9f2663992e99 internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents: 6834
diff changeset
   155
   * \param index The index (into the routing table) of the route to retrieve.
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   156
   * \return If route is set, the metric is returned. If not, an infinity metric (0xffffffff) is returned
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   157
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   158
  uint32_t GetMetric (uint32_t index);
4761
8c0b3a413f4b Add metric and longest prefix match support for IPv6.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 4741
diff changeset
   159
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   160
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   161
   * \brief Remove a route from the routing table.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   162
   * \param i index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   163
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   164
  void RemoveRoute (uint32_t i);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   165
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   166
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   167
   * \brief Remove a route from the routing table.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   168
   * \param network IPv6 network
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   169
   * \param prefix IPv6 prefix
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   170
   * \param ifIndex interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   171
   * \param prefixToUse IPv6 prefix to use with this route (multihoming)
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   172
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   173
  void RemoveRoute (Ipv6Address network, Ipv6Prefix prefix, uint32_t ifIndex, Ipv6Address prefixToUse);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   174
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   175
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   176
   * \brief Add a multicast route for a given multicast source and group.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   177
   * \param origin IPv6 address of the source
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   178
   * \param group the multicast group address.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   179
   * \param inputInterface the interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   180
   * \param outputInterfaces the list of output interface indices over which the packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   181
   * should be sent (excluding the inputInterface).
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   182
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   183
  void AddMulticastRoute (Ipv6Address origin, Ipv6Address group, uint32_t inputInterface, std::vector<uint32_t> outputInterfaces);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   184
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   185
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   186
   * \brief Set the default multicast route.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   187
   * \param outputInterface default output interface
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   188
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   189
  void SetDefaultMulticastRoute (uint32_t outputInterface);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   190
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   191
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   192
   * \brief Get the number of entries in the multicast routing table.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   193
   * \return number of entries
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   194
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   195
  uint32_t GetNMulticastRoutes () const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   196
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   197
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   198
   * \brief Get the specified multicast route.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   199
   * \param i index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   200
   * \return the route whose index is i
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   201
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   202
  Ipv6MulticastRoutingTableEntry GetMulticastRoute (uint32_t i) const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   203
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   204
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   205
   * \brief Remove a static multicast route.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   206
   * \param origin IPv6 address of the source
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   207
   * \param group the multicast group address.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   208
   * \param inputInterface the input interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   209
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   210
  bool RemoveMulticastRoute (Ipv6Address origin, Ipv6Address group, uint32_t inputInterface);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   211
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   212
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   213
   * \brief Remove a multicast route.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   214
   * \param i index of route to remove
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   215
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   216
  void RemoveMulticastRoute (uint32_t i);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   217
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   218
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   219
   * \brief If the destination is already present in network destination list.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   220
   * \param dest destination address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   221
   * \param interfaceIndex interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   222
   * \return true if dest is already in list, false otherwise
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   223
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   224
  bool HasNetworkDest (Ipv6Address dest, uint32_t interfaceIndex);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   225
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   226
  virtual Ptr<Ipv6Route> RouteOutput (Ptr<Packet> p, const Ipv6Header &header, Ptr<NetDevice> oif, Socket::SocketErrno &sockerr);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   227
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   228
  virtual bool RouteInput  (Ptr<const Packet> p, const Ipv6Header &header, Ptr<const NetDevice> idev,
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   229
                            UnicastForwardCallback ucb, MulticastForwardCallback mcb,
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   230
                            LocalDeliverCallback lcb, ErrorCallback ecb);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   231
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   232
  virtual void NotifyInterfaceUp (uint32_t interface);
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   233
  virtual void NotifyInterfaceDown (uint32_t interface);
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   234
  virtual void NotifyAddAddress (uint32_t interface, Ipv6InterfaceAddress address);
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   235
  virtual void NotifyRemoveAddress (uint32_t interface, Ipv6InterfaceAddress address);
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   236
  virtual void NotifyAddRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ());
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   237
  virtual void NotifyRemoveRoute (Ipv6Address dst, Ipv6Prefix mask, Ipv6Address nextHop, uint32_t interface, Ipv6Address prefixToUse = Ipv6Address::GetZero ());
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   238
  virtual void SetIpv6 (Ptr<Ipv6> ipv6);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   239
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   240
protected:
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   241
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   242
   * \brief Dispose this object.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   243
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   244
  void DoDispose ();
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   245
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   246
private:
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   247
  typedef std::list<std::pair <Ipv6RoutingTableEntry *, uint32_t> > NetworkRoutes;
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   248
  typedef std::list<std::pair <Ipv6RoutingTableEntry *, uint32_t> >::const_iterator NetworkRoutesCI;
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   249
  typedef std::list<std::pair <Ipv6RoutingTableEntry *, uint32_t> >::iterator NetworkRoutesI;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   250
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   251
  typedef std::list<Ipv6MulticastRoutingTableEntry *> MulticastRoutes;
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   252
  typedef std::list<Ipv6MulticastRoutingTableEntry *>::const_iterator MulticastRoutesCI;
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   253
  typedef std::list<Ipv6MulticastRoutingTableEntry *>::iterator MulticastRoutesI;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   254
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   255
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   256
   * \brief Lookup in the forwarding table for destination.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   257
   * \param dest destination address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   258
   * \param interface output interface if any (put 0 otherwise)
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   259
   * \return Ipv6Route to route the packet to reach dest address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   260
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   261
  Ptr<Ipv6Route> LookupStatic (Ipv6Address dest, Ptr<NetDevice> = 0);
5800
082bd197b99a Use RouteOutput instead of getting Ipv6StaticRouting and call LookupStatic.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   262
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   263
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   264
   * \brief Lookup in the multicast forwarding table for destination.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   265
   * \param origin source address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   266
   * \param group group multicast address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   267
   * \param ifIndex interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   268
   * \return Ipv6MulticastRoute to route the packet to reach dest address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   269
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   270
  Ptr<Ipv6MulticastRoute> LookupStatic (Ipv6Address origin, Ipv6Address group, uint32_t ifIndex);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   271
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   272
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   273
   * \brief Choose the source address to use with destination address.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   274
   * \param interface interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   275
   * \param dest IPv6 destination address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   276
   * \return IPv6 source address to use
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   277
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   278
  Ipv6Address SourceAddressSelection (uint32_t interface, Ipv6Address dest);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   279
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   280
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   281
   * \brief the forwarding table for network.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   282
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   283
  NetworkRoutes m_networkRoutes;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   284
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   285
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   286
   * \brief the forwarding table for multicast.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   287
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   288
  MulticastRoutes m_multicastRoutes;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   289
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   290
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   291
   * \brief Ipv6 reference.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   292
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5856
diff changeset
   293
  Ptr<Ipv6> m_ipv6;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   294
};
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   295
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   296
} /* namespace ns3 */
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   297
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   298
#endif /* IPV6_STATIC_ROUTING_H */
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   299