src/internet/model/ipv6-l3-protocol.h
author Brian Swenson <bswenson3@gatech.edu>
Tue, 22 Apr 2014 11:52:55 -0400
changeset 10694 4af272d94cfd
parent 10692 bdf59f5ace93
child 10872 0d7c9bf5f537
permissions -rw-r--r--
Bug 1791
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7385
10beb0e53130 standardize emacs c++ mode comments
Vedran Miletić <rivanvx@gmail.com>
parents: 7158
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
4731
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_L3_PROTOCOL_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_L3_PROTOCOL_H
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    23
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    24
#include <list>
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    25
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    26
#include "ns3/traced-callback.h"
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    27
#include "ns3/net-device.h"
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    28
#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
    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-header.h"
10127
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
    31
#include "ns3/ipv6-pmtu-cache.h"
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    32
10553
8c347165bb56 Move tests outside ns3 namespace
Vedran Miletić <rivanvx@gmail.com>
parents: 10496
diff changeset
    33
class Ipv6L3ProtocolTestCase;
8c347165bb56 Move tests outside ns3 namespace
Vedran Miletić <rivanvx@gmail.com>
parents: 10496
diff changeset
    34
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    35
namespace ns3
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
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    38
class Node;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    39
class Ipv6Interface;
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7385
diff changeset
    40
class IpL4Protocol;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    41
class Ipv6Route;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    42
class Ipv6MulticastRoute;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    43
class Ipv6RawSocketImpl;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    44
class Icmpv6L4Protocol;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    45
class Ipv6AutoconfiguredPrefix;
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    46
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    47
/**
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    48
 * \class Ipv6L3Protocol
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    49
 * \brief IPv6 layer implementation.
5373
97402b61fb82 Gustavo patch for bug 676
Craig Dowell <craigdo@ee.washington.edu>
parents: 5338
diff changeset
    50
 *
97402b61fb82 Gustavo patch for bug 676
Craig Dowell <craigdo@ee.washington.edu>
parents: 5338
diff changeset
    51
 * This class contains two distinct groups of trace sources.  The
97402b61fb82 Gustavo patch for bug 676
Craig Dowell <craigdo@ee.washington.edu>
parents: 5338
diff changeset
    52
 * trace sources 'Rx' and 'Tx' are called, respectively, immediately
97402b61fb82 Gustavo patch for bug 676
Craig Dowell <craigdo@ee.washington.edu>
parents: 5338
diff changeset
    53
 * after receiving from the NetDevice and immediately before sending
97402b61fb82 Gustavo patch for bug 676
Craig Dowell <craigdo@ee.washington.edu>
parents: 5338
diff changeset
    54
 * to a NetDevice for transmitting a packet.  These are low level
5375
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5373
diff changeset
    55
 * trace sources that include the Ipv6Header already serialized into
5373
97402b61fb82 Gustavo patch for bug 676
Craig Dowell <craigdo@ee.washington.edu>
parents: 5338
diff changeset
    56
 * the packet.  In contrast, the Drop, SendOutgoing, UnicastForward,
97402b61fb82 Gustavo patch for bug 676
Craig Dowell <craigdo@ee.washington.edu>
parents: 5338
diff changeset
    57
 * and LocalDeliver trace sources are slightly higher-level and pass
5375
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5373
diff changeset
    58
 * around the Ipv6Header as an explicit parameter and not as part of
5373
97402b61fb82 Gustavo patch for bug 676
Craig Dowell <craigdo@ee.washington.edu>
parents: 5338
diff changeset
    59
 * the packet.
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    60
 */
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    61
class Ipv6L3Protocol : public Ipv6
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
    62
{
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    63
public:
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    64
  /** 
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    65
   * \brief Get the type ID of this class.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    66
   * \return type ID
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    67
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    68
  static TypeId GetTypeId ();
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    69
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    70
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    71
   * \brief The protocol number for IPv6 (0x86DD).
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    72
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    73
  static const uint16_t PROT_NUMBER;
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: 5793
diff changeset
    75
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    76
   * \enum DropReason
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    77
   * \brief Reason why a packet has been dropped.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    78
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    79
  enum DropReason 
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    80
  {
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    81
    DROP_TTL_EXPIRED = 1, /**< Packet TTL has expired */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    82
    DROP_NO_ROUTE, /**< No route to host */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    83
    DROP_INTERFACE_DOWN, /**< Interface is down so can not send packet */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    84
    DROP_ROUTE_ERROR, /**< Route error */
6273
8d70de29d514 spell check, mostly in comments.
Andrey Mazo <mazo@iitp.ru>
parents: 5891
diff changeset
    85
    DROP_UNKNOWN_PROTOCOL, /**< Unknown L4 protocol */
10669
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
    86
    DROP_UNKNOWN_OPTION, /**< Unknown option */
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
    87
    DROP_MALFORMED_HEADER, /**< Malformed header */
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
    88
    DROP_FRAGMENT_TIMEOUT, /**< Fragment timeout */
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    89
  };
5213
9f9acf33660f Modifications to the Ipv6L3Protocol::Drop trace source to align with Ipv4L3Protocol::Drop
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 4731
diff changeset
    90
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    91
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    92
   * \brief Constructor.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    93
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    94
  Ipv6L3Protocol ();
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    95
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    96
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    97
   * \brief Destructor.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    98
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
    99
  virtual ~Ipv6L3Protocol ();
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   100
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   101
  /**
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10405
diff changeset
   102
   * \brief Set node associated with this stack.
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   103
   * \param node node to set
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   104
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   105
  void SetNode (Ptr<Node> node);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   106
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   107
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   108
   * \brief Add an L4 protocol.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   109
   * \param protocol L4 protocol
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   110
   */
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7385
diff changeset
   111
  void Insert (Ptr<IpL4Protocol> protocol);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   112
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   113
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   114
   * \brief Remove an L4 protocol.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   115
   * \param protocol L4 protocol to remove
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   116
   */
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7385
diff changeset
   117
  void Remove (Ptr<IpL4Protocol> protocol);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   118
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   119
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   120
   * \brief Get L4 protocol by protocol number.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   121
   * \param protocolNumber protocol number
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   122
   * \return corresponding Ipv6L4Protocol or 0 if not found
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   123
   */
10566
9594a4df3bde Bug 1826 - make ns3::Ipv6Interface independent from ns3::IPv6L3protocol
Hajime Tazaki <tazaki@sfc.wide.ad.jp>
parents: 10553
diff changeset
   124
  virtual Ptr<IpL4Protocol> GetProtocol (int protocolNumber) const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   125
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   126
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   127
   * \brief Create raw IPv6 socket.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   128
   * \return newly raw socket
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   129
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   130
  Ptr<Socket> CreateRawSocket ();
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: 5793
diff changeset
   132
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   133
   * \brief Remove raw IPv6 socket.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   134
   * \param socket socket to remove
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   135
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   136
  void DeleteRawSocket (Ptr<Socket> socket);
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: 5793
diff changeset
   138
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   139
   * \brief Set the default TTL.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   140
   * \param ttl TTL to set
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   141
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   142
  void SetDefaultTtl (uint8_t ttl);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   143
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   144
  /**
9145
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   145
   * \brief Set the default TCLASS.
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   146
   * \param tclass TCLASS to set
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   147
   */
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   148
  void SetDefaultTclass (uint8_t tclass);
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   149
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   150
  /**
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   151
   * \brief Receive method when a packet arrive in the stack.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   152
   * This method removes IPv6 header and forward up to L4 protocol.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   153
   *
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   154
   * \param device network device
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   155
   * \param p the packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   156
   * \param protocol next header value
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   157
   * \param from address of the correspondant
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   158
   * \param to address of the destination
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   159
   * \param packetType type of the packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   160
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   161
  void Receive (Ptr<NetDevice> device, Ptr<const Packet> p, uint16_t protocol, const Address &from, const Address &to, NetDevice::PacketType packetType);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   162
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   163
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   164
   * \brief Higher-level layers call this method to send a packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   165
   * down the stack to the MAC and PHY layers.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   166
   *
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   167
   * \param packet packet to send
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   168
   * \param source source address of packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   169
   * \param destination address of packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   170
   * \param protocol number of packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   171
   * \param route route to take
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   172
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   173
  void Send (Ptr<Packet> packet, Ipv6Address source, Ipv6Address destination, uint8_t protocol, Ptr<Ipv6Route> route);
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   174
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   175
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   176
   * \brief Set routing protocol for this stack.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   177
   * \param routingProtocol IPv6 routing protocol to set
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   178
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   179
  void SetRoutingProtocol (Ptr<Ipv6RoutingProtocol> routingProtocol);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   180
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   181
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   182
   * \brief Get current routing protocol used.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   183
   * \return routing protocol
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   184
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   185
  Ptr<Ipv6RoutingProtocol> GetRoutingProtocol () const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   186
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   187
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   188
   * \brief Add IPv6 interface for a device.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   189
   * \param device net device
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   190
   * \return interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   191
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   192
  uint32_t AddInterface (Ptr<NetDevice> device);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   193
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   194
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   195
   * \brief Get an interface.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   196
   * \param i interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   197
   * \return IPv6 interface pointer
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   198
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   199
  Ptr<Ipv6Interface> GetInterface (uint32_t i) const;
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   200
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   201
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   202
   * \brief Get current number of interface on this stack.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   203
   * \return number of interface registered
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   204
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   205
  uint32_t GetNInterfaces () const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   206
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   207
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   208
   * \brief Get interface index which has specified IPv6 address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   209
   * \param addr IPv6 address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   210
   * \return interface index or -1 if not found
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   211
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   212
  int32_t GetInterfaceForAddress (Ipv6Address addr) const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   213
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   214
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   215
   * \brief Get interface index which match specified address/prefix.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   216
   * \param addr IPv6 address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   217
   * \param mask IPv6 prefix (mask)
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   218
   * \return interface index or -1 if not found
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   219
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   220
  int32_t GetInterfaceForPrefix (Ipv6Address addr, Ipv6Prefix mask) const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   221
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   222
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   223
   * \brief Get interface index which is on a specified net device.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   224
   * \param device net device
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   225
   * \returns the interface index
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   226
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   227
  int32_t GetInterfaceForDevice (Ptr<const NetDevice> device) const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   228
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   229
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   230
   * \brief Add an address on interface.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   231
   * \param i interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   232
   * \param address to add
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   233
   * \returns true if the operation succeeded
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   234
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   235
  bool AddAddress (uint32_t i, Ipv6InterfaceAddress address);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   236
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   237
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   238
   * \brief Get an address.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   239
   * \param interfaceIndex interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   240
   * \param addressIndex address index on the interface
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   241
   * \return Ipv6InterfaceAddress or assert if not found
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   242
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   243
  Ipv6InterfaceAddress GetAddress (uint32_t interfaceIndex, uint32_t addressIndex) const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   244
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   245
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   246
   * \brief Get number of address for an interface.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   247
   * \param interface interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   248
   * \return number of address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   249
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   250
  uint32_t GetNAddresses (uint32_t interface) const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   251
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   252
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   253
   * \brief Remove an address from an interface.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   254
   * \param interfaceIndex interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   255
   * \param addressIndex address index on the interface
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   256
   * \returns true if the operation succeeded
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   257
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   258
  bool RemoveAddress (uint32_t interfaceIndex, uint32_t addressIndex);
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   259
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   260
  /**
9915
d4c2228d3c30 Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents: 9849
diff changeset
   261
   * \brief Remove a specified Ipv6 address from an interface.
d4c2228d3c30 Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents: 9849
diff changeset
   262
   * \param interfaceIndex interface index
d4c2228d3c30 Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents: 9849
diff changeset
   263
   * \param address Ipv6Address to be removed from the interface
d4c2228d3c30 Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents: 9849
diff changeset
   264
   * \returns true if the operation succeeded
d4c2228d3c30 Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents: 9849
diff changeset
   265
   */
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   266
  bool RemoveAddress (uint32_t interfaceIndex, Ipv6Address address);
