A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::Ipv4AddressGeneratorImpl Class Reference
+ Collaboration diagram for ns3::Ipv4AddressGeneratorImpl:

Classes

class  Entry
class  NetworkState

Public Member Functions

 Ipv4AddressGeneratorImpl ()
virtual ~Ipv4AddressGeneratorImpl ()
bool AddAllocated (const Ipv4Address addr)
Ipv4Address GetAddress (const Ipv4Mask mask) const
Ipv4Address GetNetwork (const Ipv4Mask mask) const
void Init (const Ipv4Address net, const Ipv4Mask mask, const Ipv4Address addr)
void InitAddress (const Ipv4Address addr, const Ipv4Mask mask)
Ipv4Address NextAddress (const Ipv4Mask mask)
Ipv4Address NextNetwork (const Ipv4Mask mask)
void Reset (void)
void TestMode (void)

Private Member Functions

uint32_t MaskToIndex (Ipv4Mask mask) const

Private Attributes

std::list< Entrym_entries
NetworkState m_netTable [N_BITS]
bool m_test

Static Private Attributes

static const uint32_t MOST_SIGNIFICANT_BIT = 0x80000000
static const uint32_t N_BITS = 32

Detailed Description

Definition at line 30 of file ipv4-address-generator.cc.

Constructor & Destructor Documentation

ns3::Ipv4AddressGeneratorImpl::Ipv4AddressGeneratorImpl ( )

Definition at line 79 of file ipv4-address-generator.cc.

References NS_LOG_FUNCTION_NOARGS, and Reset().

+ Here is the call graph for this function:

ns3::Ipv4AddressGeneratorImpl::~Ipv4AddressGeneratorImpl ( )
virtual

Definition at line 125 of file ipv4-address-generator.cc.

References NS_LOG_FUNCTION_NOARGS.

Member Function Documentation

bool ns3::Ipv4AddressGeneratorImpl::AddAllocated ( const Ipv4Address  addr)

Definition at line 250 of file ipv4-address-generator.cc.

References ns3::Ipv4AddressGeneratorImpl::Entry::addrHigh, ns3::Ipv4AddressGeneratorImpl::Entry::addrLow, ns3::Ipv4Address::Get(), m_entries, m_test, NS_ABORT_MSG_UNLESS, NS_FATAL_ERROR, NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.

Referenced by NextAddress().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ipv4Address ns3::Ipv4AddressGeneratorImpl::GetAddress ( const Ipv4Mask  mask) const

Definition at line 208 of file ipv4-address-generator.cc.

References m_netTable, MaskToIndex(), and NS_LOG_FUNCTION_NOARGS.

+ Here is the call graph for this function:

Ipv4Address ns3::Ipv4AddressGeneratorImpl::GetNetwork ( const Ipv4Mask  mask) const

Definition at line 165 of file ipv4-address-generator.cc.

References m_netTable, MaskToIndex(), and NS_LOG_FUNCTION_NOARGS.

+ Here is the call graph for this function:

void ns3::Ipv4AddressGeneratorImpl::InitAddress ( const Ipv4Address  addr,
const Ipv4Mask  mask 
)
uint32_t ns3::Ipv4AddressGeneratorImpl::MaskToIndex ( Ipv4Mask  mask) const
private

Definition at line 345 of file ipv4-address-generator.cc.

References ns3::Ipv4Mask::Get(), N_BITS, NS_ABORT_MSG_UNLESS, and NS_ASSERT_MSG.

Referenced by GetAddress(), GetNetwork(), Init(), InitAddress(), NextAddress(), and NextNetwork().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ipv4Address ns3::Ipv4AddressGeneratorImpl::NextAddress ( const Ipv4Mask  mask)
Ipv4Address ns3::Ipv4AddressGeneratorImpl::NextNetwork ( const Ipv4Mask  mask)

Definition at line 175 of file ipv4-address-generator.cc.

References m_netTable, MaskToIndex(), ns3::Ipv4AddressGeneratorImpl::NetworkState::network, and NS_LOG_FUNCTION_NOARGS.

+ Here is the call graph for this function:

void ns3::Ipv4AddressGeneratorImpl::TestMode ( void  )

Definition at line 338 of file ipv4-address-generator.cc.

References m_test, and NS_LOG_FUNCTION_NOARGS.

Member Data Documentation

std::list<Entry> ns3::Ipv4AddressGeneratorImpl::m_entries
private

Definition at line 75 of file ipv4-address-generator.cc.

Referenced by AddAllocated(), and Reset().

NetworkState ns3::Ipv4AddressGeneratorImpl::m_netTable[N_BITS]
private
bool ns3::Ipv4AddressGeneratorImpl::m_test
private

Definition at line 76 of file ipv4-address-generator.cc.

Referenced by AddAllocated(), Reset(), and TestMode().

const uint32_t ns3::Ipv4AddressGeneratorImpl::MOST_SIGNIFICANT_BIT = 0x80000000
staticprivate

Definition at line 52 of file ipv4-address-generator.cc.

Referenced by Reset().

const uint32_t ns3::Ipv4AddressGeneratorImpl::N_BITS = 32
staticprivate

Definition at line 51 of file ipv4-address-generator.cc.

Referenced by MaskToIndex(), and Reset().


The documentation for this class was generated from the following file: