src/internet-stack/ipv4-impl.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 09 Jun 2008 15:40:22 -0700
changeset 3260 8c0ab08144e6
parent 2834 src/internet-node/ipv4-impl.cc@1aab57845b07
child 4372 d99061f1167c
permissions -rw-r--r--
bug 186: internet-node directory must be renamed to internet-stack
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
 *
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     5
 * 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
     6
 * 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
     7
 * published by the Free Software Foundation;
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     8
 *
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     9
 * 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
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
 * GNU General Public License for more details.
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    13
 *
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    14
 * 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
    15
 * 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
    16
 * 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
    17
 *
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    18
 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
 */
737
98eeb9273ed2 i-ipv4-impl.h -> ipv4-impl.h
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 734
diff changeset
    20
#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
    21
#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
    22
#include "ipv4-interface.h"
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    23
#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
    24
#include "ns3/net-device.h"
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    25
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    26
namespace ns3 {
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    27
2592
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    28
Ipv4Impl::Ipv4Impl ()
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    29
  : m_ipv4 (0)
568
e1660959ecbb use Ptr<> everywhere Object or NsUnknown are used
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 524
diff changeset
    30
{}
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    31
Ipv4Impl::~Ipv4Impl ()
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    32
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    33
  NS_ASSERT (m_ipv4 == 0);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    34
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    35
void 
2592
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    36
Ipv4Impl::SetIpv4 (Ptr<Ipv4L3Protocol> ipv4)
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    37
{
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    38
  m_ipv4 = ipv4;
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    39
}
3ebf97150166 get rid of CreateObjectWith
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1776
diff changeset
    40
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    41
Ipv4Impl::DoDispose (void)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    42
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    43
  m_ipv4 = 0;
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    44
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    45
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
    46
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
    47
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
    48
                              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
    49
{
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
  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
    51
}
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
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    53
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    54
Ipv4Impl::AddHostRouteTo (Ipv4Address dest, 
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    55
			   Ipv4Address nextHop, 
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    56
			   uint32_t interface)
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    57
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    58
  m_ipv4->AddHostRouteTo (dest, nextHop, interface);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    59
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    60
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    61
Ipv4Impl::AddHostRouteTo (Ipv4Address dest, 
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    62
			   uint32_t interface)
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    63
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    64
  m_ipv4->AddHostRouteTo (dest, interface);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    65
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    66
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    67
Ipv4Impl::AddNetworkRouteTo (Ipv4Address network, 
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    68
			      Ipv4Mask networkMask, 
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    69
			      Ipv4Address nextHop, 
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    70
			      uint32_t interface)
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    71
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    72
  m_ipv4->AddNetworkRouteTo (network, networkMask, nextHop, interface);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    73
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    74
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    75
Ipv4Impl::AddNetworkRouteTo (Ipv4Address network, 
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    76
			      Ipv4Mask networkMask, 
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    77
			      uint32_t interface)
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    78
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    79
  m_ipv4->AddNetworkRouteTo (network, networkMask, interface);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    80
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    81
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    82
Ipv4Impl::SetDefaultRoute (Ipv4Address nextHop, 
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    83
			    uint32_t interface)
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    84
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    85
  m_ipv4->SetDefaultRoute (nextHop, interface);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    86
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    87
uint32_t 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    88
Ipv4Impl::GetNRoutes (void)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    89
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    90
  return m_ipv4->GetNRoutes ();
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    91
}
757
f4a677b1f753 fix bug 28
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 745
diff changeset
    92
Ipv4Route 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    93
Ipv4Impl::GetRoute (uint32_t i)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    94
{
757
f4a677b1f753 fix bug 28
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 745
diff changeset
    95
  return *m_ipv4->GetRoute (i);
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    96
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    97
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
    98
Ipv4Impl::RemoveRoute (uint32_t i)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    99
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   100
  return m_ipv4->RemoveRoute (i);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   101
}
1428
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   102
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   103
void
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   104
Ipv4Impl::AddMulticastRoute (Ipv4Address origin,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   105
                             Ipv4Address group,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   106
                             uint32_t inputInterface,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   107
                             std::vector<uint32_t> outputInterfaces)
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   108
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   109
  m_ipv4->AddMulticastRoute (origin, group, inputInterface, outputInterfaces);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   110
}
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   111
1442
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   112
void
1444
7c81b4e2617d piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1442
diff changeset
   113
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
   114
{
1444
7c81b4e2617d piles of doxygen, changes to SetDefaultMulticastRoute plumbing
Craig Dowell <craigdo@ee.washington.edu>
parents: 1442
diff changeset
   115
  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
   116
}
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   117
1428
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   118
uint32_t 
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   119
Ipv4Impl::GetNMulticastRoutes (void) const
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   120
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   121
  return m_ipv4->GetNMulticastRoutes ();
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   122
}
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
Ipv4MulticastRoute 
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   125
Ipv4Impl::GetMulticastRoute (uint32_t i) const
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   126
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   127
  return *m_ipv4->GetMulticastRoute (i);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   128
}
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
void
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   131
Ipv4Impl::RemoveMulticastRoute (Ipv4Address origin,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   132
                                Ipv4Address group,
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   133
                                uint32_t inputInterface)
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   134
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   135
  m_ipv4->RemoveMulticastRoute (origin, group, inputInterface);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   136
}
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
void 
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   139
Ipv4Impl::RemoveMulticastRoute (uint32_t i)
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   140
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   141
  return m_ipv4->RemoveMulticastRoute (i);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   142
}
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   143
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   144
uint32_t 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   145
Ipv4Impl::AddInterface (Ptr<NetDevice> device)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   146
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   147
  return m_ipv4->AddInterface (device);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   148
}
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
   149
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   150
uint32_t 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   151
Ipv4Impl::GetNInterfaces (void)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   152
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   153
  return m_ipv4->GetNInterfaces ();
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   154
}
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
   155
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
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
   157
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
   158
{
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
  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
   160
}
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
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
   163
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
   164
{
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
  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
   166
}
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
2711
83addb15f632 ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents: 2592
diff changeset
   168
