author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Tue, 02 Sep 2008 17:20:32 -0700 | |
changeset 3588 | ad0a36bfdb62 |
parent 3548 | e5ab96db540e |
child 3744 | bb6876ea0851 |
permissions | -rw-r--r-- |
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 |
// |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
5 |
// 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
|
6 |
// 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
|
7 |
// published by the Free Software Foundation; |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
8 |
// |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
9 |
// 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
|
10 |
// 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
|
11 |
// 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
|
12 |
// GNU General Public License for more details. |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
13 |
// |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
14 |
// 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
|
15 |
// 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
|
16 |
// 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
|
17 |
// |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
18 |
// Author: George F. Riley<riley@ece.gatech.edu> |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
19 |
// |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
20 |
|
752
a4febfb8416f
IIpv4 -> Ipv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
734
diff
changeset
|
21 |
#ifndef IPV4_L3_PROTOCOL_H |
a4febfb8416f
IIpv4 -> Ipv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
734
diff
changeset
|
22 |
#define IPV4_L3_PROTOCOL_H |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
23 |
|
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
24 |
#include <list> |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
25 |
#include <stdint.h> |
524
082ffdd8fbd7
move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
513
diff
changeset
|
26 |
#include "ns3/ipv4-address.h" |
555
4d3b2a77bc92
convert Node * to Ptr<Node>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
551
diff
changeset
|
27 |
#include "ns3/ptr.h" |
3448
0bd851bb1225
Simplify promiscuous mode API: NetDevices always operate in promiscuous mode, normal receive callbacks receive extra destination address and packet type.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3266
diff
changeset
|
28 |
#include "ns3/net-device.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
|
29 |
#include "ns3/ipv4.h" |
2498
e01570293b98
convert InternetNode to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2251
diff
changeset
|
30 |
#include "ns3/traced-callback.h" |
3216
b36bb98d766e
bug 207: ipv4-header.h needed in src/node module.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2961
diff
changeset
|
31 |
#include "ns3/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
|
32 |
#include "ipv4-static-routing.h" |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
33 |
|
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
34 |
namespace ns3 { |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
35 |
|
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
36 |
class Packet; |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
37 |
class NetDevice; |
551
12ed30c77cab
revert Ipv4Interface * -> Ptr<Ipv4Interface>
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
548
diff
changeset
|
38 |
class Ipv4Interface; |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
39 |
class Ipv4Address; |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
40 |
class Ipv4Header; |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
41 |
class Ipv4Route; |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
639
diff
changeset
|
42 |
class Node; |
3588
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
43 |
class Ipv4L4Protocol; |
1229
e4cfe4094c10
build with the new TraceContextElement API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1195
diff
changeset
|
44 |
|
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
45 |
|
2961
2bcb3435483b
improve documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
46 |
/** |
2bcb3435483b
improve documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
47 |
* \brief Implement the Ipv4 layer. |
3266
1ae7df5cf87b
Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
3260
diff
changeset
|
48 |
* |
1ae7df5cf87b
Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
3260
diff
changeset
|
49 |
* This is the actual implementation of IP. It contains APIs to send and |
1ae7df5cf87b
Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
3260
diff
changeset
|
50 |
* receive packets at the IP layer, as well as APIs for IP routing. |
2961
2bcb3435483b
improve documentation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
51 |
*/ |
1176
4894ea885c0f
implement the Node::ProtocolHandler support.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
983
diff
changeset
|
52 |
class Ipv4L3Protocol : public Object |
293
007bc9e735f3
remove Ipv4L3Protocol class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
53 |
{ |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
54 |
public: |
2251
04963d8cca51
iid (void) -> GetTypeId (void)
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2250
diff
changeset
|
55 |
static TypeId GetTypeId (void); |
293
007bc9e735f3
remove Ipv4L3Protocol class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
56 |
static const uint16_t PROT_NUMBER; |
007bc9e735f3
remove Ipv4L3Protocol class.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
242
diff
changeset
|
57 |
|
2498
e01570293b98
convert InternetNode to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2251
diff
changeset
|
58 |
Ipv4L3Protocol(); |
734
039fb338b6e9
Ipv4 -> Ipv4L3Protocol
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
733
diff
changeset
|
59 |
virtual ~Ipv4L3Protocol (); |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
60 |
|
2592
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2498
diff
changeset
|
61 |
void SetNode (Ptr<Node> node); |
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2498
diff
changeset
|
62 |
|
406
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
63 |
/** |
3588
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
64 |
* \param protocol a template for the protocol to add to this L4 Demux. |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
65 |
* \returns the L4Protocol effectively added. |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
66 |
* |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
67 |
* Invoke Copy on the input template to get a copy of the input |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
68 |
* protocol which can be used on the Node on which this L4 Demux |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
69 |
* is running. The new L4Protocol is registered internally as |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
70 |
* a working L4 Protocol and returned from this method. |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
71 |
* The caller does not get ownership of the returned pointer. |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
72 |
*/ |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
73 |
void Insert(Ptr<Ipv4L4Protocol> protocol); |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
74 |
/** |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
75 |
* \param protocolNumber number of protocol to lookup |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
76 |
* in this L4 Demux |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
77 |
* \returns a matching L4 Protocol |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
78 |
* |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
79 |
* This method is typically called by lower layers |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
80 |
* to forward packets up the stack to the right protocol. |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
81 |
* It is also called from NodeImpl::GetUdp for example. |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
82 |
*/ |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
83 |
Ptr<Ipv4L4Protocol> GetProtocol(int protocolNumber); |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
84 |
/** |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
85 |
* \param protocol protocol to remove from this demux. |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
86 |
* |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
87 |
* The input value to this method should be the value |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
88 |
* returned from the Ipv4L4Protocol::Insert method. |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
89 |
*/ |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
90 |
void Remove (Ptr<Ipv4L4Protocol> protocol); |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
91 |
|
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
92 |
/** |
406
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
93 |
* \param ttl default ttl to use |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
94 |
* |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
95 |
* 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
|
96 |
* ttl value. |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
97 |
*/ |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
98 |
void SetDefaultTtl (uint8_t ttl); |
406
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
99 |
|
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
100 |
/** |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
101 |
* \param device the device to match |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
102 |
* \returns the matching interface, zero if not found. |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
103 |
* |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
104 |
* 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
|
105 |
* the input NetDevice. |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
106 |
*/ |
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
|
107 |
Ptr<Ipv4Interface> FindInterfaceForDevice (Ptr<const NetDevice> device); |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
108 |
|
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
109 |
/** |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
110 |
* 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
|
111 |
* 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
|
112 |
* packet is coming to: |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
113 |
* - implement a per-NetDevice ARP cache |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
114 |
* - send back arp replies on the right device |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
115 |
*/ |
3548
e5ab96db540e
bug 273: constify packet pointers.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3448
diff
changeset
|
116 |
void Receive( Ptr<NetDevice> device, Ptr<const Packet> p, uint16_t protocol, const Address &from, |
3448
0bd851bb1225
Simplify promiscuous mode API: NetDevices always operate in promiscuous mode, normal receive callbacks receive extra destination address and packet type.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
3266
diff
changeset
|
117 |
const Address &to, NetDevice::PacketType packetType); |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
118 |
|
406
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 |
* \param packet packet to send |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
121 |
* \param source source address of packet |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
122 |
* \param destination address of packet |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
123 |
* \param protocol number of packet |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
124 |
* |
c3f72daa6430
doxygen for Ipv4 class
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
345
diff
changeset
|
125 |
* 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
|
126 |
* 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
|
127 |
*/ |
1866
e7dbcc4df546
do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1524
diff
changeset
|
128 |
void Send (Ptr<Packet> packet, Ipv4Address source, |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
129 |
Ipv4Address destination, uint8_t protocol); |
237
6562b2679455
make Send method public
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
236
diff
changeset
|
130 |
|
639
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
131 |
|
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
132 |
|
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
133 |
void AddHostRouteTo (Ipv4Address dest, |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
134 |
Ipv4Address nextHop, |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
135 |
uint32_t interface); |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
136 |
void AddHostRouteTo (Ipv4Address dest, |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
137 |
uint32_t interface); |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
138 |
|
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
139 |
void AddNetworkRouteTo (Ipv4Address network, |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
140 |
Ipv4Mask networkMask, |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
141 |
Ipv4Address nextHop, |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
142 |
uint32_t interface); |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
143 |
void AddNetworkRouteTo (Ipv4Address network, |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
144 |
Ipv4Mask networkMask, |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
145 |
uint32_t interface); |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
146 |
void SetDefaultRoute (Ipv4Address nextHop, |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
147 |
uint32_t interface); |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
148 |
|
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
|
149 |
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
|
150 |
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
|
151 |
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
|
152 |
|
639
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
153 |
uint32_t GetNRoutes (void); |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
154 |
Ipv4Route *GetRoute (uint32_t i); |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
155 |
void RemoveRoute (uint32_t i); |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
156 |
|
1428
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
157 |
void AddMulticastRoute (Ipv4Address origin, |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
158 |
Ipv4Address group, |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
159 |
uint32_t inputInterface, |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
160 |
std::vector<uint32_t> outputInterfaces); |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
161 |
|
1444
7c81b4e2617d
piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1442
diff
changeset
|
162 |
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
|
163 |
|
1428
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
164 |
uint32_t GetNMulticastRoutes (void) const; |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
165 |
Ipv4MulticastRoute *GetMulticastRoute (uint32_t i) const; |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
166 |
|
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
167 |
void RemoveMulticastRoute (Ipv4Address origin, |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
168 |
Ipv4Address group, |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
169 |
uint32_t inputInterface); |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
170 |
void RemoveMulticastRoute (uint32_t i); |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
171 |
|
639
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
172 |
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
|
173 |
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
|
174 |
uint32_t GetNInterfaces (void) const; |
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
175 |
|
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
|
176 |
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
|
177 |
uint32_t FindInterfaceForAddr (Ipv4Address addr, Ipv4Mask mask) const; |
2711
83addb15f632
ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents:
2592
diff
changeset
|
178 |
int32_t FindInterfaceIndexForDevice (Ptr<NetDevice> device) const; |
639
4e3a1dc4b1e4
cleanup old dox and reorg header
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
633
diff
changeset
|
179 |
|
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
|
180 |
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
|
181 |
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
|
182 |
|
444
1647ca57f19d
remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
415
diff
changeset
|
183 |
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
|
184 |
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
|
185 |
Ipv4Mask GetNetworkMask (uint32_t t) const; |
1647ca57f19d
remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
415
diff
changeset
|
186 |
Ipv4Address GetAddress (uint32_t i) const; |
1776
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1524
diff
changeset
|
187 |
void SetMetric (uint32_t i, uint16_t metric); |
0d5be0c3d229
Add support for non-unit-cost metrics for Ipv4Interfaces (for use in routing); add example script simple-alternate-routing.cc
Tom Henderson <tomh@tomh.org>
parents:
1524
diff
changeset
|
188 |
uint16_t GetMetric (uint32_t i) const; |
1434
2b63aafb050b
set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents:
1432
diff
changeset
|
189 |
bool GetIfIndexForDestination (Ipv4Address destination, |
2b63aafb050b
set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents:
1432
diff
changeset
|
190 |
uint32_t& ifIndex) const; |
444
1647ca57f19d
remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
415
diff
changeset
|
191 |
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
|
192 |
bool IsUp (uint32_t i) const; |
1647ca57f19d
remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
415
diff
changeset
|
193 |
void SetUp (uint32_t i); |
1647ca57f19d
remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
415
diff
changeset
|
194 |
void SetDown (uint32_t i); |
1647ca57f19d
remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
415
diff
changeset
|
195 |
|
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
|
196 |
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
|
197 |
int priority); |
444
1647ca57f19d
remove ipv4 interface from public API
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
415
diff
changeset
|
198 |
|
513
b7c7ea629de9
make L3Demux an NsUnknown object.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
504
diff
changeset
|
199 |
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
|
200 |
|
513
b7c7ea629de9
make L3Demux an NsUnknown object.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
504
diff
changeset
|
201 |
virtual void DoDispose (void); |
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
|
202 |
|
513
b7c7ea629de9
make L3Demux an NsUnknown object.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
504
diff
changeset
|
203 |
private: |
1432
3aef7d7a71c2
more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1428
diff
changeset
|
204 |
void Lookup (uint32_t ifIndex, |
3aef7d7a71c2
more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1428
diff
changeset
|
205 |
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
|
206 |
Ptr<Packet> packet, |
1432
3aef7d7a71c2
more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1428
diff
changeset
|
207 |
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
|
208 |
|
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 |
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
|
210 |
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
|
211 |
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
|
212 |
Ipv4Header const &ipHeader); |
1432
3aef7d7a71c2
more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1428
diff
changeset
|
213 |
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
|
214 |
Ptr<Packet> packet, |
1432
3aef7d7a71c2
more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1428
diff
changeset
|
215 |
Ipv4Header &ipHeader, |
3aef7d7a71c2
more multicast plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents:
1428
diff
changeset
|
216 |
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
|
217 |
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
|
218 |
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
|
219 |
void SetupLoopback (void); |
3588
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
220 |
Ipv4L3Protocol(const Ipv4L3Protocol &); |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
221 |
Ipv4L3Protocol &operator = (const Ipv4L3Protocol &); |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
222 |
|
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
|
223 |
typedef std::list<Ptr<Ipv4Interface> > Ipv4InterfaceList; |
1428
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
224 |
typedef std::list<std::pair<Ipv4Address, Ipv4Address> > |
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
225 |
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
|
226 |
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
|
227 |
|
3588
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
228 |
typedef std::list<Ptr<Ipv4L4Protocol> > L4List_t; |
ad0a36bfdb62
bug 282: remove Ipv4L4Demux
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3548
diff
changeset
|
229 |
L4List_t m_protocols; |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
230 |
Ipv4InterfaceList m_interfaces; |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
231 |
uint32_t m_nInterfaces; |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
232 |
uint8_t m_defaultTtl; |
3235
c2f34dac1b9e
add support for attribtues to bug 34
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
3216
diff
changeset
|
233 |
bool m_calcChecksum; |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
234 |
uint16_t m_identification; |
728
95c426b1cb60
rename INode to Node
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
639
diff
changeset
|
235 |
Ptr<Node> m_node; |
2498
e01570293b98
convert InternetNode to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2251
diff
changeset
|
236 |
TracedCallback<Ptr<const Packet>, uint32_t> m_txTrace; |
e01570293b98
convert InternetNode to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2251
diff
changeset
|
237 |
TracedCallback<Ptr<const Packet>, uint32_t> m_rxTrace; |
e01570293b98
convert InternetNode to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2251
diff
changeset
|
238 |
TracedCallback<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
|
239 |
|
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
|
240 |
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
|
241 |
|
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
|
242 |
Ptr<Ipv4StaticRouting> m_staticRouting; |
1428
a8f3d01d4a2c
untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents:
1229
diff
changeset
|
243 |
Ipv4MulticastGroupList m_multicastGroups; |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
244 |
}; |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
245 |
|
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
246 |
} // Namespace ns3 |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
247 |
|
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
|
248 |
#endif /* IPV4_L3_PROTOCOL_H */ |