In DES, how can I find the IP address of a node, given its name?
In DES, how can I find the IP address of a node, given its name?
You can achieve this by a combination of function calls. First you need to get the node objid from the name. You can do this by using the function ip_support_node_id_from_name_get (). This takes in a node name and a subnet objid. If you have the full hierarchical node name (including the subnets), you do not need to give a valid subnet id. Else you need to give one. The prototype is defined in models/std/ip/ip_support.h.Once you get the node objid, you can call the function ip_support_address_from_node_id_get () to get an address of the node. If the node has a loopback interface, then its address is returned. Otherwise, the address of the first physical interface is returned.
DES Kernel->Process Modeling/Coding