9915
d4c2228d3c30 Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents: 9849
diff changeset
   267
d4c2228d3c30 Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents: 9849
diff changeset
   268
  /**
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   269
   * \brief Set metric for an interface.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   270
   * \param i index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   271
   * \param metric
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   272
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   273
  void SetMetric (uint32_t i, uint16_t metric);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   274
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   275
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   276
   * \brief Get metric for an interface.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   277
   * \param i index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   278
   * \return metric
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   279
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   280
  uint16_t GetMetric (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
   281
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   282
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   283
   * \brief Get MTU for an interface.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   284
   * \param i index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   285
   * \return MTU
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   286
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   287
  uint16_t GetMtu (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
   288
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   289
  /**
10127
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   290
   * \brief Set the Path MTU for the specified IPv6 destination address.
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   291
   * \param dst Ipv6 destination address
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   292
   * \param pmtu the Path MTU
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   293
   */
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   294
  virtual void SetPmtu (Ipv6Address dst, uint32_t pmtu);
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   295
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   296
  /**
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   297
   * \brief Is specified interface up ?
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   298
   * \param i interface index
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   299
   * \returns true if the interface is up
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   300
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   301
  bool IsUp (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
   302
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   303
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   304
   * \brief Set an interface up.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   305
   * \param i interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   306
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   307
  void SetUp (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
   308
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   309
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   310
   * \brief set an interface down.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   311
   * \param i interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   312
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   313
  void SetDown (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
   314
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   315
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   316
   * \brief Is interface allows forwarding ?
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   317
   * \param i interface index
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   318
   * \returns true if the interface is forwarding
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   319
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   320
  bool IsForwarding (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
   321
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   322
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   323
   * \brief Enable or disable forwarding on interface
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   324
   * \param i interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   325
   * \param val true = enable forwarding, false = disable
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   326
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   327
  void SetForwarding (uint32_t i, bool val);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   328
10664
2bb07b08e681 Move SourceAddressSelection to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10566
diff changeset
   329
  Ipv6Address SourceAddressSelection (uint32_t interface, Ipv6Address dest);
2bb07b08e681 Move SourceAddressSelection to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10566
diff changeset
   330
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   331
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   332
   * \brief Get device by index.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   333
   * \param i device index on this stack
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   334
   * \return NetDevice pointer
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   335
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   336
  Ptr<NetDevice> GetNetDevice (uint32_t i);
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   337
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   338
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   339
   * \brief Get ICMPv6 protocol.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   340
   * \return Icmpv6L4Protocol pointer
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   341
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   342
  Ptr<Icmpv6L4Protocol> GetIcmpv6 () const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   343
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   344
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   345
   * \brief Add an autoconfigured address with RA information.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   346
   * \param interface interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   347
   * \param network network prefix
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   348
   * \param mask network mask
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   349
   * \param flags flags of the prefix information option (home agent, ...)
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   350
   * \param validTime valid time of the prefix
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   351
   * \param preferredTime preferred time of the prefix
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   352
   * \param defaultRouter default router address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   353
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   354
  void AddAutoconfiguredAddress (uint32_t interface, Ipv6Address network, Ipv6Prefix mask, uint8_t flags, uint32_t validTime, uint32_t preferredTime, Ipv6Address defaultRouter = Ipv6Address::GetZero ());
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   355
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   356
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   357
   * \brief Remove an autoconfigured address.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   358
   *
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   359
   * Typically it is used when an autoconfigured address expires.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   360
   * \param interface interface index
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   361
   * \param network network prefix
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   362
   * \param mask network mask
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   363
   * \param defaultRouter gateway
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   364
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   365
  void RemoveAutoconfiguredAddress (uint32_t interface, Ipv6Address network, Ipv6Prefix mask, Ipv6Address defaultRouter);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   366
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   367
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   368
   * \brief Register the IPv6 Extensions.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   369
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   370
  virtual void RegisterExtensions ();
5784
512909f442f7 More on IPv6 extensions support.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5375
diff changeset
   371
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   372
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   373
   * \brief Register the IPv6 Options.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   374
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   375
  virtual void RegisterOptions ();
5784
512909f442f7 More on IPv6 extensions support.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5375
diff changeset
   376
10669
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   377
  /**
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   378
   * \brief Report a packet drop
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   379
   *
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   380
   * This function is used by Fragment Timeout handling to signal a fragment drop.
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   381
   *
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   382
   * \param ipv6Header the IPv6 header of dropped packet
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   383
   * \param p the packet (if available)
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   384
   * \param dropReason the drop reason
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   385
   *
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   386
   */
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   387
  virtual void ReportDrop (Ipv6Header ipHeader, Ptr<Packet> p, DropReason dropReason);
