The following is a list of commands to create/manipulate srm agents in simulations:
ns_ attach-agent node srm-agent
This attaches the srm agent instance to the given <node>.
set grp [Node allocaddr] \$srm set dst\_ \$grpThis assigns the srm agent to a multicast group represented by the mcast address <grp>.
Configuration parameters for srm agent may be set as follows:
\$srm set fid\_ \For all possible parameters and their default values please lookup /tcl/mcast/srm.tcl and /tcl/mcast/srm-adaptive.tcl.
\$srm set tg\_ \ .. etc
set exp [new Application/Traffic/Exponential] \$exp attach-agent \$srmThis command attaches a traffic generator (an exponential one in this example), to the srm agent.
$srm start; $exp start
These commands start the srm agent and traffic generator. Note that the srm agent and traffic generator have to be started separately. Alternatively, the traffic generator may be started through the agent as follows:
See /tcl/ex/srm.tcl for a simple example of setting up a SRM agent.