[Omnetpp-l] How to get the IP address from NetworkConfigurator (INET framework)

90 views
Skip to first unread message

Long Vu

unread,
Sep 6, 2008, 5:48:45 PM9/6/08
to omne...@omnetpp.org, Vu, Long Hai
Hello,

I am using omnetpp with INET framework on my Ubuntu box.

I have 4 mobile nodes and I can make them communicate in ad hoc mode
with each other by broadcasting messages. However, I would like to do
unicast between a pair of nodes. From my application layer, I plan to
obtain the IP address of the node and attach this IP address in the
packet so that the receiver knows who to respond to. However, I don't
know how to obtain the IP address of a node in my simulation. My
simulation uses a NetworkConfigurator module, which automatically
assigns IP addresses to all IP nodes. I have checked and printed out
report when the NetworkConfigurator runs. This NetworkConfigurator
module in my simulation does assign IP addresses to all ad hoc nodes
in my simulation. From example, it prints out:

host[0]=145.236.0.1 has only one (non-loopback) interface, adding default route
host[1]=145.236.0.2 has only one (non-loopback) interface, adding default route

from the method: NetworkConfigurator::assignAddresses(cTopology&
topo, NodeInfoVector& nodeInfo).


Could you please tell me how my application layer can retrieve the IP
address of a node from either the lower layer of this node or the
NetworkConfigurator module? Could you please give me a hint on this ?

Thank you very much for your help. I appreciate.

-Long
_______________________________________________
Omnetpp-l mailing list
Omne...@omnetpp.org
http://lists.omnetpp.org/mailman/listinfo/omnetpp-l

Reply all
Reply to author
Forward
0 new messages