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-address-helper.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2008 University of Washington
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
19
#ifndef IPV4_ADDRESS_HELPER_H
20
#define IPV4_ADDRESS_HELPER_H
21
22
#include "ns3/ipv4-address.h"
23
#include "ns3/net-device-container.h"
24
#include "
ipv4-interface-container.h
"
25
26
namespace
ns3 {
27
45
class
Ipv4AddressHelper
46
{
47
public
:
52
Ipv4AddressHelper
();
53
59
Ipv4AddressHelper
(
Ipv4Address
network,
Ipv4Mask
mask,
60
Ipv4Address
base =
"0.0.0.1"
);
61
91
void
SetBase
(
Ipv4Address
network,
Ipv4Mask
mask,
92
Ipv4Address
base =
"0.0.0.1"
);
93
120
Ipv4Address
NewNetwork
(
void
);
121
146
Ipv4Address
NewAddress
(
void
);
147
176
Ipv4InterfaceContainer
Assign
(
const
NetDeviceContainer
&c);
177
178
private
:
182
uint32_t
NumAddressBits
(uint32_t maskbits)
const
;
183
184
uint32_t
m_network
;
185
uint32_t
m_mask
;
186
uint32_t
m_address
;
187
uint32_t
m_base
;
188
uint32_t
m_shift
;
189
uint32_t
m_max
;
190
};
191
192
}
// namespace ns3
193
194
#endif
/* IPV4_ADDRESS_HELPER_H */
src
internet
helper
ipv4-address-helper.h
Generated on Tue Nov 13 2012 10:32:13 for ns-3 by
1.8.1.2