neighbor Cache example class. More...
Collaboration diagram for NeighborCacheExample:Public Member Functions | |
| NeighborCacheExample () | |
| void | CommandSetup (int argc, char **argv) |
| description the command-line parameters. | |
| void | Run () |
| Run the example. | |
Private Member Functions | |
| void | ReceivePacket (Ptr< const Packet > pkt, const Address &from, const Address &dst, const SeqTsSizeHeader &header) |
| Print the information of receive data. | |
Private Attributes | |
| bool | m_enableLog {false} |
| Enable ArpL3Protocol and Icmpv6L4Protocol logging. | |
| bool | m_noGenerate {false} |
| do not generate neighbor cache automatically | |
| bool | m_sendTraffic {false} |
| send data stream from n0 to n1 | |
| bool | m_useChannel {false} |
| Generate neighbor cache for specific Channel. | |
| bool | m_useInterfaceContainer |
| Generate neighbor cache for specific interfaceContainer. | |
| bool | m_useIpv6 {false} |
| Use IPv6 instead of IPv4. | |
| bool | m_useNetDeviceContainer |
| Generate neighbor cache for specific netDeviceContainer. | |
neighbor Cache example class.
It handles the creation and run of an example.
Definition at line 296 of file neighbor-cache-example.cc.
| NeighborCacheExample::NeighborCacheExample | ( | ) |
Definition at line 337 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 352 of file neighbor-cache-example.cc.
References 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 343 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 380 of file neighbor-cache-example.cc.
References ns3::NodeContainer::Add(), ns3::NodeContainer::Create(), ns3::AsciiTraceHelper::CreateFileStream(), ns3::Simulator::Destroy(), 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::Ipv4Address::GetAny(), ns3::Ipv6Address::GetAny(), ns3::CsmaHelper::Install(), 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, ns3::Ipv4RoutingHelper::PrintNeighborCacheAllAt(), ns3::Ipv6RoutingHelper::PrintNeighborCacheAllAt(), ReceivePacket(), ns3::Simulator::Run(), ns3::Seconds(), ns3::CsmaHelper::SetChannelAttribute(), ns3::Ipv6InterfaceContainer::SetDefaultRouteInAllNodes(), ns3::Ipv6InterfaceContainer::SetForwarding(), sink, ns3::ApplicationContainer::Start(), ns3::Simulator::Stop(), and ns3::ObjectBase::TraceConnectWithoutContext().
Here is the call graph for this function:
|
private |
Enable ArpL3Protocol and Icmpv6L4Protocol logging.
Definition at line 327 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
do not generate neighbor cache automatically
Definition at line 333 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
send data stream from n0 to n1
Definition at line 334 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
Generate neighbor cache for specific Channel.
Definition at line 328 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
Generate neighbor cache for specific interfaceContainer.
Definition at line 331 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
Use IPv6 instead of IPv4.
Definition at line 326 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().
|
private |
Generate neighbor cache for specific netDeviceContainer.
Definition at line 329 of file neighbor-cache-example.cc.
Referenced by CommandSetup(), and Run().