Classes | |
class | Entry |
class | NetworkState |
Public Member Functions | |
Ipv4AddressGeneratorImpl () | |
virtual | ~Ipv4AddressGeneratorImpl () |
void | Init (const Ipv4Address net, const Ipv4Mask mask, const Ipv4Address addr) |
Ipv4Address | GetNetwork (const Ipv4Mask mask) const |
Ipv4Address | NextNetwork (const Ipv4Mask mask) |
void | InitAddress (const Ipv4Address addr, const Ipv4Mask mask) |
Ipv4Address | GetAddress (const Ipv4Mask mask) const |
Ipv4Address | NextAddress (const Ipv4Mask mask) |
void | Reset (void) |
bool | AddAllocated (const Ipv4Address addr) |
void | TestMode (void) |
Private Member Functions | |
uint32_t | MaskToIndex (Ipv4Mask mask) const |
Private Attributes | |
NetworkState | m_netTable [N_BITS] |
std::list< Entry > | m_entries |
bool | m_test |
Static Private Attributes | |
static const uint32_t | N_BITS = 32 |
static const uint32_t | MOST_SIGNIFICANT_BIT = 0x80000000 |
Definition at line 29 of file ipv4-address-generator.cc.
ns3::Ipv4AddressGeneratorImpl::Ipv4AddressGeneratorImpl | ( | ) |
Definition at line 78 of file ipv4-address-generator.cc.
References NS_LOG_FUNCTION_NOARGS, and Reset().
ns3::Ipv4AddressGeneratorImpl::~Ipv4AddressGeneratorImpl | ( | ) | [virtual] |
Definition at line 124 of file ipv4-address-generator.cc.
References NS_LOG_FUNCTION_NOARGS.
bool ns3::Ipv4AddressGeneratorImpl::AddAllocated | ( | const Ipv4Address | addr | ) |
Definition at line 257 of file ipv4-address-generator.cc.
References ns3::Ipv4AddressGeneratorImpl::Entry::addrHigh, ns3::Ipv4AddressGeneratorImpl::Entry::addrLow, ns3::Ipv4Address::Get(), m_entries, m_test, NS_ASSERT_MSG, NS_LOG_FUNCTION_NOARGS, and NS_LOG_LOGIC.
Referenced by NextAddress().
Ipv4Address ns3::Ipv4AddressGeneratorImpl::GetAddress | ( | const Ipv4Mask | mask | ) | const |
Definition at line 215 of file ipv4-address-generator.cc.
References m_netTable, MaskToIndex(), and NS_LOG_FUNCTION_NOARGS.
Ipv4Address ns3::Ipv4AddressGeneratorImpl::GetNetwork | ( | const Ipv4Mask | mask | ) | const |
Definition at line 170 of file ipv4-address-generator.cc.
References m_netTable, MaskToIndex(), and NS_LOG_FUNCTION_NOARGS.
void ns3::Ipv4AddressGeneratorImpl::Init | ( | const Ipv4Address | net, | |
const Ipv4Mask | mask, | |||
const Ipv4Address | addr | |||
) |
Definition at line 130 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_ASSERT_MSG, NS_LOG_FUNCTION_NOARGS, and ns3::Ipv4AddressGeneratorImpl::NetworkState::shift.
void ns3::Ipv4AddressGeneratorImpl::InitAddress | ( | const Ipv4Address | addr, | |
const Ipv4Mask | mask | |||
) |
Definition at line 199 of file ipv4-address-generator.cc.
References ns3::Ipv4AddressGeneratorImpl::NetworkState::addr, ns3::Ipv4Address::Get(), m_netTable, MaskToIndex(), NS_ASSERT_MSG, and NS_LOG_FUNCTION_NOARGS.
uint32_t ns3::Ipv4AddressGeneratorImpl::MaskToIndex | ( | Ipv4Mask | mask | ) | const [private] |
Definition at line 357 of file ipv4-address-generator.cc.
References ns3::Ipv4Mask::Get(), N_BITS, and NS_ASSERT_MSG.
Referenced by GetAddress(), GetNetwork(), Init(), InitAddress(), NextAddress(), and NextNetwork().
Ipv4Address ns3::Ipv4AddressGeneratorImpl::NextAddress | ( | const Ipv4Mask | mask | ) |
Definition at line 228 of file ipv4-address-generator.cc.
References AddAllocated(), ns3::Ipv4AddressGeneratorImpl::NetworkState::addr, m_netTable, MaskToIndex(), NS_ASSERT_MSG, and NS_LOG_FUNCTION_NOARGS.
Ipv4Address ns3::Ipv4AddressGeneratorImpl::NextNetwork | ( | const Ipv4Mask | mask | ) |
Definition at line 180 of file ipv4-address-generator.cc.
References m_netTable, MaskToIndex(), ns3::Ipv4AddressGeneratorImpl::NetworkState::network, and NS_LOG_FUNCTION_NOARGS.
void ns3::Ipv4AddressGeneratorImpl::Reset | ( | void | ) |
Definition at line 86 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_NOARGS, and ns3::Ipv4AddressGeneratorImpl::NetworkState::shift.
Referenced by Ipv4AddressGeneratorImpl().
void ns3::Ipv4AddressGeneratorImpl::TestMode | ( | void | ) |
Definition at line 350 of file ipv4-address-generator.cc.
References m_test, and NS_LOG_FUNCTION_NOARGS.
std::list<Entry> ns3::Ipv4AddressGeneratorImpl::m_entries [private] |
Definition at line 74 of file ipv4-address-generator.cc.
Referenced by AddAllocated(), and Reset().
Definition at line 65 of file ipv4-address-generator.cc.
Referenced by GetAddress(), GetNetwork(), Init(), InitAddress(), NextAddress(), NextNetwork(), and Reset().
bool ns3::Ipv4AddressGeneratorImpl::m_test [private] |
Definition at line 75 of file ipv4-address-generator.cc.
Referenced by AddAllocated(), Reset(), and TestMode().
const uint32_t ns3::Ipv4AddressGeneratorImpl::MOST_SIGNIFICANT_BIT = 0x80000000 [static, private] |
Definition at line 51 of file ipv4-address-generator.cc.
Referenced by Reset().
const uint32_t ns3::Ipv4AddressGeneratorImpl::N_BITS = 32 [static, private] |
Definition at line 50 of file ipv4-address-generator.cc.
Referenced by MaskToIndex(), and Reset().