ns-allinone-2.35/olsr/OLSR.cc
int
OLSR::node_id(nsaddr_t addr) {
	// Preventing a bad use for this function
        if ((u_int32_t)addr == IP_BROADCAST)
	{
		printf("IP_BROADCAST_ADDR :%d\n",addr);
		return addr;
	}
	// Getting node id
	Node* node = Node::get_node_by_address(addr);
	assert(node != NULL);
	return node->nodeid();
}
///
/// \brief Returns the identifier of a node given the address of the attached OLSR agent.
///
/// \param addr the address of the OLSR routing agent.
/// \return the identifier of the node.
///
\brief Returns the identifier of a node given the address of the attached OLSR agent.
\param addr the address of the OLSR routing agent.
\return the identifier of the node.
\ brief Returns the identifier of a node given the address of the attached OLSR agent . \ param addr the address of the OLSR routing agent . \ return the identifier of the node .
int
OLSR::node_id(nsaddr_t addr) {
        if ((u_int32_t)addr == IP_BROADCAST)
	{
		printf("IP_BROADCAST_ADDR :%d\n",addr);
		return addr;
	}
	Node* node = Node::get_node_by_address(addr);
	assert(node != NULL);
	return node->nodeid();
}
int OLSR :: node_id ( nsaddr_t addr ) { if ( ( u_int32_t ) addr == IP_BROADCAST ) { printf ( " \n " , addr ) ; return addr ; } Node * node = Node :: get_node_by_address ( addr ) ; assert ( node != NULL ) ; return node -> nodeid ( ) ; }
\brief Returns the identifier of a node given the address of the attached OLSR agent.
\ brief Returns the identifier of a node given the address of the attached OLSR agent .
// Preventing a bad use for this function // Getting node id