int32_t 
83addb15f632 ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents: 2592
diff changeset
   169
Ipv4Impl::FindInterfaceForDevice (Ptr<NetDevice> device) const
83addb15f632 ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents: 2592
diff changeset
   170
{
83addb15f632 ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents: 2592
diff changeset
   171
  return m_ipv4->FindInterfaceIndexForDevice (device);
83addb15f632 ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents: 2592
diff changeset
   172
}
83addb15f632 ip helper and find ip interface for device method on ipv4
Craig Dowell <craigdo@ee.washington.edu>
parents: 2592
diff changeset
   173
593
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 568 540
diff changeset
   174
Ptr<NetDevice>
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   175
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
   176
{
593
90cf12cb4ab7 merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 568 540
diff changeset
   177
  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
   178
}
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   179
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   180
void 
1428
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   181
Ipv4Impl::JoinMulticastGroup (Ipv4Address origin, Ipv4Address group)
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   182
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   183
  m_ipv4->JoinMulticastGroup(origin, group);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   184
}
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
void
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   187
Ipv4Impl::LeaveMulticastGroup (Ipv4Address origin, Ipv4Address group)
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   188
{
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   189
  m_ipv4->LeaveMulticastGroup(origin, group);
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   190
}
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   191
a8f3d01d4a2c untested multicast support
Craig Dowell <craigdo@ee.washington.edu>
parents: 985
diff changeset
   192
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   193
Ipv4Impl::SetAddress (uint32_t i, Ipv4Address address)
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->SetAddress (i, address);
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
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   198
Ipv4Impl::SetNetworkMask (uint32_t i, Ipv4Mask mask)
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
  m_ipv4->SetNetworkMask (i, mask);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   201
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   202
Ipv4Mask 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   203
Ipv4Impl::GetNetworkMask (uint32_t i) const
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   204
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   205
  return m_ipv4->GetNetworkMask (i);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   206
}
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   207
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   208
Ipv4Address 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   209
Ipv4Impl::GetAddress (uint32_t i) const
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   210
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   211
  return m_ipv4->GetAddress (i);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   212
}
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   213
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
   214
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
   215
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
   216
{
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
  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
   218
}
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
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
   221
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
   222
{
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
   223
  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
   224
}
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
   225
1452
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   226
bool
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   227
Ipv4Impl::GetIfIndexForDestination (Ipv4Address dest, uint32_t &ifIndex) const
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   228
{
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   229
  return m_ipv4->GetIfIndexForDestination (dest, ifIndex);
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   230
}
973c456d3684 socket update broke multicast
Craig Dowell <craigdo@ee.washington.edu>
parents: 1444
diff changeset
   231
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   232
Ipv4Address 
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   233
Ipv4Impl::GetSourceAddress (Ipv4Address destination) const
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   234
{
1435
a70de165a25a set source IP address in udp-socket packets
Craig Dowell <craigdo@ee.washington.edu>
parents: 1434
diff changeset
   235
  uint32_t ifIndex = 0xffffffff;
a70de165a25a set source IP address in udp-socket packets
Craig Dowell <craigdo@ee.washington.edu>
parents: 1434
diff changeset
   236
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   237
  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
   238
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   239
  if (result)
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   240
    {
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   241
      return m_ipv4->GetAddress (ifIndex);
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   242
    }
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   243
  else
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   244
    {
1442
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   245
//
bb5cf98c0c64 real multicast enet addr, more source routes, default multicast route
Craig Dowell <craigdo@ee.washington.edu>
parents: 1440
diff changeset
   246
// 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
   247
//
1434
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   248
      return Ipv4Address::GetAny ();
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   249
    }
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   250
}
2b63aafb050b set source address in socket
Craig Dowell <craigdo@ee.washington.edu>
parents: 1428
diff changeset
   251
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   252
uint16_t 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   253
Ipv4Impl::GetMtu (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->GetMtu (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
bool 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   258
Ipv4Impl::IsUp (uint32_t i) const
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
  return m_ipv4->IsUp (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::SetUp (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->SetUp (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
void 
745
221fda1d30f8 IIpv4Impl -> Ipv4Impl
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 737
diff changeset
   268
Ipv4Impl::SetDown (uint32_t i)
522
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   269
{
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   270
  m_ipv4->SetDown (i);
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   271
}
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   272
d5039448597a remove Node::GetIpv4
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
   273
}//namespace ns3