[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Callback function instead of trace-file?



Hi everybody,

I'm using ns-2b18 and need a possibility to see what happens to certain
packets inside the network. I thus need to monitor the links. However, my
simulation has a large number of links and my logfiles become soon very
large (ca 10MB/min) if I log everything. In order to run simulations
overnight, I don't want all traces to be written to disk. Rather, I'm
looking for some possibility to register a callback-function that is called
whenever a packet is enqueued, dequeued or lost on a link. If I remember
right, this functionality was implemented in ns-1.4, but I can't find it in
ns-2.
If nothing else helps, I could open a named pipe with Tcl, have ns write
everything to the pipe and read & parse everything that arrives on the
other end. But that would pretty much be a hack. Moreover, I would need
multithreading support (for running ns and the evaluation of the traces
simultaneously).

     Any suggestions?

       TX,

         -Chris.