[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ns-users] Agent Modification (seqno dump)
I'm just starting some protocol development in ns and would just like a kick in
the right direction with something.
I've got a "ping" agent up and running and have added packet sequence numbers
with:
int seqno_;
int& seqno() { return (seqno_); }
in the packet header (hdr_ping) spec. I also have "int seqno_;" in the
protected part of my PingAgent class spec.
However, I'd like to dump out sequence numbers as pings are received in my tcl
scenario script. I was using the example:
-----------
Agent/Ping instproc recv {from rtt} {
$self instvar node_
puts "node [$node_ id] received ping ack from $from with round-trip-time
$rtt ms."
}
-----------
and would really like to know how to add a 'seqno_' dump in there. I've tried
several different approaches but to no avail. ns doesn't seem to recognise the
variable. This is obviously something I'm doing wrong, but a push in the right
direction would be greatly appreciated.
rik wade
--
ATM-Multimedia Group | tel: +44(0)113 2336589
School of Computer Studies | fax: +44(0)113 2335468
University of Leeds | web: http://www.scs.leeds.ac.uk/atm-mm
Leeds, LS2 9JT, UK | WYLUG: http://www.scs.leeds.ac.uk/wylug