46c9391bc38b Bug 1843 - IPv6 extensions dropped packets do not fire L3 drop trace
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10664
diff changeset
   388
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   389
protected:
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   390
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   391
   * \brief Dispose object.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   392
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   393
  virtual void DoDispose ();
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   394
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   395
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   396
   * \brief Notify other components connected to the node that a new stack member is now connected.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   397
   *
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   398
   * This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   399
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   400
  virtual void NotifyNewAggregate ();
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   401
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   402
private:
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   403
  /* for unit-tests */
10553
8c347165bb56 Move tests outside ns3 namespace
Vedran Miletić <rivanvx@gmail.com>
parents: 10496
diff changeset
   404
  friend class ::Ipv6L3ProtocolTestCase;
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   405
  friend class Ipv6ExtensionLooseRouting;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   406
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   407
  /**
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   408
   * \brief Container of the IPv6 Interfaces.
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   409
   */
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   410
  typedef std::list<Ptr<Ipv6Interface> > Ipv6InterfaceList;
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   411
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   412
  /**
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   413
   * \brief Container of the IPv6 Raw Sockets.
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   414
   */
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   415
  typedef std::list<Ptr<Ipv6RawSocketImpl> > SocketList;
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   416
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   417
  /**
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   418
   * \brief Container of the IPv6 L4 instances.
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   419
   */
7717
cfa1741013dd Add support for IPv6 transport protocols
Ken Renard <kdrenard2@gmail.com>
parents: 7385
diff changeset
   420
  typedef std::list<Ptr<IpL4Protocol> > L4List_t;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   421
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   422
  /**
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   423
   * \brief Container of the IPv6 Autoconfigured addresses.
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   424
   */
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   425
  typedef std::list< Ptr<Ipv6AutoconfiguredPrefix> > Ipv6AutoconfiguredPrefixList;
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   426
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   427
  /**
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   428
   * \brief Iterator of the container of the IPv6 Autoconfigured addresses.
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   429
   */
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   430
  typedef std::list< Ptr<Ipv6AutoconfiguredPrefix> >::iterator Ipv6AutoconfiguredPrefixListI;
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   431
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   432
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   433
   * \brief Callback to trace TX (transmission) packets.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   434
   */ 
7158
4fe055d32d78 bug 1054: ipv6 InternetStackHelper EnablePcapIpv6All() broken
Tom Henderson <tomh@tomh.org>
parents: 6834
diff changeset
   435
  TracedCallback<Ptr<const Packet>, Ptr<Ipv6>, uint32_t> m_txTrace;
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   436
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   437
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   438
   * \brief Callback to trace RX (reception) packets.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   439
   */ 
7158
4fe055d32d78 bug 1054: ipv6 InternetStackHelper EnablePcapIpv6All() broken
Tom Henderson <tomh@tomh.org>
parents: 6834
diff changeset
   440
  TracedCallback<Ptr<const Packet>, Ptr<Ipv6>, uint32_t> m_rxTrace;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   441
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   442
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   443
   * \brief Callback to trace drop packets.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   444
   */ 
7158
4fe055d32d78 bug 1054: ipv6 InternetStackHelper EnablePcapIpv6All() broken
Tom Henderson <tomh@tomh.org>
parents: 6834
diff changeset
   445
  TracedCallback<const Ipv6Header &, Ptr<const Packet>, DropReason, Ptr<Ipv6>, uint32_t> m_dropTrace;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   446
10692
bdf59f5ace93 Bug 1818: FlowMonitor needs IPv6 support
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10669
diff changeset
   447
  /// Trace of sent packets
bdf59f5ace93 Bug 1818: FlowMonitor needs IPv6 support
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10669
diff changeset
   448
  TracedCallback<const Ipv6Header &, Ptr<const Packet>, uint32_t> m_sendOutgoingTrace;
bdf59f5ace93 Bug 1818: FlowMonitor needs IPv6 support
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10669
diff changeset
   449
  /// Trace of unicast forwarded packets
bdf59f5ace93 Bug 1818: FlowMonitor needs IPv6 support
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10669
diff changeset
   450
  TracedCallback<const Ipv6Header &, Ptr<const Packet>, uint32_t> m_unicastForwardTrace;
bdf59f5ace93 Bug 1818: FlowMonitor needs IPv6 support
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10669
diff changeset
   451
  /// Trace of locally delivered packets
bdf59f5ace93 Bug 1818: FlowMonitor needs IPv6 support
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10669
diff changeset
   452
  TracedCallback<const Ipv6Header &, Ptr<const Packet>, uint32_t> m_localDeliverTrace;
