Neigbor Cache example class. More...
Collaboration diagram for NeighborCacheExample:Public Member Functions | |
| NeighborCacheExample () | |
| void | CommandSetup (int argc, char **argv) |
| description the command-line parameters. More... | |
| void | Run () |
| Run the example. More... | |
Private Member Functions | |
| void | ReceivePacket (Ptr< const Packet > pkt, const Address &from, const Address &dst, const SeqTsSizeHeader &header) |
| Print the information of receive data. More... | |
Private Attributes | |
| bool | m_enableLog {false} |
| Enable ArpL3Protocol and Icmpv6L4Protocol logging. More... | |
| bool | m_noGenerate {false} |
| do not generate neighbor cache automatically More... | |
| bool | m_sendTraffic {false} |
| send data stream from n0 to n1 More... | |
| bool | m_useChannel {false} |
| Generate neighbor cache for specific Channel. More... | |
| bool | m_useInterfaceContainer |
| Generate neighbor cache for specific interfaceContainer. More... | |
| bool | m_useIpv6 {false} |
| Use IPv6 instead of IPv4. More... | |
| bool | m_useNetDeviceContainer |
| Generate neighbor cache for specific netDeviceContainer. More... | |
Neigbor Cache example class.
It handles the creation and run of an example.
Definition at line 297 of file neighbor-cache-example.cc.
| NeighborCacheExample::NeighborCacheExample | ( | ) |
Definition at line 338 of file neighbor-cache-example.cc.
References NS_LOG_FUNCTION.
| void NeighborCacheExample::CommandSetup | ( | int | argc, |
| char ** | argv | ||
| ) |
description the command-line parameters.
| argc | The argument count. |
| argv | The argument vector. |
Definition at line 353 of file neighbor-cache-example.cc.
References second::cmd, m_enableLog, m_noGenerate, m_sendTraffic, m_useChannel, m_useInterfaceContainer, m_useIpv6, and m_useNetDeviceContainer.
|
private |
Print the information of receive data.
| pkt | The received packet. |
| from | The sender. |
| dst | The receiver. |
| header | The header with a sequence, a timestamp, and a "size" attribute |
Definition at line 344 of file neighbor-cache-example.cc.
Referenced by Run().
Here is the caller graph for this function:| void NeighborCacheExample::Run | ( | ) |
Run the example.
Definition at line 381 of file neighbor-cache-example.cc.
References ns3::NodeContainer::Add(), first::address, ns3::NodeContainer::Create(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::AsciiTraceHelperForDevice::EnableAsciiAll(), ns3::PcapHelperForDevice::EnablePcapAll(), ns3::Ipv4InterfaceContainer::Get(), ns3::Ipv6InterfaceContainer::Get(), ns3::ApplicationContainer::Get(), ns3::NetDeviceContainer::Get(), ns3::NodeContainer::Get(), ns3::Ipv6InterfaceContainer::GetAddress(), ns3::Ipv4InterfaceContainer::GetAddress(), ns3::OnOffHelper::Install(), ns3::CsmaHelper::Install(), first::interfaces, ns3::LOG_LEVEL_LOGIC, ns3::LogComponentEnable(), m_enableLog, m_noGenerate, m_sendTraffic, m_useChannel, m_useInterfaceContainer, m_useIpv6, m_useNetDeviceContainer, ns3::MakeCallback(), ns3::MicroSeconds(), ns3::NeighborCacheHelper::PopulateNeighborCache(), port, ReceivePacket(), ns3::Seconds(), ns3::OnOffHelper::SetAttribute(), ns3::CsmaHelper::SetChannelAttribute(), ns3::OnOffHelper::SetConstantRate(), ns3::Ipv6InterfaceContainer::SetDefaultRouteInAllNodes(), ns3::Ipv6InterfaceContainer::SetForwarding(), sink, first::stack, ns3::ApplicationContainer::Start(), and ns3::ObjectBase::TraceConnectWithoutContext().
Here is the call graph for this function:
|
private |
Enable ArpL3Protocol and Icmpv6L4Protocol logging.
Definition at line 328 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
do not generate neighbor cache automatically
Definition at line 334 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
send data stream from n0 to n1
Definition at line 335 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
Generate neighbor cache for specific Channel.
Definition at line 329 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
Generate neighbor cache for specific interfaceContainer.
Definition at line 332 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
Use IPv6 instead of IPv4.
Definition at line 327 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
Generate neighbor cache for specific netDeviceContainer.
Definition at line 330 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().