ns-allinone-2.35/olsr/OLSR.cc
void
OLSR::add_link_tuple(OLSR_link_tuple* tuple, u_int8_t  willingness) {
	double now = CURRENT_TIME;

	debug("%f: Node %d adds link tuple: nb_addr = %d\n",
		now,
		OLSR::node_id(ra_addr()),
		OLSR::node_id(tuple->nb_iface_addr()));

	state_.insert_link_tuple(tuple);
	// Creates associated neighbor tuple
	OLSR_nb_tuple* nb_tuple		= new OLSR_nb_tuple;
	nb_tuple->nb_main_addr()	= get_main_addr(tuple->nb_iface_addr());
	nb_tuple->willingness()		= willingness;
	if (tuple->sym_time() >= now)
		nb_tuple->status() = OLSR_STATUS_SYM;
	else
		nb_tuple->status() = OLSR_STATUS_NOT_SYM;
	add_nb_tuple(nb_tuple);
}
///
/// \brief Adds a link tuple to the Link Set (and an associated neighbor tuple to the Neighbor Set).
///
/// \param tuple the link tuple to be added.
/// \param willingness willingness of the node which is going to be inserted in the Neighbor Set.
///
\brief Adds a link tuple to the Link Set (and an associated neighbor tuple to the Neighbor Set).
\param tuple the link tuple to be added.
\param willingness willingness of the node which is going to be inserted in the Neighbor Set.
\ brief Adds a link tuple to the Link Set ( and an associated neighbor tuple to the Neighbor Set ) . \ param tuple the link tuple to be added . \ param willingness willingness of the node which is going to be inserted in the Neighbor Set .
void
OLSR::add_link_tuple(OLSR_link_tuple* tuple, u_int8_t  willingness) {
	double now = CURRENT_TIME;
	debug("%f: Node %d adds link tuple: nb_addr = %d\n",
		now,
		OLSR::node_id(ra_addr()),
		OLSR::node_id(tuple->nb_iface_addr()));
	state_.insert_link_tuple(tuple);
	OLSR_nb_tuple* nb_tuple		= new OLSR_nb_tuple;
	nb_tuple->nb_main_addr()	= get_main_addr(tuple->nb_iface_addr());
	nb_tuple->willingness()		= willingness;
	if (tuple->sym_time() >= now)
		nb_tuple->status() = OLSR_STATUS_SYM;
	else
		nb_tuple->status() = OLSR_STATUS_NOT_SYM;
	add_nb_tuple(nb_tuple);
}
void OLSR :: add_link_tuple ( OLSR_link_tuple * tuple , u_int8_t willingness ) { double now = CURRENT_TIME ; debug ( " \n " , now , OLSR :: node_id ( ra_addr ( ) ) , OLSR :: node_id ( tuple -> nb_iface_addr ( ) ) ) ; state_ . insert_link_tuple ( tuple ) ; OLSR_nb_tuple * nb_tuple = new OLSR_nb_tuple ; nb_tuple -> nb_main_addr ( ) = get_main_addr ( tuple -> nb_iface_addr ( ) ) ; nb_tuple -> willingness ( ) = willingness ; if ( tuple -> sym_time ( ) >= now ) nb_tuple -> status ( ) = OLSR_STATUS_SYM ; else nb_tuple -> status ( ) = OLSR_STATUS_NOT_SYM ; add_nb_tuple ( nb_tuple ) ; }
\brief Adds a link tuple to the Link Set (and an associated neighbor tuple to the Neighbor Set).
\ brief Adds a link tuple to the Link Set ( and an associated neighbor tuple to the Neighbor Set ) .
// Creates associated neighbor tuple