20.6 Commands at a glance

Following is a list of commands used for diffusion ping application. Similar APIs can be used for extending to other diffusion applications.

$ns_ node-config -adhocRouting $opt(adhocRouting) 
	         -llType $opt(ll)
	         ...
where,
value of opt(adhocRouting) is set to Directed_Diffusion
This command is used to enable directed diffusion in wireless nodes.

set src [new Application/DiffApp/PingSender]
This command is used to create ping-sender application.

set snk [new Application/DiffApp/PingReceiver]
This command is used to create ping-receiver application.

$ns_ attach-diffapp $node_ $src_
where the diffusion application $src_ gets attached to the given $node_.

$src_(0) publish
Command to start a ping source (sender).

$snk_(0) subscribe
Command to start a ping sink (receiver).



Paul Kroon 2008-03-16