src/internet-node/ipv4-impl.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 11 Mar 2008 13:30:12 -0700
changeset 2592 3ebf97150166
parent 1776 0d5be0c3d229
child 2711 83addb15f632
permissions -rw-r--r--
get rid of CreateObjectWith
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
/*
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
 * Copyright (c) 2007 INRIA
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
 * All rights reserved.
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 *
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     6
 * This program is free software; you can redistribute it and/or modify
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     7
 * it under the terms of the GNU General Public License version 2 as
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 * published by the Free Software Foundation;
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 *
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 * GNU General Public License for more details.
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 *
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
 * along with this program; if not, write to the Free Software
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 *
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    20
 */
737
98eeb9273ed2 i-ipv4-impl.h -> ipv4-impl.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 734
diff changeset
    21
#include "ipv4-impl.h"
733
fb1882e7d785 rename ipv4.h to ipv4-l3-protocol.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 593
diff changeset
    22
#include "ipv4-l3-protocol.h"
540
507eababb124 Separate address assignment from routing in PointToPoint topology code
Tom Henderson <tomh@tomh.org>
parents: 524
diff changeset
    23
#include "ipv4-interface.h"
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    24
#include "ns3/assert.h"
568
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 524
diff changeset
    25
#include "ns3/net-device.h"
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
namespace ns3 {
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    28
2592
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    29
Ipv4Impl::Ipv4Impl ()
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    30
  : m_ipv4 (0)
568
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 524
diff changeset
    31
{}
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    32
Ipv4Impl::~Ipv4Impl ()
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    33
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    34
  NS_ASSERT (m_ipv4 == 0);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    36
void 
2592
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    37
Ipv4Impl::SetIpv4 (Ptr<Ipv4L3Protocol> ipv4)
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    38
{
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    39
  m_ipv4 = ipv4;
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    40
}
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    41
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    42
Ipv4Impl::DoDispose (void)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    43
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    44
  m_ipv4 = 0;
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    45
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    46
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: 757
diff changeset
    47
void
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: 757
diff changeset
    48
Ipv4Impl::AddRoutingProtocol (Ptr<Ipv4RoutingProtocol> routingProtocol,
985
b15a6fa08c14 Add documentation for the dynamic routing interfaces. Change Ipv4::AddRoutingProtocol priority parameter type from int to int16_t to make way for in the future providing stable sorting of routing protocols of the same priority.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents: 983
diff changeset
    49
                              int16_t priority)
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: 757
diff changeset
    50
{
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: 757
diff changeset
    51
  m_ipv4->AddRoutingProtocol (routingProtocol, priority);
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: 757
diff changeset
    52
}
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: 757
diff changeset
    53
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    54
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    55
Ipv4Impl::AddHostRouteTo (Ipv4Address dest, 
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    56
			   Ipv4Address nextHop, 
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    57
			   uint32_t interface)
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    58
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    59
  m_ipv4->AddHostRouteTo (dest, nextHop, interface);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    60
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    61
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    62
Ipv4Impl::AddHostRouteTo (Ipv4Address dest, 
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    63
			   uint32_t interface)
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    64
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    65
  m_ipv4->AddHostRouteTo (dest, interface);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    66
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    67
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    68
Ipv4Impl::AddNetworkRouteTo (Ipv4Address network, 
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    69
			      Ipv4Mask networkMask, 
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    70
			      Ipv4Address nextHop, 
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    71
			      uint32_t interface)
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    72
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    73
  m_ipv4->AddNetworkRouteTo (network, networkMask, nextHop, interface);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    74
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    75
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    76
Ipv4Impl::AddNetworkRouteTo (Ipv4Address network, 
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    77
			      Ipv4Mask networkMask, 
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    78
			      uint32_t interface)
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    79
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    80
  m_ipv4->AddNetworkRouteTo (network, networkMask, interface);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    81
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    82
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    83
Ipv4Impl::SetDefaultRoute (Ipv4Address nextHop, 
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    84
			    uint32_t interface)
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    85
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    86
  m_ipv4->SetDefaultRoute (nextHop, interface);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    87
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    88
uint32_t 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    89
Ipv4Impl::GetNRoutes (void)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    90
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    91
  return m_ipv4->GetNRoutes ();
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    92
}
757
f4a677b1f753 fix bug 28
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 745
diff changeset
    93
