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< Entry > | m_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 |
Definition at line 30 of file ipv4-address-generator.cc.
ns3::Ipv4AddressGeneratorImpl::Ipv4AddressGeneratorImpl | ( | ) |
Definition at line 79 of file ipv4-address-generator.cc.
References NS_LOG_FUNCTION, and Reset().
|
virtual |
Definition at line 125 of file ipv4-address-generator.cc.
References NS_LOG_FUNCTION.
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, and NS_LOG_LOGIC.
Referenced by NextAddress().
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.
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.
void ns3::Ipv4AddressGeneratorImpl::Init | ( | const Ipv4Address | net, |
const Ipv4Mask | mask, | ||
const Ipv4Address | addr | ||
) |
Definition at line 131 of file ipv4-address-generator.cc.
References ns3::Ipv4AddressGeneratorImpl::NetworkState::addr, ns3::Ipv4Address::Get(), ns3::Ipv4Mask::Get(), m_netTable, MaskToIndex(), ns3::Ipv4AddressGeneratorImpl::NetworkState::network, NS_ABORT_MSG_UNLESS, NS_LOG_FUNCTION, and ns3::Ipv4AddressGeneratorImpl::NetworkState::shift.
void ns3::Ipv4AddressGeneratorImpl::InitAddress | ( | const Ipv4Address | addr, |
const Ipv4Mask | mask | ||
) |
Definition at line 194 of file ipv4-address-generator.cc.
References ns3::Ipv4AddressGeneratorImpl::NetworkState::addr, ns3::Ipv4Address::Get(), m_netTable, MaskToIndex(), NS_ABORT_MSG_UNLESS, and NS_LOG_FUNCTION.
|
private |
Definition at line 345 of file ipv4-address-generator.cc.
References ns3::Ipv4Mask::Get(), N_BITS, NS_ABORT_MSG_UNLESS, NS_ASSERT_MSG, and NS_LOG_FUNCTION.
Referenced by GetAddress(), GetNetwork(), Init(), InitAddress(), NextAddress(), and NextNetwork().
Ipv4Address ns3::Ipv4AddressGeneratorImpl::NextAddress | ( | const Ipv4Mask | mask | ) |
Definition at line 221 of file ipv4-address-generator.cc.
References AddAllocated(), ns3::Ipv4AddressGeneratorImpl::NetworkState::addr, m_netTable, MaskToIndex(), NS_ABORT_MSG_UNLESS, and NS_LOG_FUNCTION.
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.
void ns3::Ipv4AddressGeneratorImpl::Reset | ( | void | ) |
Definition at line 87 of file ipv4-address-generator.cc.
References ns3::Ipv4AddressGeneratorImpl::NetworkState::addr, ns3::Ipv4AddressGeneratorImpl::NetworkState::addrMax, m_entries, m_netTable, m_test, ns3::Ipv4AddressGeneratorImpl::NetworkState::mask, MOST_SIGNIFICANT_BIT, N_BITS, ns3::Ipv4AddressGeneratorImpl::NetworkState::network, NS_LOG_FUNCTION, and ns3::Ipv4AddressGeneratorImpl::NetworkState::shift.
Referenced by Ipv4AddressGeneratorImpl().
void ns3::Ipv4AddressGeneratorImpl::TestMode | ( | void | ) |
Definition at line 338 of file ipv4-address-generator.cc.
References m_test, and NS_LOG_FUNCTION.
Definition at line 75 of file ipv4-address-generator.cc.
Referenced by AddAllocated(), and Reset().
|
private |
Definition at line 66 of file ipv4-address-generator.cc.
Referenced by GetAddress(), GetNetwork(), Init(), InitAddress(), NextAddress(), NextNetwork(), and Reset().
|
private |
Definition at line 76 of file ipv4-address-generator.cc.
Referenced by AddAllocated(), Reset(), and TestMode().
|
staticprivate |
Definition at line 52 of file ipv4-address-generator.cc.
Referenced by Reset().
|
staticprivate |
Definition at line 51 of file ipv4-address-generator.cc.
Referenced by MaskToIndex(), and Reset().