src/internet-node/ipv4-l3-protocol.h
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 01 Oct 2007 14:15:56 +0200
changeset 1866 e7dbcc4df546
parent 1524 3ead2b66f2e4
child 1867 16deaedc0380
permissions -rw-r--r--
do not use Packet objects directly. Use Ptr<Packet> instead
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
// -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*-
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
//
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
// Copyright (c) 2006 Georgia Tech Research Corporation
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
// All rights reserved.
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
//
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     6
// This program is free software; you can redistribute it and/or modify
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
// it under the terms of the GNU General Public License version 2 as
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
// published by the Free Software Foundation;
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
//
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
// This program is distributed in the hope that it will be useful,
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
// GNU General Public License for more details.
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
//
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
// You should have received a copy of the GNU General Public License
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
// along with this program; if not, write to the Free Software
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
//
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
// Author: George F. Riley<riley@ece.gatech.edu>
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
//
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    21
752
a4febfb8416f IIpv4 -> Ipv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 734
diff changeset
    22
#ifndef IPV4_L3_PROTOCOL_H
a4febfb8416f IIpv4 -> Ipv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 734
diff changeset
    23
#define IPV4_L3_PROTOCOL_H
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    24
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
#include <list>
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
#include <stdint.h>
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 293
diff changeset
    27
#include "ns3/callback-trace-source.h"
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    28
#include "ns3/trace-context-element.h"
524
082ffdd8fbd7 move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 513
diff changeset
    29
#include "ns3/ipv4-address.h"
555
4d3b2a77bc92 convert Node * to Ptr<Node>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 551
diff changeset
    30
#include "ns3/ptr.h"
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
    31
#include "ns3/ipv4.h"
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    32
#include "ipv4-header.h"
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
    33