bdf59f5ace93 Bug 1818: FlowMonitor needs IPv6 support
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10669
diff changeset
   453
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   454
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   455
   * \brief Copy constructor.
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10405
diff changeset
   456
   *
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10405
diff changeset
   457
   * Defined but not implemented to avoid misuse
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   458
   */
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10405
diff changeset
   459
  Ipv6L3Protocol (const Ipv6L3Protocol&);
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   460
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   461
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   462
   * \brief Copy constructor.
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10405
diff changeset
   463
   *
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10405
diff changeset
   464
   * Defined but not implemented to avoid misuse
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   465
   * \returns the copied object
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   466
   */
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10405
diff changeset
   467
  Ipv6L3Protocol &operator = (const Ipv6L3Protocol&);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   468
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   469
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   470
   * \brief Construct an IPv6 header.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   471
   * \param src source IPv6 address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   472
   * \param dst destination IPv6 address
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   473
   * \param protocol L4 protocol
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   474
   * \param payloadSize payload size
9145
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   475
   * \param hopLimit Hop limit
10405
45c8fceae24e Doxygen fixes to Topology-read, Ipv6, and tcp-socket
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10127
diff changeset
   476
   * \param tclass Tclass
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   477
   * \return newly created IPv6 header
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   478
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   479
  Ipv6Header BuildHeader (Ipv6Address src, Ipv6Address dst, uint8_t protocol,
9145
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   480
                          uint16_t payloadSize, uint8_t hopLimit, uint8_t tclass);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   481
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   482
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   483
   * \brief Send packet with route.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   484
   * \param route route 
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   485
   * \param packet packet to send
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   486
   * \param ipHeader IPv6 header to add to the packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   487
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   488
  void SendRealOut (Ptr<Ipv6Route> route, Ptr<Packet> packet, Ipv6Header const& ipHeader);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   489
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   490
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   491
   * \brief Forward a packet.
9849
b3ec74c99612 Bug 1697 - ICMPv6 Redirect trigger contains multiple bugs
Guowang Shi <shiguowang2007@gmail.com>
parents: 9145
diff changeset
   492
   * \param idev Pointer to ingress network device
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   493
   * \param rtentry route 
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   494
   * \param p packet to forward
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   495
   * \param header IPv6 header to add to the packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   496
   */
9849
b3ec74c99612 Bug 1697 - ICMPv6 Redirect trigger contains multiple bugs
Guowang Shi <shiguowang2007@gmail.com>
parents: 9145
diff changeset
   497
  void IpForward (Ptr<const NetDevice> idev, Ptr<Ipv6Route> rtentry, Ptr<const Packet> p, const Ipv6Header& header);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   498
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   499
  /**
10440
1e48ff9185f1 Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 10405
diff changeset
   500
   * \brief Forward a multicast packet.
9849
b3ec74c99612 Bug 1697 - ICMPv6 Redirect trigger contains multiple bugs
Guowang Shi <shiguowang2007@gmail.com>
parents: 9145
diff changeset
   501
   * \param idev Pointer to ingress network device
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   502
   * \param mrtentry route 
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   503
   * \param p packet to forward
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   504
   * \param header IPv6 header to add to the packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   505
   */
