[ns] str2addr problem
Nino.Kubinidze
Nino.Kubinidze at ul.ie
Tue Feb 10 03:41:46 PST 2004
Thanks Padma,
In regard to the same question, say if I have a link from a base station
node to a wired node, how to make this BS node recognizable by its id & not
its hierarchical address? And then if I had "id2addr" in the same code
below, instead of "str2addr", would it be correct to use it?
Thanks
Nino
-----Original Message-----
From: Padmaparna Haldar [mailto:haldar at ISI.EDU]
Sent: 09 February 2004 23:54
To: Nino.Kubinidze
Cc: 'ns-users at isi.edu'
Subject: Re: [ns] str2addr problem
The function takes an address in string format (especially relevant for
hierarchical addresses, "1.2.8") and converts them to addresses in field
format. Read chapter on hier addressing in ns-manual for details about bit
allocation per field and other features of hier. addressing.
--Padma
On Mon, 9 Feb
2004, Nino.Kubinidze wrote:
>
> Hello ns-users,
> Does anyone know what does "str2addr" mean in the code below (from ns-2/
> routing / address.cc file) ?
>
> -------------------------------------------------------------------
> int Address: : command (int argc, const char* const* argv)
> {
> int i, c, temp = 0;
>
> * * *
> * * *
> if (argc = = 3) {
> if (strcmp (argv [1], "str2addr") = = 0) {
> tcl.resultf ("%d", str2addr (argv [2]));
> return (TCL_OK);
> }
> -------------------------------------------------------------------
>
> Thanks,
> Nino
>
--
------------------------------------------------
Be true to your work, your word, and your friend.
--Thoreau
Padmaparna Haldar
More information about the Ns-users
mailing list