#include "ipv4-static-routing.h"
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    34
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
namespace ns3 {
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    37
class Packet;
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    38
class NetDevice;
551
12ed30c77cab revert Ipv4Interface * -> Ptr<Ipv4Interface>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 548
diff changeset
    39
class Ipv4Interface;
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    40
class Ipv4Address;
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    41
class Ipv4Header;
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    42
class Ipv4Route;
728
95c426b1cb60 rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 639
diff changeset
    43
class Node;
345
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 293
diff changeset
    44
class TraceResolver;
47b41507a45a move channel.cc channel.h to node directory; merge ns-3-tracing from mathieu
Tom Henderson <tomh@tomh.org>
parents: 293
diff changeset
    45
class TraceContext;
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    46
1403
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    47
/**
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    48
 * \brief hold in a TraceContext the type of trace source used by this Ipv4L3Protocol
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    49
 */
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    50
class Ipv4L3ProtocolTraceContextElement : public TraceContextElement
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    51
{
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    52
public:
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    53
  enum Type {
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    54
    TX,
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    55
    RX,
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    56
    DROP,
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    57
  };
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    58
  Ipv4L3ProtocolTraceContextElement ();
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    59
  Ipv4L3ProtocolTraceContextElement (enum Type type);
1403
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    60
  /**
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    61
   * \returns true if this is a tx event, false otherwise.
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    62
   */
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    63
  bool IsTx (void) const;
1403
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    64
  /**
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    65
   * \returns true if this is a rx event, false otherwise.
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    66
   */
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    67
  bool IsRx (void) const;
1403
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    68
  /**
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    69
   * \returns true if this is a drop event, false otherwise.
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    70
   */
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    71
  bool IsDrop (void) const;
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    72
  void Print (std::ostream &os) const;
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    73
  static uint16_t GetUid (void);
1401
96a21130865c GetName -> GetTypeName
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1383
diff changeset
    74
  std::string GetTypeName (void) const;
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    75
private:
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    76
  enum Type m_type;
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    77
};
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    78
1403
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    79
/**
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    80
 * \brief hold in a TraceContext the index of an Ipv4Interface within the ipv4 stack of a Node
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    81
 */
1341
f685d4bf320f use the Object::GetTraceResolver tracing support rather than the old adhoc tracing code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1333
diff changeset
    82
class Ipv4L3ProtocolInterfaceIndex : public TraceContextElement
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    83
{
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    84
public:
1341
f685d4bf320f use the Object::GetTraceResolver tracing support rather than the old adhoc tracing code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1333
diff changeset
    85
  Ipv4L3ProtocolInterfaceIndex ();
f685d4bf320f use the Object::GetTraceResolver tracing support rather than the old adhoc tracing code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1333
diff changeset
    86
  Ipv4L3ProtocolInterfaceIndex (uint32_t index);
1403
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    87
  /**
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    88
   * \returns the index of the Ipv4Interface within a Node.
0286b806eee1 add doxygen for each TraceSourceElement subclass
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1401
diff changeset
    89
   */
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    90
  uint32_t Get (void) const;
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    91
  void Print (std::ostream &os) const;
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    92
  static uint16_t GetUid (void);
1401
96a21130865c GetName -> GetTypeName
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1383
diff changeset
    93
  std::string GetTypeName (void) const;
1229
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    94
private:
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    95
  uint32_t m_index;
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    96
};
e4cfe4094c10 build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1195
diff changeset
    97
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    98
1176
4894ea885c0f implement the Node::ProtocolHandler support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 983
diff changeset
    99
class Ipv4L3Protocol : public Object
293
007bc9e735f3 remove Ipv4L3Protocol class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 242
diff changeset
   100
{
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   101
public:
1176
4894ea885c0f implement the Node::ProtocolHandler support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 983
diff changeset
   102
  static const InterfaceId iid;
293
007bc9e735f3 remove Ipv4L3Protocol class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 242
diff changeset
   103
  static const uint16_t PROT_NUMBER;
007bc9e735f3 remove Ipv4L3Protocol class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 242
diff changeset
   104
734
039fb338b6e9 Ipv4 -> Ipv4L3Protocol
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 733
diff changeset
   105
  Ipv4L3Protocol(Ptr<Node> node);
039fb338b6e9 Ipv4 -> Ipv4L3Protocol
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 733
diff changeset
   106
  virtual ~Ipv4L3Protocol ();
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   107
406
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   108
  /**
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   109
   * \param ttl default ttl to use
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   110
   *
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   111
   * When we need to send an ipv4 packet, we use this default
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   112
   * ttl value.
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   113
   */
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   114
  void SetDefaultTtl (uint8_t ttl);
406
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   115
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   116
  /**
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   117
   * \param device the device to match
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   118
   * \returns the matching interface, zero if not found.
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   119
   *
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   120
   * Try to find an Ipv4Interface whose NetDevice is equal to
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   121
   * the input NetDevice.
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   122
   */
1341
f685d4bf320f use the Object::GetTraceResolver tracing support rather than the old adhoc tracing code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1333
diff changeset
   123
  Ptr<Ipv4Interface> FindInterfaceForDevice (Ptr<const NetDevice> device);
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   124
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   125
  /**
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   126
   * Lower layer calls this method after calling L3Demux::Lookup
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   127
   * The ARP subclass needs to know from which NetDevice this
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   128
   * packet is coming to:
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   129
   *    - implement a per-NetDevice ARP cache
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   130
   *    - send back arp replies on the right device
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   131
   */
1866
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1524
diff changeset
   132
  void Receive( Ptr<NetDevice> device, Ptr<Packet> p, uint16_t protocol, const Address &from);
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   133
406
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   134
  /**
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   135
   * \param packet packet to send
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   136
   * \param source source address of packet
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   137
   * \param destination address of packet
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   138
   * \param protocol number of packet
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   139
   *
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   140
   * Higher-level layers call this method to send a packet
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   141
   * down the stack to the MAC and PHY layers.
c3f72daa6430 doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 345
diff changeset
   142
   */
1866
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1524
diff changeset
   143
  void Send (Ptr<Packet> packet, Ipv4Address source, 
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   144
	     Ipv4Address destination, uint8_t protocol);
237
6562b2679455 make Send method public
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 236
diff changeset
   145
639
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   146
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   147
    
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   148
  void AddHostRouteTo (Ipv4Address dest, 
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   149
                       Ipv4Address nextHop, 
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   150
                       uint32_t interface);
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   151
  void AddHostRouteTo (Ipv4Address dest, 
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   152
                       uint32_t interface);
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   153
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   154
  void AddNetworkRouteTo (Ipv4Address network, 
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   155
                          Ipv4Mask networkMask, 
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   156
                          Ipv4Address nextHop, 
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   157
                          uint32_t interface);
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   158
  void AddNetworkRouteTo (Ipv4Address network, 
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   159
                          Ipv4Mask networkMask, 
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   160
                          uint32_t interface);
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   161
  void SetDefaultRoute (Ipv4Address nextHop, 
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   162
                        uint32_t interface);
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   163
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   164
  void Lookup (Ipv4Header const &ipHeader,
1866
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1524
diff changeset
   165
               Ptr<Packet> packet,
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   166
               Ipv4RoutingProtocol::RouteReplyCallback routeReply);
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   167
639
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   168
  uint32_t GetNRoutes (void);
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   169
  Ipv4Route *GetRoute (uint32_t i);
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   170
  void RemoveRoute (uint32_t i);
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   171
1428
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   172
  void AddMulticastRoute (Ipv4Address origin,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   173
                          Ipv4Address group,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   174
                          uint32_t inputInterface,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   175
                          std::vector<uint32_t> outputInterfaces);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   176
1444
7c81b4e2617d piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1442
diff changeset
   177
  void SetDefaultMulticastRoute (uint32_t onputInterface);
1442
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   178
1428
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   179
  uint32_t GetNMulticastRoutes (void) const;
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   180
  Ipv4MulticastRoute *GetMulticastRoute (uint32_t i) const;
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   181
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   182
  void RemoveMulticastRoute (Ipv4Address origin,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   183
                             Ipv4Address group,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   184
                             uint32_t inputInterface);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   185
  void RemoveMulticastRoute (uint32_t i);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   186
639
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   187
  uint32_t AddInterface (Ptr<NetDevice> device);
1341
f685d4bf320f use the Object::GetTraceResolver tracing support rather than the old adhoc tracing code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1333
diff changeset
   188
  Ptr<Ipv4Interface> GetInterface (uint32_t i) const;
639
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   189
  uint32_t GetNInterfaces (void) const;
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   190
1440
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1434
diff changeset
   191
  uint32_t FindInterfaceForAddr (Ipv4Address addr) const;
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1434
diff changeset
   192
  uint32_t FindInterfaceForAddr (Ipv4Address addr, Ipv4Mask mask) const;
639
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   193
  
1440
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1434
diff changeset
   194
  void JoinMulticastGroup (Ipv4Address origin, Ipv4Address group);
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1434
diff changeset
   195
  void LeaveMulticastGroup (Ipv4Address origin, Ipv4Address group);
639
4e3a1dc4b1e4 cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 633
diff changeset
   196
444
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 415
diff changeset
   197
  void SetAddress (uint32_t i, Ipv4Address address);
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 415
diff changeset
   198
  void SetNetworkMask (uint32_t i, Ipv4Mask mask);
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 415
diff changeset
   199
  Ipv4Mask GetNetworkMask (uint32_t t) const;
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 415
diff changeset
   200
  Ipv4Address GetAddress (uint32_t i) const;
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1432
diff changeset
   201
  bool GetIfIndexForDestination (Ipv4Address destination, 
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1432
diff changeset
   202
                                 uint32_t& ifIndex) const;
444
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 415
diff changeset
   203
  uint16_t GetMtu (uint32_t i) const;
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 415
diff changeset
   204
  bool IsUp (uint32_t i) const;
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 415
diff changeset
   205
  void SetUp (uint32_t i);
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 415
diff changeset
   206
  void SetDown (uint32_t i);
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 415
diff changeset
   207
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   208
  void AddRoutingProtocol (Ptr<Ipv4RoutingProtocol> routingProtocol,
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   209
                           int priority);
444
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 415
diff changeset
   210
513
b7c7ea629de9 make L3Demux an NsUnknown object.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 504
diff changeset
   211
protected:
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   212
513
b7c7ea629de9 make L3Demux an NsUnknown object.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 504
diff changeset
   213
  virtual void DoDispose (void);
1383
12f30b7defb4 constify
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1364
diff changeset
   214
  virtual Ptr<TraceResolver> GetTraceResolver (void) const;
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   215
513
b7c7ea629de9 make L3Demux an NsUnknown object.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 504
diff changeset
   216
private:
1432
3aef7d7a71c2 more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   217
  void Lookup (uint32_t ifIndex,
3aef7d7a71c2 more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   218
               Ipv4Header const &ipHeader,
1866
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1524
diff changeset
   219
               Ptr<Packet> packet,
1432
3aef7d7a71c2 more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   220
               Ipv4RoutingProtocol::RouteReplyCallback routeReply);
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   221
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   222
  void SendRealOut (bool found,
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   223
                    Ipv4Route const &route,
1866
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1524
diff changeset
   224
                    Ptr<Packet> packet,
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   225
                    Ipv4Header const &ipHeader);
1432
3aef7d7a71c2 more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   226
  bool Forwarding (uint32_t ifIndex, 
1866
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1524
diff changeset
   227
                   Ptr<Packet> packet, 
1432
3aef7d7a71c2 more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   228
                   Ipv4Header &ipHeader, 
3aef7d7a71c2 more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   229
                   Ptr<NetDevice> device);
1866
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1524
diff changeset
   230
  void ForwardUp (Ptr<Packet> p, Ipv4Header const&ip, Ptr<Ipv4Interface> incomingInterface);
1341
f685d4bf320f use the Object::GetTraceResolver tracing support rather than the old adhoc tracing code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1333
diff changeset
   231
  uint32_t AddIpv4Interface (Ptr<Ipv4Interface> interface);
444
1647ca57f19d remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 415
diff changeset
   232
  void SetupLoopback (void);
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   233
1341
f685d4bf320f use the Object::GetTraceResolver tracing support rather than the old adhoc tracing code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1333
diff changeset
   234
  typedef std::list<Ptr<Ipv4Interface> > Ipv4InterfaceList;
1428
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   235
  typedef std::list<std::pair<Ipv4Address, Ipv4Address> > 
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   236
    Ipv4MulticastGroupList;
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   237
  typedef std::list< std::pair< int, Ptr<Ipv4RoutingProtocol> > > Ipv4RoutingProtocolList;
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   238
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   239
  Ipv4InterfaceList m_interfaces;
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   240
  uint32_t m_nInterfaces;
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   241
  uint8_t m_defaultTtl;
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   242
  uint16_t m_identification;
728
95c426b1cb60 rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 639
diff changeset
   243
  Ptr<Node> m_node;
1866
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1524
diff changeset
   244
  CallbackTraceSource<Ptr<const Packet>, uint32_t> m_txTrace;
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1524
diff changeset
   245
  CallbackTraceSource<Ptr<const Packet>, uint32_t> m_rxTrace;
e7dbcc4df546 do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1524
diff changeset
   246
  CallbackTraceSource<Ptr<const Packet> > m_dropTrace;
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   247
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   248
  Ipv4RoutingProtocolList m_routingProtocols;
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   249
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   250
  Ptr<Ipv4StaticRouting> m_staticRouting;
1428
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 1229
diff changeset
   251
  Ipv4MulticastGroupList m_multicastGroups;
236
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   252
};
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   253
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   254
} // Namespace ns3
5673656dc2e7 a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   255
983
47c42bd66fb7 Support dynamic routing and multiple routing protocols; static routing table is refactored as a "routing protocol".
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 752
diff changeset
   256
#endif /* IPV4_L3_PROTOCOL_H */