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

Re: [ns] sending a new packet type



did you connect the two agents ?
use "$ns connect $agent1 $agent2"

-Srinivasan

On Thu, 9 Mar 2000, Lori Flynn wrote:

> Hi Tarik,
> 
> My new agent (exactly like the Ping Agent from the example) has a recv
> function.  For debugging purposes, I have a 'puts' statement to check to
> see if the recv function for the new agent is ever called, but it isn't
> ever called.  (Although a new packet with the new header type is
> definitely created and sent, with the 'hdrip->dst()' set as below.)
> 
> Do I need a different kind of a receiver?
> 
> Thanks, 
> Lori
> 
> On Thu, 9 Mar 2000, Tarik Alj wrote:
> 
> > I think you need to have a receiver agent. If the receiving node doen't know to 
> > wich agent it must give the packet; packets are typically going to accumulate 
> > until core dump.
> > 
> > > X-Authentication-Warning: kavanagh.cse.ucsc.edu: lori owned process doing -bs
> > > Date: Wed, 8 Mar 2000 16:01:02 -0800 (PST)
> > > From: Lori Flynn  <[email protected]>
> > > To: [email protected]
> > > Subject: [ns] sending a new packet type
> > > MIME-Version: 1.0
> > > 
> > > Hi again.
> > > 
> > > Thanks for all the previous help-the new packet is now being successfully
> > > created. (yay!)
> > > 
> > > My new problem is how to send the packet (with the new header) to a
> > > specific neighbor.  Following the Greis Ping example (section VII.2) using
> > > the 'command' and "send", he uses:
> > > "send(pkt, 0);"
> > > This sends the packet to the handler 0, I believe...  However, the IP
> > > destination is not set, in the example.  How does the example work, since
> > > the node which is being 'ping'ed is never identified?
> > > 
> > > I add the destination (a neighbor) using the following line:
> > > 			hdrip->dst()= 8;
> > > 
> > > 
> > > However, no node ever calls the recv function for the new type of pkt, so
> > > I believe there is a problem... Any helpful ideas would be appreciated!
> > > 
> > > Thanks,
> > > Lori
> > 
> > Tarik 
> > 
> 
> 
>