9849
b3ec74c99612 Bug 1697 - ICMPv6 Redirect trigger contains multiple bugs
Guowang Shi <shiguowang2007@gmail.com>
parents: 9145
diff changeset
   506
  void IpMulticastForward (Ptr<const NetDevice> idev, Ptr<Ipv6MulticastRoute> mrtentry, Ptr<const Packet> p, const Ipv6Header& header);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   507
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   508
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   509
   * \brief Deliver a packet.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   510
   * \param p packet delivered
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   511
   * \param ip IPv6 header
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   512
   * \param iif input interface packet was received
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   513
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   514
  void LocalDeliver (Ptr<const Packet> p, Ipv6Header const& ip, uint32_t iif);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   515
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   516
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   517
   * \brief Fallback when no route is found.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   518
   * \param p packet
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   519
   * \param ipHeader IPv6 header
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   520
   * \param sockErrno error number
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   521
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   522
  void RouteInputError (Ptr<const Packet> p, const Ipv6Header& ipHeader, Socket::SocketErrno sockErrno);
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   523
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   524
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   525
   * \brief Add an IPv6 interface to the stack.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   526
   * \param interface interface to add
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   527
   * \return index of newly added interface
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   528
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   529
  uint32_t AddIpv6Interface (Ptr<Ipv6Interface> interface);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   530
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   531
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   532
   * \brief Setup loopback interface.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   533
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   534
  void SetupLoopback ();
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   535
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   536
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   537
   * \brief Set IPv6 forwarding state.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   538
   * \param forward IPv6 forwarding enabled or not
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   539
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   540
  virtual void SetIpForward (bool forward);
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   541
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   542
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   543
   * \brief Get IPv6 forwarding state.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   544
   * \return forwarding state (enabled or not)
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   545
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   546
  virtual bool GetIpForward () const;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   547
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   548
  /**
10127
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   549
   * \brief Set IPv6 MTU discover state.
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   550
   * \param mtuDiscover IPv6 MTU discover enabled or not
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   551
   */
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   552
  virtual void SetMtuDiscover (bool mtuDiscover);
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   553
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   554
  /**
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   555
   * \brief Get IPv6 MTU discover state.
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   556
   * \return MTU discover state (enabled or not)
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   557
   */
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   558
  virtual bool GetMtuDiscover (void) const;
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   559
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   560
  /**
7793
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   561
   * \brief Set the ICMPv6 Redirect sending state.
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   562
   * \param sendIcmpv6Redirect ICMPv6 Redirect sending enabled or not
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   563
   */
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   564
  virtual void SetSendIcmpv6Redirect (bool sendIcmpv6Redirect);
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   565
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   566
  /**
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   567
   * \brief Get the ICMPv6 Redirect sending state.
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   568
   * \return ICMPv6 Redirect sending state (enabled or not)
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   569
   */
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   570
  virtual bool GetSendIcmpv6Redirect () const;
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   571
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   572
  /**
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   573
   * \brief Node attached to stack.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   574
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   575
  Ptr<Node> m_node;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   576
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   577
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   578
   * \brief Forwarding packets (i.e. router mode) state.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   579
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   580
  bool m_ipForward;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   581
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   582
  /**
10127
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   583
   * \brief MTU Discover (i.e. Path MTU) state.
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   584
   */
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   585
  bool m_mtuDiscover;
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   586
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   587
  /**
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   588
   * \brief Path MTU Cache.
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   589
   */
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   590
  Ptr<Ipv6PmtuCache> m_pmtuCache;
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   591
f4cee68de571 Bug 1721 - Path MTU isn't handled properly
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 9915
diff changeset
   592
  /**
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   593
   * \brief List of transport protocol.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   594
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   595
  L4List_t m_protocols;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   596
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   597
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   598
   * \brief List of IPv6 interfaces.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   599
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   600
  Ipv6InterfaceList m_interfaces;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   601
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   602
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   603
   * \brief Number of IPv6 interfaces managed by the stack.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   604
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   605
  uint32_t m_nInterfaces;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   606
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   607
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   608
   * \brief Default TTL for outgoing packets.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   609
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   610
  uint8_t m_defaultTtl;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   611
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   612
  /**
9145
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   613
   * \brief Default TCLASS for outgoing packets.
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   614
   */
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   615
  uint8_t m_defaultTclass;
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   616
5752b425cdf5 Bug 1361 - Set TOS from Application level (sockets)
Daniel Lertpratchya <nikkipui@gmail.com>
parents: 7793
diff changeset
   617
  /**
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   618
   * \brief Routing protocol.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   619
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   620
  Ptr<Ipv6RoutingProtocol> m_routingProtocol;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   621
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   622
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   623
   * \brief List of IPv6 raw sockets.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   624
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   625
  SocketList m_sockets;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   626
5891
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   627
  /**
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   628
   * \brief List of IPv6 prefix received from RA.
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   629
   */
09a575cdf8db Indent correctly IPv6 code.
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents: 5793
diff changeset
   630
  Ipv6AutoconfiguredPrefixList m_prefixes;
7793
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   631
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   632
  /**
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   633
   * \brief Allow ICMPv6 Redirect sending state
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   634
   */
1c81a8a91b1e Add SendIcmpv6Redirect attribute to Ipv6L3Protocol
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents: 7717
diff changeset
   635
  bool m_sendIcmpv6Redirect;
4731
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   636
};
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   637
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   638
} /* namespace ns3 */
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   639
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   640
#endif /* IPV6_L3_PROTOCOL_H */
510db8599bfb second phase of IPv6 checkins from Univ. of Strasbourg team
Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
parents:
diff changeset
   641