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

Re: code question



	Jonas,

If no second argument is given, it defaults into NULL.

Calling parent_->sendto(p); is the same as calling
parent_->sendto(p, (Handler *)0);

Hope this clear things up.

- Kippis, wesa

> 
> Hi all,
> 
> I am trying to implement an agent much like the snoop agent,
> when I am looking at the code for snoop I cannot understand
> one line (line 193, snoop.cc):
> 
> parent_->sendto(p);	/* vector to LLSnoop's sendto() */
> 
> I have tried to find a function "sendto(Packet* p)" but
> I only find functions with two arguments (Packet and Handler).
> As it seems it is only snoop that uses this function call...
> Could someone explain how this works (I am no C++ guru)
> 
> Thanks
> 
> Jonas Haggard Ljungquist
>