Ipv4Route 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    94
Ipv4Impl::GetRoute (uint32_t i)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    95
{
757
f4a677b1f753 fix bug 28
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 745
diff changeset
    96
  return *m_ipv4->GetRoute (i);
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    97
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    98
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    99
Ipv4Impl::RemoveRoute (uint32_t i)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   100
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   101
  return m_ipv4->RemoveRoute (i);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   102
}
1428
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   103
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   104
void
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   105
Ipv4Impl::AddMulticastRoute (Ipv4Address origin,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   106
                             Ipv4Address group,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   107
                             uint32_t inputInterface,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   108
                             std::vector<uint32_t> outputInterfaces)
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   109
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   110
  m_ipv4->AddMulticastRoute (origin, group, inputInterface, outputInterfaces);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   111
}
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   112
1442
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   113
void
1444
7c81b4e2617d piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1442
diff changeset
   114
Ipv4Impl::SetDefaultMulticastRoute (uint32_t outputInterface)
1442
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   115
{
1444
7c81b4e2617d piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1442
diff changeset
   116
  m_ipv4->SetDefaultMulticastRoute (outputInterface);
1442
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   117
}
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   118
1428
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   119
uint32_t 
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   120
Ipv4Impl::GetNMulticastRoutes (void) const
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   121
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   122
  return m_ipv4->GetNMulticastRoutes ();
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   123
}
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   124
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   125
Ipv4MulticastRoute 
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   126
Ipv4Impl::GetMulticastRoute (uint32_t i) const
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   127
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   128
  return *m_ipv4->GetMulticastRoute (i);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   129
}
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   130
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   131
void
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   132
Ipv4Impl::RemoveMulticastRoute (Ipv4Address origin,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   133
                                Ipv4Address group,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   134
                                uint32_t inputInterface)
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   135
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   136
  m_ipv4->RemoveMulticastRoute (origin, group, inputInterface);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   137
}
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   138
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   139
void 
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   140
Ipv4Impl::RemoveMulticastRoute (uint32_t i)
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   141
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   142
  return m_ipv4->RemoveMulticastRoute (i);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   143
}
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   144
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   145
uint32_t 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   146
Ipv4Impl::AddInterface (Ptr<NetDevice> device)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   147
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   148
  return m_ipv4->AddInterface (device);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   149
}
1440
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   150
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   151
uint32_t 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   152
Ipv4Impl::GetNInterfaces (void)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   153
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   154
  return m_ipv4->GetNInterfaces ();
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   155
}
1440
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   156
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   157
uint32_t 
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   158
Ipv4Impl::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: 1435
diff changeset
   159
{
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   160
  return m_ipv4->FindInterfaceForAddr (addr);
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   161
}
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   162
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   163
uint32_t 
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   164
Ipv4Impl::FindInterfaceForAddr (Ipv4Address addr, Ipv4Mask mask) const
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   165
{
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   166
  return m_ipv4->FindInterfaceForAddr (addr, mask);
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   167
}
c77745b2731c add ipv4 methods, remove source multicast route requirement, fix udp socket source address prob
Craig Dowell <craigdo@ee.washington.edu>
parents: 1435
diff changeset
   168
593
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 568 540
diff changeset
   169
