ns-allinone-2.35/olsr/OLSR_rtable.cc
OLSR_rt_entry*
OLSR_rtable::find_send_entry(OLSR_rt_entry* entry) {
	OLSR_rt_entry* e = entry;
	while (e != NULL && e->dest_addr() != e->next_addr())
		e = lookup(e->next_addr());
	return e;
}
///
/// \brief	Finds the appropiate entry which must be used in order to forward
///		a data packet to a next hop (given a destination).
///
/// Imagine a routing table like this: [A,B] [B,C] [C,C]; being each pair of the
/// form [dest addr,next-hop addr]. In this case, if this function is invoked with
/// [A,B] then pair [C,C] is returned because C is the next hop that must be used
/// to forward a data packet destined to A. That is, C is a neighbor of this node,
/// but B isn't. This function finds the appropiate neighbor for forwarding a packet.
///
/// \param entry	the routing table entry which indicates the destination node
///			we are interested in.
/// \return		the appropiate routing table entry which indicates the next
///			hop which must be used for forwarding a data packet, or NULL
///			if there is no such entry.
///
\brief Finds the appropiate entry which must be used in order to forward
a data packet to a next hop (given a destination).

Imagine a routing table like this: [A,B] [B,C] [C,C]; being each pair of the
form [dest addr,next-hop addr]. In this case, if this function is invoked with
[A,B] then pair [C,C] is returned because C is the next hop that must be used
to forward a data packet destined to A. That is, C is a neighbor of this node,
but B isn't. This function finds the appropiate neighbor for forwarding a packet.

\param entry   the routing table entry which indicates the destination node
we are interested in.
\return                the appropiate routing table entry which indicates the next
hop which must be used for forwarding a data packet, or NULL
if there is no such entry.
\ brief Finds the appropiate entry which must be used in order to forward a data packet to a next hop ( given a destination ) . Imagine a routing table like this : [ A B ] [ B C ] [ C C ] ; being each pair of the form [ dest addr next - hop addr ] . In this case if this function is invoked with [ A B ] then pair [ C C ] is returned because C is the next hop that must be used to forward a data packet destined to A . That is C is a neighbor of this node but B isn ' t . This function finds the appropiate neighbor for forwarding a packet . \ param entry the routing table entry which indicates the destination node we are interested in . \ return the appropiate routing table entry which indicates the next hop which must be used for forwarding a data packet or NULL if there is no such entry .
OLSR_rt_entry*
OLSR_rtable::find_send_entry(OLSR_rt_entry* entry) {
	OLSR_rt_entry* e = entry;
	while (e != NULL && e->dest_addr() != e->next_addr())
		e = lookup(e->next_addr());
	return e;
}
OLSR_rt_entry * OLSR_rtable :: find_send_entry ( OLSR_rt_entry * entry ) { OLSR_rt_entry * e = entry ; while ( e != NULL && e -> dest_addr ( ) != e -> next_addr ( ) ) e = lookup ( e -> next_addr ( ) ) ; return e ; }
\brief Finds the appropiate entry which must be used in order to forward
a data packet to a next hop (given a destination).
\ brief Finds the appropiate entry which must be used in order to forward a data packet to a next hop ( given a destination ) .