Hello Anuradha,

Anuradha Sehgal wrote:
> Sorry to mail you personally.
> I got your mail id from ns-users list.

Please don't address me personally, always use the mailing list. Other
people might have the same problem as you and will be glad you find any
help available through the mailing list archives.


> Actually i am facing a problem in sendmsg() method in udp.cc.
> I  tried to call this function in tcl file like
>
> $udp sendmsg 0 5 HELLO
>
> It get executed. But when I tried to run this like
>
> $udp sendmsg 1 5 HELLO
>
> It gives error messege "classifier no-slot problem".
>
> Can you please tell me what does it mean, i mean what the secoond
> argument does mean?

Actually, you're not calling the sendmsg() function the way it's supposed
to be. Please open <ns2>/apps/udp.h to check the prototype of the
overloaded member function. (on nsallinone 2.30, it's on line #63.) It's
definition can be found in <ns2>/apps/udp.cc (line #74).

sendmsg(int, AppData*, const char*) requires at least two parameters (the
last one is defaulted to 0): The size of data to be transported, an
application-specific data pointer, and some optional flags, in that order.


> And One thing more, is there any tutorial or document, that can tell
> me in what sequence the functions are called in backend of tcl file.

Tcl commands are always interpreted within the command() function.
Therefore, take a look at UdpAgent::command() in udp.cc.

If you're interested in just sending plain text messages, you should
examine <ns2>/tcl/ex/udpdata.tcl.


--Timo

Reply via email to