I use MiXim 1.1 and OMNeT++ 4.0. I have a question concerning NicID and
HostID in MiXim. In omnetpp.ini I set the position of every node. If the
network consists of 5 nodes the nodes are numbered from 0-4, in the
following node number.
I found out that the hostID is the node number plus 4. The calculation
of the nicID is irreproducible for me.
Can someone of the gurus please describe how and in what class and
function of MiXim the hostID and nicID are calculated?
Is it possible for the user to set nicID and hostID in the omnetpp.ini?
Any suggestions?
Thanks in advance,
Ralf
nicid and hostid are both OMNeT++ module ids. In OMNeT++ each module has a
unique id. There is no deterministic / reproducible way these IDs are
assigned.
What you refer to as HostID, is most likely the INDEX of the array of hosts.
This is what we use to number hosts in the GUI. However, hostINDEX is not the
same as hostID!!!
Daniel
--
-----------------------------------------
o Dipl.-Ing. Daniel Willkomm
o TU-Berlin
o Telecommunication Networks Group
o http://www.tkn.tu-berlin.de/~willkomm/
o Mail: will...@tkn.tu-berlin.de
thanks for your fast answer.
Is it possible for me to map node number and hostID or NicID before
compiling the program? I found out that HostID is node number plus 4.
Is this true for every scenario?
Thanks,
Ralf
> o Mail: willk...@tkn.tu-berlin.de
in mixim, each host has an ARP module. BaseMacLayer and BaseNetwLayer
ask this ARP module at initialization time, what is their {MAC,NET}
address.
The BaseArp module returns as address the omnet++ module ID, because it
is (1) simple and (2) simulation-wide unique (each omnet module instance
has a unique ID during the simulation run).
It is possible to derive BaseArp and overload the methods called by
BaseMacLayer and BaseNetwLayer to provide your own address definition
scheme. You can find a HostArp module in the "uwb" branch of the mixim
sourceforge git repository that does just that, and returns the host
index for both the MAC and NET addresses. The module assumes that the
hosts are declared as an array of modules.
Regards,
Jérôme
> > o Mail: willk...@tkn.tu-berlin.de