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

[ns] Ping Agent??



Hi,
I'm trying to understand the exemple on how to create a new agent in ns.
There's some things i don't really understand well:

in the following code :
/**************************************************/
/**************************************************/
Agent/Ping instproc recv {from rtt} {
         $self instvar node_
         puts "node [$node_ id] received ping answer from \
               $from with round-trip-time $rtt ms."
 }
/**************************************************/
/**************************************************/
1- What does the "from rtt" variable means? where are they defined?

2- the folowing expression : 
        /******************/
        Packet::free(pkt);
        /******************/
could it be written like this :
/*******************/
pkt.free(pkt);
/*******************/

as pkt is un object from the Packet Class?
If not why

Thank you
-- 
--------------------------------------------------------------------------
        Cordialement
        
Koubaa Anis 
Organization : LORIA Nancy
Equipe : RESEDAS
Adresse : CU Haute Malgrange Vandeoeuvre Nancy Bloc C 528
Mail : [email protected]
Projet : Comparaison des Protocoles de cl�s de distribution de cl� de
groupe en utilisant NS
--------------------------------------------------------------------------