v -t 1.0 -e node_tclscript node_id button label tcl script
This line when read in a tracefile will add an extra button to node objects that will execute a tcl script when clicked.
For example:
v -t 1.0 -e node_tclscript 2 "Echo Hello" {puts [exec echo hello]}
The above line adds a button to node 2's info window with the label "Echo Hello" and when this button is pressed the shell command "echo hello" will be run and it's output will be returned to nam and then output to the terminal via the tcl procedure puts.
The functions that implement the different nam trace formats described above may be found in the following files: ns/trace.cc, ns/trace.h, ns/tcl/lib/ns-namsupp.tcl.