A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
ipv4-routing-table-entry.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2005 INRIA
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
#ifndef IPV4_ROUTING_TABLE_ENTRY_H
21
#define IPV4_ROUTING_TABLE_ENTRY_H
22
23
#include <list>
24
#include <vector>
25
#include <ostream>
26
27
#include "ns3/ipv4-address.h"
28
29
namespace
ns3 {
30
37
class
Ipv4RoutingTableEntry
{
38
public
:
42
Ipv4RoutingTableEntry
();
47
Ipv4RoutingTableEntry
(
Ipv4RoutingTableEntry
const
&route);
52
Ipv4RoutingTableEntry
(
Ipv4RoutingTableEntry
const
*route);
56
bool
IsHost
(
void
)
const
;
62
bool
IsNetwork
(
void
)
const
;
66
bool
IsDefault
(
void
)
const
;
70
bool
IsGateway
(
void
)
const
;
74
Ipv4Address
GetGateway
(
void
)
const
;
78
Ipv4Address
GetDest
(
void
)
const
;
82
Ipv4Address
GetDestNetwork
(
void
)
const
;
86
Ipv4Mask
GetDestNetworkMask
(
void
)
const
;
90
uint32_t
GetInterface
(
void
)
const
;
97
static
Ipv4RoutingTableEntry
CreateHostRouteTo
(
Ipv4Address
dest,
98
Ipv4Address
nextHop,
99
uint32_t interface);
105
static
Ipv4RoutingTableEntry
CreateHostRouteTo
(
Ipv4Address
dest,
106
uint32_t interface);
114
static
Ipv4RoutingTableEntry
CreateNetworkRouteTo
(
Ipv4Address
network,
115
Ipv4Mask
networkMask,
116
Ipv4Address
nextHop,
117
uint32_t interface);
124
static
Ipv4RoutingTableEntry
CreateNetworkRouteTo
(
Ipv4Address
network,
125
Ipv4Mask
networkMask,
126
uint32_t interface);
134
static
Ipv4RoutingTableEntry
CreateDefaultRoute
(
Ipv4Address
nextHop,
135
uint32_t interface);
136
137
private
:
138
Ipv4RoutingTableEntry
(
Ipv4Address
network,
139
Ipv4Mask
mask,
140
Ipv4Address
gateway,
141
uint32_t interface);
142
Ipv4RoutingTableEntry
(
Ipv4Address
dest,
143
Ipv4Mask
mask,
144
uint32_t interface);
145
Ipv4RoutingTableEntry
(
Ipv4Address
dest,
146
Ipv4Address
gateway,
147
uint32_t interface);
148
Ipv4RoutingTableEntry
(
Ipv4Address
dest,
149
uint32_t interface);
150
151
Ipv4Address
m_dest
;
152
Ipv4Mask
m_destNetworkMask
;
153
Ipv4Address
m_gateway
;
154
uint32_t
m_interface
;
155
};
156
157
std::ostream&
operator<<
(std::ostream& os,
Ipv4RoutingTableEntry
const
& route);
158
164
class
Ipv4MulticastRoutingTableEntry
{
165
public
:
169
Ipv4MulticastRoutingTableEntry
();
170
175
Ipv4MulticastRoutingTableEntry
(
Ipv4MulticastRoutingTableEntry
const
&route);
180
Ipv4MulticastRoutingTableEntry
(
Ipv4MulticastRoutingTableEntry
const
*route);
184
Ipv4Address
GetOrigin
(
void
)
const
;
188
Ipv4Address
GetGroup
(
void
)
const
;
192
uint32_t
GetInputInterface
(
void
)
const
;
196
uint32_t
GetNOutputInterfaces
(
void
)
const
;
201
uint32_t
GetOutputInterface
(uint32_t n)
const
;
205
std::vector<uint32_t>
GetOutputInterfaces
(
void
)
const
;
213
static
Ipv4MulticastRoutingTableEntry
CreateMulticastRoute
(
Ipv4Address
origin,
214
Ipv4Address
group
, uint32_t inputInterface,
215
std::vector<uint32_t> outputInterfaces);
216
217
private
:
218
Ipv4MulticastRoutingTableEntry
(
Ipv4Address
origin,
Ipv4Address
group,
219
uint32_t inputInterface, std::vector<uint32_t> outputInterfaces);
220
221
Ipv4Address
m_origin
;
222
Ipv4Address
m_group
;
223
uint32_t
m_inputInterface
;
224
std::vector<uint32_t>
m_outputInterfaces
;
225
};
226
227
std::ostream&
operator<<
(std::ostream& os,
Ipv4MulticastRoutingTableEntry
const
& route);
228
229
}
// namespace ns3
230
231
#endif
/* IPV4_ROUTING_TABLE_ENTRY_H */
ns3::Ipv4MulticastRoutingTableEntry::m_origin
Ipv4Address m_origin
Definition:
ipv4-routing-table-entry.h:221
ns3::Ipv4MulticastRoutingTableEntry::m_inputInterface
uint32_t m_inputInterface
Definition:
ipv4-routing-table-entry.h:223
ns3::Ipv4Mask
a class to represent an Ipv4 address mask
Definition:
ipv4-address.h:210
ns3::Ipv4MulticastRoutingTableEntry::GetOrigin
Ipv4Address GetOrigin(void) const
Definition:
ipv4-routing-table-entry.cc:301
ns3::Ipv4RoutingTableEntry::GetDestNetwork
Ipv4Address GetDestNetwork(void) const
Definition:
ipv4-routing-table-entry.cc:134
ns3::Ipv4MulticastRoutingTableEntry::GetInputInterface
uint32_t GetInputInterface(void) const
Definition:
ipv4-routing-table-entry.cc:315
ns3::Ipv4RoutingTableEntry::m_interface
uint32_t m_interface
Definition:
ipv4-routing-table-entry.h:154
ns3::Ipv4MulticastRoutingTableEntry::CreateMulticastRoute
static Ipv4MulticastRoutingTableEntry CreateMulticastRoute(Ipv4Address origin, Ipv4Address group, uint32_t inputInterface, std::vector< uint32_t > outputInterfaces)
Definition:
ipv4-routing-table-entry.cc:346
ns3::Ipv4MulticastRoutingTableEntry::m_group
Ipv4Address m_group
Definition:
ipv4-routing-table-entry.h:222
ns3::Ipv4RoutingTableEntry::GetInterface
uint32_t GetInterface(void) const
Definition:
ipv4-routing-table-entry.cc:165
ns3::Ipv4RoutingTableEntry
Definition:
ipv4-routing-table-entry.h:37
ns3::Ipv4RoutingTableEntry::IsGateway
bool IsGateway(void) const
Definition:
ipv4-routing-table-entry.cc:146
ns3::Ipv4RoutingTableEntry::CreateHostRouteTo
static Ipv4RoutingTableEntry CreateHostRouteTo(Ipv4Address dest, Ipv4Address nextHop, uint32_t interface)
Definition:
ipv4-routing-table-entry.cc:172
ns3::Ipv4RoutingTableEntry::CreateNetworkRouteTo
static Ipv4RoutingTableEntry CreateNetworkRouteTo(Ipv4Address network, Ipv4Mask networkMask, Ipv4Address nextHop, uint32_t interface)
Definition:
ipv4-routing-table-entry.cc:187
visualizer.higcontainer.group
tuple group
Definition:
higcontainer.py:88
ns3::Ipv4MulticastRoutingTableEntry::m_outputInterfaces
std::vector< uint32_t > m_outputInterfaces
Definition:
ipv4-routing-table-entry.h:224
ns3::Ipv4RoutingTableEntry::IsNetwork
bool IsNetwork(void) const
Definition:
ipv4-routing-table-entry.cc:115
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition:
angles.cc:43
ns3::Ipv4RoutingTableEntry::m_gateway
Ipv4Address m_gateway
Definition:
ipv4-routing-table-entry.h:153
ns3::Ipv4MulticastRoutingTableEntry::Ipv4MulticastRoutingTableEntry
Ipv4MulticastRoutingTableEntry()
This constructor does nothing.
Definition:
ipv4-routing-table-entry.cc:262
ns3::Ipv4MulticastRoutingTableEntry::GetOutputInterface
uint32_t GetOutputInterface(uint32_t n) const
Definition:
ipv4-routing-table-entry.cc:329
ns3::Ipv4RoutingTableEntry::m_destNetworkMask
Ipv4Mask m_destNetworkMask
Definition:
ipv4-routing-table-entry.h:152
ns3::Ipv4RoutingTableEntry::CreateDefaultRoute
static Ipv4RoutingTableEntry CreateDefaultRoute(Ipv4Address nextHop, uint32_t interface)
Definition:
ipv4-routing-table-entry.cc:206
ns3::Ipv4RoutingTableEntry::GetDest
Ipv4Address GetDest(void) const
Definition:
ipv4-routing-table-entry.cc:109
ns3::Ipv4MulticastRoutingTableEntry
A record of an IPv4 multicast route for Ipv4GlobalRouting and Ipv4StaticRouting.
Definition:
ipv4-routing-table-entry.h:164
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:38
ns3::Ipv4MulticastRoutingTableEntry::GetGroup
Ipv4Address GetGroup(void) const
Definition:
ipv4-routing-table-entry.cc:308
ns3::Ipv4RoutingTableEntry::GetGateway
Ipv4Address GetGateway(void) const
Definition:
ipv4-routing-table-entry.cc:159
ns3::Ipv4RoutingTableEntry::m_dest
Ipv4Address m_dest
Definition:
ipv4-routing-table-entry.h:151
ns3::Ipv4MulticastRoutingTableEntry::GetNOutputInterfaces
uint32_t GetNOutputInterfaces(void) const
Definition:
ipv4-routing-table-entry.cc:322
ns3::Ipv4RoutingTableEntry::IsHost
bool IsHost(void) const
Definition:
ipv4-routing-table-entry.cc:96
ns3::Ipv4RoutingTableEntry::GetDestNetworkMask
Ipv4Mask GetDestNetworkMask(void) const
Definition:
ipv4-routing-table-entry.cc:140
ns3::Ipv4RoutingTableEntry::IsDefault
bool IsDefault(void) const
Definition:
ipv4-routing-table-entry.cc:121
ns3::Ipv4MulticastRoutingTableEntry::GetOutputInterfaces
std::vector< uint32_t > GetOutputInterfaces(void) const
Definition:
ipv4-routing-table-entry.cc:339
ns3::Ipv4RoutingTableEntry::Ipv4RoutingTableEntry
Ipv4RoutingTableEntry()
This constructor does nothing.
Definition:
ipv4-routing-table-entry.cc:33
src
internet
model
ipv4-routing-table-entry.h
Generated on Sat Nov 16 2013 12:55:28 for ns-3 by
1.8.5