Ptr<NetDevice>
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   170
Ipv4Impl::GetNetDevice (uint32_t i)
540
507eababb124 Separate address assignment from routing in PointToPoint topology code
Tom Henderson <tomh@tomh.org>
parents: 524
diff changeset
   171
{
593
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 568 540
diff changeset
   172
  return m_ipv4->GetInterface (i)-> GetDevice ();
540
507eababb124 Separate address assignment from routing in PointToPoint topology code
Tom Henderson <tomh@tomh.org>
parents: 524
diff changeset
   173
}
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   174
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   175
void 
1428
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   176
Ipv4Impl::JoinMulticastGroup (Ipv4Address origin, Ipv4Address group)
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   177
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   178
  m_ipv4->JoinMulticastGroup(origin, group);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   179
}
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   180
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   181
void
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   182
Ipv4Impl::LeaveMulticastGroup (Ipv4Address origin, Ipv4Address group)
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   183
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   184
  m_ipv4->LeaveMulticastGroup(origin, group);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   185
}
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   186
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   187
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   188
Ipv4Impl::SetAddress (uint32_t i, Ipv4Address address)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   189
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   190
  m_ipv4->SetAddress (i, address);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   191
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   192
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   193
Ipv4Impl::SetNetworkMask (uint32_t i, Ipv4Mask mask)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   194
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   195
  m_ipv4->SetNetworkMask (i, mask);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   196
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   197
Ipv4Mask 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   198
Ipv4Impl::GetNetworkMask (uint32_t i) const
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   199
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   200
  return m_ipv4->GetNetworkMask (i);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   201
}
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   202
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   203
Ipv4Address 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   204
Ipv4Impl::GetAddress (uint32_t i) const
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   205
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   206
  return m_ipv4->GetAddress (i);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   207
}
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   208
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: 1452
diff changeset
   209
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: 1452
diff changeset
   210
Ipv4Impl::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: 1452
diff changeset
   211
{
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: 1452
diff changeset
   212
  m_ipv4->SetMetric (i, 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: 1452
diff changeset
   213
}
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: 1452
diff changeset
   214
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: 1452
diff changeset
   215
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: 1452
diff changeset
   216
Ipv4Impl::GetMetric (uint32_t i) 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: 1452
diff changeset
   217
{
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: 1452
diff changeset
   218
  return m_ipv4->GetMetric (i);
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: 1452
diff changeset
   219
}
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: 1452
diff changeset
   220
1452
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   221
bool
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   222
Ipv4Impl::GetIfIndexForDestination (Ipv4Address dest, uint32_t &ifIndex) const
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   223
{
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   224
  return m_ipv4->GetIfIndexForDestination (dest, ifIndex);
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   225
}
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   226
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   227
Ipv4Address 
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   228
Ipv4Impl::GetSourceAddress (Ipv4Address destination) const
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   229
{
1435
a70de165a25a set source IP address in udp-socket packets
Craig Dowell <craigdo@ee.washington.edu>
parents: 1434
diff changeset
   230
  uint32_t ifIndex = 0xffffffff;
a70de165a25a set source IP address in udp-socket packets
Craig Dowell <craigdo@ee.washington.edu>
parents: 1434
diff changeset
   231
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   232
  bool result = m_ipv4->GetIfIndexForDestination (destination, ifIndex);
1435
a70de165a25a set source IP address in udp-socket packets
Craig Dowell <craigdo@ee.washington.edu>
parents: 1434
diff changeset
   233
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   234
  if (result)
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   235
    {
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   236
      return m_ipv4->GetAddress (ifIndex);
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   237
    }
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   238
  else
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   239
    {
1442
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   240
//
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   241
// If we can't find any address, just leave it 0.0.0.0
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   242
//
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   243
      return Ipv4Address::GetAny ();
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   244
    }
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   245
}
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   246
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   247
uint16_t 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   248
Ipv4Impl::GetMtu (uint32_t i) const
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   249
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   250
  return m_ipv4->GetMtu (i);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   251
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   252
bool 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   253
Ipv4Impl::IsUp (uint32_t i) const
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   254
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   255
  return m_ipv4->IsUp (i);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   256
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   257
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   258
Ipv4Impl::SetUp (uint32_t i)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   259
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   260
  m_ipv4->SetUp (i);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   261
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   262
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   263
Ipv4Impl::SetDown (uint32_t i)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   264
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   265
  m_ipv4->SetDown (i);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   266
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   267
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   268
}//namespace ns3