AODV routing protocol. More...
#include <aodv-routing-protocol.h>
Public Member Functions | |
RoutingProtocol () | |
c-tor | |
virtual void | DoDispose () |
From Ipv4RoutingProtocol | |
Ptr< Ipv4Route > | RouteOutput (Ptr< Packet > p, const Ipv4Header &header, Ptr< NetDevice > oif, Socket::SocketErrno &sockerr) |
Query routing cache for an existing route, for an outbound packet. | |
bool | RouteInput (Ptr< const Packet > p, const Ipv4Header &header, Ptr< const NetDevice > idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) |
virtual void | NotifyInterfaceUp (uint32_t interface) |
virtual void | NotifyInterfaceDown (uint32_t interface) |
virtual void | NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address) |
virtual void | NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address) |
virtual void | SetIpv4 (Ptr< Ipv4 > ipv4) |
Handle protocol parameters | |
bool | GetDesinationOnlyFlag () const |
void | SetDesinationOnlyFlag (bool f) |
bool | GetGratuitousReplyFlag () const |
void | SetGratuitousReplyFlag (bool f) |
void | SetHelloEnable (bool f) |
bool | GetHelloEnable () const |
void | SetBroadcastEnable (bool f) |
bool | GetBroadcastEnable () const |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::aodv::RoutingProtocol. | |
Static Public Attributes | |
static const uint32_t | AODV_PORT |
AODV routing protocol.
virtual void ns3::aodv::RoutingProtocol::DoDispose | ( | ) | [virtual] |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden version of this method and chain up to their parent's implementation once they are done. i.e., for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose method.
It is safe to call GetObject from within this method.
Reimplemented from ns3::Object.
static TypeId ns3::aodv::RoutingProtocol::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::aodv::RoutingProtocol.
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::Ipv4RoutingProtocol.
virtual void ns3::aodv::RoutingProtocol::NotifyAddAddress | ( | uint32_t | interface, | |
Ipv4InterfaceAddress | address | |||
) | [virtual] |
interface | the index of the interface we are being notified about | |
address | a new address being added to an interface |
Protocols are expected to implement this method to be notified whenever a new address is added to an interface. Typically used to add a 'network route' on an interface. Can be invoked on an up or down interface.
Implements ns3::Ipv4RoutingProtocol.
virtual void ns3::aodv::RoutingProtocol::NotifyInterfaceDown | ( | uint32_t | interface | ) | [virtual] |
interface | the index of the interface we are being notified about |
Protocols are expected to implement this method to be notified of the state change of an interface in a node.
Implements ns3::Ipv4RoutingProtocol.
virtual void ns3::aodv::RoutingProtocol::NotifyInterfaceUp | ( | uint32_t | interface | ) | [virtual] |
interface | the index of the interface we are being notified about |
Protocols are expected to implement this method to be notified of the state change of an interface in a node.
Implements ns3::Ipv4RoutingProtocol.
virtual void ns3::aodv::RoutingProtocol::NotifyRemoveAddress | ( | uint32_t | interface, | |
Ipv4InterfaceAddress | address | |||
) | [virtual] |
interface | the index of the interface we are being notified about | |
address | a new address being added to an interface |
Protocols are expected to implement this method to be notified whenever a new address is removed from an interface. Typically used to remove the 'network route' of an interface. Can be invoked on an up or down interface.
Implements ns3::Ipv4RoutingProtocol.
Ptr<Ipv4Route> ns3::aodv::RoutingProtocol::RouteOutput | ( | Ptr< Packet > | p, | |
const Ipv4Header & | header, | |||
Ptr< NetDevice > | oif, | |||
Socket::SocketErrno & | sockerr | |||
) | [virtual] |
Query routing cache for an existing route, for an outbound packet.
This lookup is used by transport protocols. It does not cause any packet to be forwarded, and is synchronous. Can be used for multicast or unicast. The Linux equivalent is ip_route_output()
p | packet to be routed. Note that this method may modify the packet. Callers may also pass in a null pointer. | |
header | input parameter (used to form key to search for the route) | |
oif | Output interface Netdevice. May be zero, or may be bound via socket options to a particular output interface. | |
sockerr | Output parameter; socket errno |
Implements ns3::Ipv4RoutingProtocol.
ipv4 | the ipv4 object this routing protocol is being associated with |
Typically, invoked directly or indirectly from ns3::Ipv4::SetRoutingProtocol
Implements ns3::Ipv4RoutingProtocol.