Ipv4 route cache entry (similar to Linux struct rtable) More...
#include <ipv4-route.h>
Inheritance diagram for ns3::Ipv4Route:
Collaboration diagram for ns3::Ipv4Route:Public Member Functions | |
| Ipv4Route () | |
| Ipv4Address | GetDestination (void) const |
| Ipv4Address | GetGateway (void) const |
| Ptr< NetDevice > | GetOutputDevice (void) const |
| Ipv4Address | GetSource (void) const |
| void | SetDestination (Ipv4Address dest) |
| void | SetGateway (Ipv4Address gw) |
| void | SetOutputDevice (Ptr< NetDevice > outputDevice) |
| Equivalent in Linux to dst_entry.dev. More... | |
| void | SetSource (Ipv4Address src) |
Public Member Functions inherited from ns3::SimpleRefCount< Ipv4Route > | |
| SimpleRefCount () | |
| Constructor. More... | |
| SimpleRefCount (const SimpleRefCount &o) | |
| Copy constructor. More... | |
| uint32_t | GetReferenceCount (void) const |
| Get the reference count of the object. More... | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| Assignment. More... | |
| void | Ref (void) const |
| Increment the reference count. More... | |
| void | Unref (void) const |
| Decrement the reference count. More... | |
Private Attributes | |
| Ipv4Address | m_dest |
| Destination address. More... | |
| Ipv4Address | m_gateway |
| Gateway address. More... | |
| Ptr< NetDevice > | m_outputDevice |
| Output device. More... | |
| Ipv4Address | m_source |
| Source address. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from ns3::SimpleRefCount< Ipv4Route > | |
| static void | Cleanup (void) |
| Noop. More... | |
Ipv4 route cache entry (similar to Linux struct rtable)
This is a reference counted object. In the future, we will add other entries from struct dst_entry, struct rtable, and struct dst_ops as needed.
Definition at line 41 of file ipv4-route.h.
| ns3::Ipv4Route::Ipv4Route | ( | ) |
Definition at line 29 of file ipv4-route.cc.
References NS_LOG_FUNCTION.
| Ipv4Address ns3::Ipv4Route::GetDestination | ( | void | ) | const |
Definition at line 42 of file ipv4-route.cc.
References m_dest, and NS_LOG_FUNCTION.
Referenced by ns3::dsdv::RoutingTableEntry::GetDestination(), ns3::aodv::RoutingTableEntry::GetDestination(), ns3::dsdv::RoutingProtocol::LookForQueuedPackets(), ns3::operator<<(), ns3::aodv::RoutingTableEntry::operator==(), ns3::dsdv::RoutingTableEntry::operator==(), ns3::aodv::RoutingTableEntry::Print(), ns3::dsdv::RoutingTableEntry::Print(), ns3::aodv::RoutingProtocol::RouteOutput(), and ns3::dsdv::RoutingProtocol::RouteOutput().
Here is the caller graph for this function:| Ipv4Address ns3::Ipv4Route::GetGateway | ( | void | ) | const |
Definition at line 70 of file ipv4-route.cc.
References m_gateway, and NS_LOG_FUNCTION.
Referenced by ns3::aodv::RoutingProtocol::Forwarding(), ns3::dsdv::RoutingTableEntry::GetNextHop(), ns3::aodv::RoutingTableEntry::GetNextHop(), ns3::Ipv4StaticRouting::LookupStatic(), ns3::operator<<(), ns3::aodv::RoutingTableEntry::Print(), ns3::dsdv::RoutingTableEntry::Print(), ns3::AnimationInterface::RecursiveIpv4RoutePathSearch(), ns3::aodv::RoutingProtocol::RouteOutput(), ns3::Ipv4L3Protocol::Send(), ns3::Ipv4L3Protocol::SendRealOut(), and ns3::AnimationInterface::TrackIpv4RoutePaths().
Here is the caller graph for this function:Definition at line 84 of file ipv4-route.cc.
References m_outputDevice, and NS_LOG_FUNCTION.
Referenced by ns3::UdpSocketImpl::DoSendTo(), ns3::dsdv::RoutingTableEntry::GetOutputDevice(), ns3::aodv::RoutingTableEntry::GetOutputDevice(), ns3::aodv::RoutingProtocol::RouteOutput(), ns3::dsdv::RoutingProtocol::RouteOutput(), ns3::Ipv4NixVectorRouting::RouteOutput(), ns3::dsdv::RoutingProtocol::SendPacketFromQueue(), ns3::aodv::RoutingProtocol::SendPacketFromQueue(), and ns3::Ipv4L3Protocol::SendRealOut().
Here is the caller graph for this function:| Ipv4Address ns3::Ipv4Route::GetSource | ( | void | ) | const |
Definition at line 56 of file ipv4-route.cc.
References m_source, and NS_LOG_FUNCTION.
Referenced by ns3::UdpSocketImpl::DoSendTo(), ns3::aodv::RoutingProtocol::Forwarding(), ns3::dsdv::RoutingProtocol::LookForQueuedPackets(), ns3::dsdv::RoutingProtocol::LoopbackRoute(), ns3::aodv::RoutingProtocol::LoopbackRoute(), ns3::operator<<(), ns3::aodv::RoutingProtocol::RouteOutput(), ns3::dsdv::RoutingProtocol::RouteOutput(), ns3::dsdv::RoutingProtocol::Send(), ns3::Icmpv4L4Protocol::SendMessage(), ns3::dsdv::RoutingProtocol::SendPacketFromQueue(), ns3::aodv::RoutingProtocol::SendPacketFromQueue(), ns3::Ipv4RawSocketImpl::SendTo(), and ns3::TcpSocketBase::SetupEndpoint().
Here is the caller graph for this function:| void ns3::Ipv4Route::SetDestination | ( | Ipv4Address | dest | ) |
| dest | Destination Ipv4Address |
Definition at line 35 of file ipv4-route.cc.
References m_dest, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv4L3Protocol::IpMulticastForward(), ns3::Ipv4GlobalRouting::LookupGlobal(), ns3::Ipv4StaticRouting::LookupStatic(), ns3::dsdv::RoutingProtocol::LoopbackRoute(), ns3::aodv::RoutingProtocol::LoopbackRoute(), ns3::Ipv4NixVectorRouting::RouteInput(), ns3::olsr::RoutingProtocol::RouteInput(), ns3::Ipv4NixVectorRouting::RouteOutput(), ns3::dsdv::RoutingTableEntry::RoutingTableEntry(), ns3::aodv::RoutingTableEntry::RoutingTableEntry(), ns3::dsr::DsrOptions::SetRoute(), and ns3::dsr::DsrRouting::SetRoute().
Here is the caller graph for this function:| void ns3::Ipv4Route::SetGateway | ( | Ipv4Address | gw | ) |
| gw | Gateway (next hop) Ipv4Address |
Definition at line 63 of file ipv4-route.cc.
References m_gateway, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv4L3Protocol::IpMulticastForward(), ns3::Ipv4GlobalRouting::LookupGlobal(), ns3::Ipv4StaticRouting::LookupStatic(), ns3::dsdv::RoutingProtocol::LoopbackRoute(), ns3::aodv::RoutingProtocol::LoopbackRoute(), ns3::Ipv4NixVectorRouting::RouteInput(), ns3::olsr::RoutingProtocol::RouteInput(), ns3::Ipv4NixVectorRouting::RouteOutput(), ns3::dsdv::RoutingTableEntry::RoutingTableEntry(), ns3::aodv::RoutingTableEntry::RoutingTableEntry(), ns3::dsdv::RoutingTableEntry::SetNextHop(), ns3::aodv::RoutingTableEntry::SetNextHop(), ns3::dsr::DsrOptions::SetRoute(), and ns3::dsr::DsrRouting::SetRoute().
Here is the caller graph for this function:Equivalent in Linux to dst_entry.dev.
| outputDevice | pointer to NetDevice for outgoing packets |
Definition at line 77 of file ipv4-route.cc.
References m_outputDevice, and NS_LOG_FUNCTION.
Referenced by ns3::dsr::DsrRouting::CheckSendBuffer(), ns3::dsr::DsrRouting::ForwardErrPacket(), ns3::Ipv4L3Protocol::IpMulticastForward(), ns3::Ipv4GlobalRouting::LookupGlobal(), ns3::Ipv4StaticRouting::LookupStatic(), ns3::dsdv::RoutingProtocol::LoopbackRoute(), ns3::aodv::RoutingProtocol::LoopbackRoute(), ns3::Ipv4NixVectorRouting::RouteInput(), ns3::olsr::RoutingProtocol::RouteInput(), ns3::Ipv4NixVectorRouting::RouteOutput(), ns3::dsdv::RoutingTableEntry::RoutingTableEntry(), ns3::aodv::RoutingTableEntry::RoutingTableEntry(), ns3::dsr::DsrRouting::SalvagePacket(), ns3::dsr::DsrRouting::SendAck(), ns3::dsr::DsrRouting::SendPacket(), ns3::dsr::DsrRouting::SendPacketFromBuffer(), ns3::dsr::DsrRouting::SendReply(), ns3::dsr::DsrRouting::SendUnreachError(), ns3::dsdv::RoutingTableEntry::SetOutputDevice(), and ns3::aodv::RoutingTableEntry::SetOutputDevice().
Here is the caller graph for this function:| void ns3::Ipv4Route::SetSource | ( | Ipv4Address | src | ) |
| src | Source Ipv4Address |
Definition at line 49 of file ipv4-route.cc.
References m_source, and NS_LOG_FUNCTION.
Referenced by ns3::Ipv4L3Protocol::IpMulticastForward(), ns3::Ipv4GlobalRouting::LookupGlobal(), ns3::Ipv4StaticRouting::LookupStatic(), ns3::dsdv::RoutingProtocol::LoopbackRoute(), ns3::aodv::RoutingProtocol::LoopbackRoute(), ns3::Ipv4NixVectorRouting::RouteInput(), ns3::olsr::RoutingProtocol::RouteInput(), ns3::Ipv4NixVectorRouting::RouteOutput(), ns3::dsdv::RoutingTableEntry::RoutingTableEntry(), ns3::aodv::RoutingTableEntry::RoutingTableEntry(), ns3::dsr::DsrOptions::SetRoute(), and ns3::dsr::DsrRouting::SetRoute().
Here is the caller graph for this function:
|
private |
Destination address.
Definition at line 91 of file ipv4-route.h.
Referenced by GetDestination(), and SetDestination().
|
private |
Gateway address.
Definition at line 93 of file ipv4-route.h.
Referenced by GetGateway(), and SetGateway().
Output device.
Definition at line 94 of file ipv4-route.h.
Referenced by GetOutputDevice(), and SetOutputDevice().
|
private |
Source address.
Definition at line 92 of file ipv4-route.h.
Referenced by GetSource(), and SetSource().