author | Natale Patriciello <natale.patriciello@gmail.com> |
Tue, 08 Mar 2016 10:43:58 -0800 | |
changeset 11954 | 5916e41a6f07 |
parent 11666 | e8634b0101f7 |
child 11959 | 84c6ea472ffb |
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) 2005,2006,2007 INRIA |
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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
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 |
|
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
21 |
#include "ipv4-interface.h" |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
22 |
#include "loopback-net-device.h" |
524
082ffdd8fbd7
move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
474
diff
changeset
|
23 |
#include "ns3/ipv4-address.h" |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
24 |
#include "ipv4-l3-protocol.h" |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
25 |
#include "arp-l3-protocol.h" |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
26 |
#include "arp-cache.h" |
524
082ffdd8fbd7
move code around
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
474
diff
changeset
|
27 |
#include "ns3/net-device.h" |
1504
36ecc970ba96
checkpoint debug to log
Craig Dowell <craigdo@ee.washington.edu>
parents:
1451
diff
changeset
|
28 |
#include "ns3/log.h" |
1866
e7dbcc4df546
do not use Packet objects directly. Use Ptr<Packet> instead
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
1504
diff
changeset
|
29 |
#include "ns3/packet.h" |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
30 |
#include "ns3/node.h" |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
31 |
#include "ns3/pointer.h" |
11954
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
32 |
#include "ns3/traffic-control-layer.h" |
1430 | 33 |
|
10968
2d29fee2b7b8
[Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
10652
diff
changeset
|
34 |
namespace ns3 { |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
35 |
|
10968
2d29fee2b7b8
[Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
10652
diff
changeset
|
36 |
NS_LOG_COMPONENT_DEFINE ("Ipv4Interface"); |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
37 |
|
10652
dc18deba4502
[doxygen] Revert r10410, r10411, r10412
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
10410
diff
changeset
|
38 |
NS_OBJECT_ENSURE_REGISTERED (Ipv4Interface); |
6393
f7e1f9dfa08d
ensure objects are regsitered
Josh Pelkey <jpelkey@gatech.edu>
parents:
5681
diff
changeset
|
39 |
|
2936
d108e5f0bd3e
define a TypeId for ns3::Ipv4Interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
40 |
TypeId |
d108e5f0bd3e
define a TypeId for ns3::Ipv4Interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
41 |
Ipv4Interface::GetTypeId (void) |
d108e5f0bd3e
define a TypeId for ns3::Ipv4Interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
42 |
{ |
d108e5f0bd3e
define a TypeId for ns3::Ipv4Interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
43 |
static TypeId tid = TypeId ("ns3::Ipv4Interface") |
d108e5f0bd3e
define a TypeId for ns3::Ipv4Interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
44 |
.SetParent<Object> () |
11666
e8634b0101f7
Missing SetGroupName in two classes
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
10968
diff
changeset
|
45 |
.SetGroupName ("Internet") |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
46 |
.AddAttribute ("ArpCache", |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
47 |
"The arp cache for this ipv4 interface", |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
48 |
PointerValue (0), |
5681
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
49 |
MakePointerAccessor (&Ipv4Interface::SetArpCache, |
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
50 |
&Ipv4Interface::GetArpCache), |
4614
8f115595c247
bug 610: Wrong PointerChecker in attribute of Ipv4Interface
Kirill V. Andreev <kirillano@yandex.ru>
parents:
4607
diff
changeset
|
51 |
MakePointerChecker<ArpCache> ()) |
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
7150
diff
changeset
|
52 |
; |
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
7150
diff
changeset
|
53 |
; |
2936
d108e5f0bd3e
define a TypeId for ns3::Ipv4Interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
54 |
return tid; |
d108e5f0bd3e
define a TypeId for ns3::Ipv4Interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
55 |
} |
d108e5f0bd3e
define a TypeId for ns3::Ipv4Interface
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2834
diff
changeset
|
56 |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
57 |
/** |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
58 |
* By default, Ipv4 interface are created in the "down" state |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
59 |
* with no IP addresses. Before becoming useable, the user must |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
60 |
* invoke SetUp on them once an Ipv4 address and mask have been set. |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
61 |
*/ |
2592
3ebf97150166
get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2542
diff
changeset
|
62 |
Ipv4Interface::Ipv4Interface () |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
63 |
: m_ifup (false), |
4607
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
64 |
m_forwarding (true), |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
65 |
m_metric (1), |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
66 |
m_node (0), |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
67 |
m_device (0), |
11954
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
68 |
m_tc (0), |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
69 |
m_cache (0) |
1430 | 70 |
{ |
2983
e3a416fe9dd5
NS_LOG_FUNCTION -> NS_LOG_FUNCTION_NOARGS and NS_LOG_PARAMS -> NS_LOG_FUNCTION
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
2977
diff
changeset
|
71 |
NS_LOG_FUNCTION (this); |
1430 | 72 |
} |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
73 |
|
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
74 |
Ipv4Interface::~Ipv4Interface () |
1430 | 75 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
76 |
NS_LOG_FUNCTION (this); |
1430 | 77 |
} |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
78 |
|
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
|
79 |
void |
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
|
80 |
Ipv4Interface::DoDispose (void) |
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
|
81 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
82 |
NS_LOG_FUNCTION (this); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
83 |
m_node = 0; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
84 |
m_device = 0; |
11954
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
85 |
m_tc = 0; |
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
86 |
m_cache = 0; |
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
|
87 |
Object::DoDispose (); |
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
|
88 |
} |
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
|
89 |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
90 |
void |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
91 |
Ipv4Interface::SetNode (Ptr<Node> node) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
92 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
93 |
NS_LOG_FUNCTION (this << node); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
94 |
m_node = node; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
95 |
DoSetup (); |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
96 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
97 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
98 |
void |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
99 |
Ipv4Interface::SetDevice (Ptr<NetDevice> device) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
100 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
101 |
NS_LOG_FUNCTION (this << device); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
102 |
m_device = device; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
103 |
DoSetup (); |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
104 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
105 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
106 |
void |
11954
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
107 |
Ipv4Interface::SetTrafficControl (Ptr<TrafficControlLayer> tc) |
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
108 |
{ |
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
109 |
NS_LOG_FUNCTION (this << tc); |
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
110 |
m_tc = tc; |
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
111 |
} |
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
112 |
|
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
113 |
void |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
114 |
Ipv4Interface::DoSetup (void) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
115 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
116 |
NS_LOG_FUNCTION (this); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
117 |
if (m_node == 0 || m_device == 0) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
118 |
{ |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
119 |
return; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
120 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
121 |
if (!m_device->NeedsArp ()) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
122 |
{ |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
123 |
return; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
124 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
125 |
Ptr<ArpL3Protocol> arp = m_node->GetObject<ArpL3Protocol> (); |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
126 |
m_cache = arp->CreateCache (m_device, this); |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
127 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
128 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
129 |
Ptr<NetDevice> |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
130 |
Ipv4Interface::GetDevice (void) const |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
131 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
132 |
NS_LOG_FUNCTION (this); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
133 |
return m_device; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
134 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
135 |
|
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:
1504
diff
changeset
|
136 |
void |
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:
1504
diff
changeset
|
137 |
Ipv4Interface::SetMetric (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:
1504
diff
changeset
|
138 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
139 |
NS_LOG_FUNCTION (this << metric); |
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:
1504
diff
changeset
|
140 |
m_metric = 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:
1504
diff
changeset
|
141 |
} |
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:
1504
diff
changeset
|
142 |
|
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:
1504
diff
changeset
|
143 |
uint16_t |
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:
1504
diff
changeset
|
144 |
Ipv4Interface::GetMetric (void) const |
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:
1504
diff
changeset
|
145 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
146 |
NS_LOG_FUNCTION (this); |
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:
1504
diff
changeset
|
147 |
return m_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:
1504
diff
changeset
|
148 |
} |
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:
1504
diff
changeset
|
149 |
|
5681
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
150 |
void |
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
151 |
Ipv4Interface::SetArpCache (Ptr<ArpCache> a) |
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
152 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
153 |
NS_LOG_FUNCTION (this << a); |
5681
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
154 |
m_cache = a; |
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
155 |
} |
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
156 |
|
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
157 |
Ptr<ArpCache> |
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
158 |
Ipv4Interface::GetArpCache () const |
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
159 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
160 |
NS_LOG_FUNCTION (this); |
5681
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
161 |
return m_cache; |
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
162 |
} |
795c049199c5
Includes cleanup + layer 2 link failure detection (untested)
Pavel Boyko <boyko@iitp.ru>
parents:
5677
diff
changeset
|
163 |
|
1430 | 164 |
/** |
165 |
* These are IP interface states and may be distinct from |
|
166 |
* NetDevice states, such as found in real implementations |
|
167 |
* (where the device may be down but IP interface state is still up). |
|
168 |
*/ |
|
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
169 |
bool |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
170 |
Ipv4Interface::IsUp (void) const |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
171 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
172 |
NS_LOG_FUNCTION (this); |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
173 |
return m_ifup; |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
174 |
} |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
175 |
|
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
176 |
bool |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
177 |
Ipv4Interface::IsDown (void) const |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
178 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
179 |
NS_LOG_FUNCTION (this); |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
180 |
return !m_ifup; |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
181 |
} |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
182 |
|
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
183 |
void |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
184 |
Ipv4Interface::SetUp (void) |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
185 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
186 |
NS_LOG_FUNCTION (this); |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
187 |
m_ifup = true; |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
188 |
} |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
189 |
|
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
190 |
void |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
191 |
Ipv4Interface::SetDown (void) |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
192 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
193 |
NS_LOG_FUNCTION (this); |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
194 |
m_ifup = false; |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
195 |
} |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
196 |
|
4607
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
197 |
bool |
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
198 |
Ipv4Interface::IsForwarding (void) const |
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
199 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
200 |
NS_LOG_FUNCTION (this); |
4607
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
201 |
return m_forwarding; |
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
202 |
} |
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
203 |
|
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
204 |
void |
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
205 |
Ipv4Interface::SetForwarding (bool val) |
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
206 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
207 |
NS_LOG_FUNCTION (this << val); |
4607
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
208 |
m_forwarding = val; |
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
209 |
} |
0e15594f67f3
bug 63: allow enabling or disabling ip forwarding on a per-interface basis
Tom Henderson <tomh@tomh.org>
parents:
4572
diff
changeset
|
210 |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
211 |
void |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
212 |
Ipv4Interface::Send (Ptr<Packet> p, Ipv4Address dest) |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
213 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
214 |
NS_LOG_FUNCTION (this << *p << dest); |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7176
diff
changeset
|
215 |
if (!IsUp ()) |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
216 |
{ |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
217 |
return; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
218 |
} |
11954
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
219 |
|
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
220 |
// Check for a loopback device, if it's the case we don't pass through |
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
221 |
// traffic control layer |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
222 |
if (DynamicCast<LoopbackNetDevice> (m_device)) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
223 |
{ |
9894
ac4e52a91d5d
Doxygenate todo's
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9710
diff
changeset
|
224 |
/// \todo additional checks needed here (such as whether multicast |
ac4e52a91d5d
Doxygenate todo's
Peter D. Barnes, Jr. <barnes26@llnl.gov>
parents:
9710
diff
changeset
|
225 |
/// goes to loopback)? |
11954
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
226 |
m_device->Send (p, m_device->GetBroadcast (), Ipv4L3Protocol::PROT_NUMBER); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
227 |
return; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
228 |
} |
11954
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
229 |
|
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
230 |
NS_ASSERT (m_tc != 0); |
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
231 |
|
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
232 |
// is this packet aimed at a local interface ? |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
233 |
for (Ipv4InterfaceAddressListCI i = m_ifaddrs.begin (); i != m_ifaddrs.end (); ++i) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
234 |
{ |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
235 |
if (dest == (*i).GetLocal ()) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
236 |
{ |
11954
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
237 |
m_tc->Receive (m_device, p, Ipv4L3Protocol::PROT_NUMBER, |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
238 |
m_device->GetBroadcast (), |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
239 |
m_device->GetBroadcast (), |
11954
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
240 |
NetDevice::PACKET_HOST); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
241 |
return; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
242 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
243 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
244 |
if (m_device->NeedsArp ()) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
245 |
{ |
5677 | 246 |
NS_LOG_LOGIC ("Needs ARP" << " " << dest); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
247 |
Ptr<ArpL3Protocol> arp = m_node->GetObject<ArpL3Protocol> (); |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
248 |
Address hardwareDestination; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
249 |
bool found = false; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
250 |
if (dest.IsBroadcast ()) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
251 |
{ |
5677 | 252 |
NS_LOG_LOGIC ("All-network Broadcast"); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
253 |
hardwareDestination = m_device->GetBroadcast (); |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
254 |
found = true; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
255 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
256 |
else if (dest.IsMulticast ()) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
257 |
{ |
5677 | 258 |
NS_LOG_LOGIC ("IsMulticast"); |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7176
diff
changeset
|
259 |
NS_ASSERT_MSG (m_device->IsMulticast (), |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7176
diff
changeset
|
260 |
"ArpIpv4Interface::SendTo (): Sending multicast packet over " |
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7176
diff
changeset
|
261 |
"non-multicast device"); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
262 |
|
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7176
diff
changeset
|
263 |
hardwareDestination = m_device->GetMulticast (dest); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
264 |
found = true; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
265 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
266 |
else |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
267 |
{ |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
268 |
for (Ipv4InterfaceAddressListCI i = m_ifaddrs.begin (); i != m_ifaddrs.end (); ++i) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
269 |
{ |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
270 |
if (dest.IsSubnetDirectedBroadcast ((*i).GetMask ())) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
271 |
{ |
5677 | 272 |
NS_LOG_LOGIC ("Subnetwork Broadcast"); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
273 |
hardwareDestination = m_device->GetBroadcast (); |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
274 |
found = true; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
275 |
break; |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
276 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
277 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
278 |
if (!found) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
279 |
{ |
5677 | 280 |
NS_LOG_LOGIC ("ARP Lookup"); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
281 |
found = arp->Lookup (p, dest, m_device, m_cache, &hardwareDestination); |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
282 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
283 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
284 |
|
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
285 |
if (found) |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
286 |
{ |
5677 | 287 |
NS_LOG_LOGIC ("Address Resolved. Send."); |
11954
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
288 |
m_tc->Send (m_device, p, hardwareDestination, Ipv4L3Protocol::PROT_NUMBER); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
289 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
290 |
} |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
291 |
else |
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
292 |
{ |
5677 | 293 |
NS_LOG_LOGIC ("Doesn't need ARP"); |
11954
5916e41a6f07
internet: use traffic-control to send packets
Natale Patriciello <natale.patriciello@gmail.com>
parents:
11666
diff
changeset
|
294 |
m_tc->Send (m_device, p, m_device->GetBroadcast (), Ipv4L3Protocol::PROT_NUMBER); |
4472
e20a31541404
src/ and utils/ changes for IPv4 routing rework
Tom Henderson <tomh@tomh.org>
parents:
4375
diff
changeset
|
295 |
} |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
296 |
} |
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
297 |
|
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
298 |
uint32_t |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
299 |
Ipv4Interface::GetNAddresses (void) const |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
300 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
301 |
NS_LOG_FUNCTION (this); |
7256
b04ba6772f8c
rerun check-style.py at default level to enforce space after function name
Tom Henderson <tomh@tomh.org>
parents:
7176
diff
changeset
|
302 |
return m_ifaddrs.size (); |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
303 |
} |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
304 |
|
4563 | 305 |
bool |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
306 |
Ipv4Interface::AddAddress (Ipv4InterfaceAddress addr) |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
307 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
308 |
NS_LOG_FUNCTION (this << addr); |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
309 |
m_ifaddrs.push_back (addr); |
4563 | 310 |
return true; |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
311 |
} |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
312 |
|
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
313 |
Ipv4InterfaceAddress |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
314 |
Ipv4Interface::GetAddress (uint32_t index) const |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
315 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
316 |
NS_LOG_FUNCTION (this << index); |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
317 |
if (index < m_ifaddrs.size ()) |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
318 |
{ |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
319 |
uint32_t tmp = 0; |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
320 |
for (Ipv4InterfaceAddressListCI i = m_ifaddrs.begin (); i!= m_ifaddrs.end (); i++) |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
321 |
{ |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
322 |
if (tmp == index) |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
323 |
{ |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
324 |
return *i; |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
325 |
} |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
326 |
++tmp; |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
327 |
} |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
328 |
} |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
329 |
NS_ASSERT (false); // Assert if not found |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
330 |
Ipv4InterfaceAddress addr; |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
331 |
return (addr); // quiet compiler |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
332 |
} |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
333 |
|
4563 | 334 |
Ipv4InterfaceAddress |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
335 |
Ipv4Interface::RemoveAddress (uint32_t index) |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
336 |
{ |
9710
df21b904fce3
Further work on cleaning up function logging of internet module.
Kristijan Lenković <k.lenkovic@me.com>
parents:
7386
diff
changeset
|
337 |
NS_LOG_FUNCTION (this << index); |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
338 |
if (index >= m_ifaddrs.size ()) |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
339 |
{ |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
340 |
NS_ASSERT_MSG (false, "Bug in Ipv4Interface::RemoveAddress"); |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
341 |
} |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
342 |
Ipv4InterfaceAddressListI i = m_ifaddrs.begin (); |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
343 |
uint32_t tmp = 0; |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
344 |
while (i != m_ifaddrs.end ()) |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
345 |
{ |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
346 |
if (tmp == index) |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
347 |
{ |
4563 | 348 |
Ipv4InterfaceAddress addr = *i; |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
349 |
m_ifaddrs.erase (i); |
4563 | 350 |
return addr; |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
351 |
} |
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
7150
diff
changeset
|
352 |
++tmp; |
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
7150
diff
changeset
|
353 |
++i; |
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
354 |
} |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
355 |
NS_ASSERT_MSG (false, "Address " << index << " not found"); |
4563 | 356 |
Ipv4InterfaceAddress addr; |
357 |
return (addr); // quiet compiler |
|
4373
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
358 |
} |
e493e80274bd
implementation and plumbing of Ipv4InterfaceAddress class
Tom Henderson <tomh@tomh.org>
parents:
3260
diff
changeset
|
359 |
|
9915
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
360 |
Ipv4InterfaceAddress |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
361 |
Ipv4Interface::RemoveAddress(Ipv4Address address) |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
362 |
{ |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
363 |
NS_LOG_FUNCTION(this << address); |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
364 |
|
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
365 |
if (address == address.GetLoopback()) |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
366 |
{ |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
367 |
NS_LOG_WARN ("Cannot remove loopback address."); |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
368 |
return Ipv4InterfaceAddress(); |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
369 |
} |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
370 |
|
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
371 |
for(Ipv4InterfaceAddressListI it = m_ifaddrs.begin(); it != m_ifaddrs.end(); it++) |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
372 |
{ |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
373 |
if((*it).GetLocal() == address) |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
374 |
{ |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
375 |
Ipv4InterfaceAddress ifAddr = *it; |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
376 |
m_ifaddrs.erase(it); |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
377 |
return ifAddr; |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
378 |
} |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
379 |
} |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
380 |
return Ipv4InterfaceAddress(); |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
381 |
} |
d4c2228d3c30
Bug 760 - IP address removal can be painful
Alexander D'souza (moijes12@gmail.com)
parents:
9894
diff
changeset
|
382 |
|
7386
2310ed220a61
standardize ns-3 namespace declaration format
Vedran Miletić <rivanvx@gmail.com>
parents:
7256
diff
changeset
|
383 |
} // namespace ns3 |
236
5673656dc2e7
a basic untested ipv4 implementation
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff
changeset
|
384 |