Tunnel class - its goal is to create and manage the tunnels between endpoints. More...
 Collaboration diagram for Tunnel:
 Collaboration diagram for Tunnel:| Public Member Functions | |
| Tunnel (Ptr< Node > n3, Ptr< Node > n0, Ptr< Node > n1, Ipv4Address n3Addr, Ipv4Address n0Addr, Ipv4Address n1Addr) | |
| Constructor. | |
| Private Member Functions | |
| void | N0SocketRecv (Ptr< Socket > socket) | 
| Receive a packet on the N0 VirtualNetDevice. | |
| bool | N0VirtualSend (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) | 
| Send a packet through the N0 VirtualNetDevice. | |
| void | N1SocketRecv (Ptr< Socket > socket) | 
| Receive a packet on the N1 VirtualNetDevice. | |
| bool | N1VirtualSend (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) | 
| Send a packet through the N1 VirtualNetDevice. | |
| void | N3SocketRecv (Ptr< Socket > socket) | 
| Receive a packet on the N3 VirtualNetDevice. | |
| bool | N3VirtualSend (Ptr< Packet > packet, const Address &source, const Address &dest, uint16_t protocolNumber) | 
| Send a packet through the N3 VirtualNetDevice. | |
| Private Attributes | |
| Ipv4Address | m_n0Address | 
| Address of the N0 node. | |
| Ptr< Socket > | m_n0Socket | 
| Socket on the N0 node. | |
| Ptr< VirtualNetDevice > | m_n0Tap | 
| VirtualNetDevice on the N0 node. | |
| Ipv4Address | m_n1Address | 
| Address of the N1 node. | |
| Ptr< Socket > | m_n1Socket | 
| Socket on the N1 node. | |
| Ptr< VirtualNetDevice > | m_n1Tap | 
| VirtualNetDevice on the N1 node. | |
| Ipv4Address | m_n3Address | 
| Address of the N3 node. | |
| Ptr< Socket > | m_n3Socket | 
| Socket on the N3 node. | |
| Ptr< VirtualNetDevice > | m_n3Tap | 
| VirtualNetDevice on the N3 node. | |
| Ptr< UniformRandomVariable > | m_rng | 
| Random number generator. | |
Tunnel class - its goal is to create and manage the tunnels between endpoints.
Definition at line 54 of file virtual-net-device-example.cc.
| 
 | inline | 
Constructor.
| n3 | Pointer of Node 3 | 
| n0 | Pointer of Node 0 | 
| n1 | Pointer of Node 1 | 
| n3Addr | IPv4 address of Node 3 | 
| n0Addr | IPv4 address of Node 0 | 
| n1Addr | IPv4 address of Node 1 | 
Definition at line 184 of file virtual-net-device-example.cc.
References ns3::Socket::Bind(), ns3::CreateObject(), ns3::Socket::CreateSocket(), ns3::Ipv4Address::GetAny(), ns3::TypeId::LookupByName(), m_n0Socket, m_n0Tap, m_n1Socket, m_n1Tap, m_n3Socket, m_n3Tap, m_rng, ns3::MakeCallback(), N0SocketRecv(), N0VirtualSend(), N1SocketRecv(), N1VirtualSend(), N3SocketRecv(), N3VirtualSend(), and ns3::Socket::SetRecvCallback().
 Here is the call graph for this function:
 Here is the call graph for this function:Receive a packet on the N0 VirtualNetDevice.
| socket | Receiving socket | 
Definition at line 148 of file virtual-net-device-example.cc.
References m_n0Tap, NS_LOG_DEBUG, and ns3::NetDevice::PACKET_HOST.
Referenced by Tunnel().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inlineprivate | 
Send a packet through the N0 VirtualNetDevice.
| packet | Packet to send | 
| source | Source IPv4 address | 
| dest | Destination IPv4 address | 
| protocolNumber | Protocol number | 
Definition at line 75 of file virtual-net-device-example.cc.
References m_n0Socket, m_n3Address, NS_LOG_DEBUG, and ns3::Socket::SendTo().
Referenced by Tunnel().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:Receive a packet on the N1 VirtualNetDevice.
| socket | Receiving socket | 
Definition at line 163 of file virtual-net-device-example.cc.
References m_n1Tap, NS_LOG_DEBUG, and ns3::NetDevice::PACKET_HOST.
Referenced by Tunnel().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inlineprivate | 
Send a packet through the N1 VirtualNetDevice.
| packet | Packet to send | 
| source | Source IPv4 address | 
| dest | Destination IPv4 address | 
| protocolNumber | Protocol number | 
Definition at line 93 of file virtual-net-device-example.cc.
References m_n1Socket, m_n3Address, NS_LOG_DEBUG, and ns3::Socket::SendTo().
Referenced by Tunnel().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:Receive a packet on the N3 VirtualNetDevice.
| socket | Receiving socket | 
Definition at line 133 of file virtual-net-device-example.cc.
References m_n3Tap, NS_LOG_DEBUG, and ns3::NetDevice::PACKET_HOST.
Referenced by Tunnel().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inlineprivate | 
Send a packet through the N3 VirtualNetDevice.
| packet | Packet to send | 
| source | Source IPv4 address | 
| dest | Destination IPv4 address | 
| protocolNumber | Protocol number | 
Definition at line 111 of file virtual-net-device-example.cc.
References m_n0Address, m_n1Address, m_n3Socket, m_rng, NS_LOG_DEBUG, and ns3::Socket::SendTo().
Referenced by Tunnel().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Address of the N0 node.
Definition at line 60 of file virtual-net-device-example.cc.
Referenced by N3VirtualSend().
Socket on the N0 node.
Definition at line 57 of file virtual-net-device-example.cc.
Referenced by Tunnel(), and N0VirtualSend().
| 
 | private | 
VirtualNetDevice on the N0 node.
Definition at line 63 of file virtual-net-device-example.cc.
Referenced by Tunnel(), and N0SocketRecv().
| 
 | private | 
Address of the N1 node.
Definition at line 61 of file virtual-net-device-example.cc.
Referenced by N3VirtualSend().
Socket on the N1 node.
Definition at line 58 of file virtual-net-device-example.cc.
Referenced by Tunnel(), and N1VirtualSend().
| 
 | private | 
VirtualNetDevice on the N1 node.
Definition at line 64 of file virtual-net-device-example.cc.
Referenced by Tunnel(), and N1SocketRecv().
| 
 | private | 
Address of the N3 node.
Definition at line 59 of file virtual-net-device-example.cc.
Referenced by N0VirtualSend(), and N1VirtualSend().
Socket on the N3 node.
Definition at line 56 of file virtual-net-device-example.cc.
Referenced by Tunnel(), and N3VirtualSend().
| 
 | private | 
VirtualNetDevice on the N3 node.
Definition at line 65 of file virtual-net-device-example.cc.
Referenced by Tunnel(), and N3SocketRecv().
| 
 | private | 
Random number generator.
Definition at line 62 of file virtual-net-device-example.cc.
Referenced by Tunnel(), and N3VirtualSend().