[Click] newbie click programming question

Harry Lasas lasasffl at yahoo.com
Sun Sep 18 23:35:50 EDT 2005


Hi Beyers and All:

Thanks for your reply. 

How to check for a valid packet after calling head()? 

if(*p) 

does not seem to work (Packet to bool)...

Any input will help greatly.
Thank you.
Harry



--- Beyers Cronje <bcronje at gmail.com> wrote:

> Harry,
> 
> Are you sure you are not working on an empty queue ?
> Ie you are not checking 
> for a valid packet after calling head().
> 
> Beyers
> 
> On 9/12/05, Harry Lasas <lasasffl at yahoo.com> wrote:
> > 
> > I briefly RTFM and now tried something that
> doesn't
> > work.
> > 
> > I am just trying to set up WTP algorithm on Click
> and
> > need the waiting time of the packet at the head of
> a
> > queue for that. I understand I can simply set
> packet
> > timestamp annotation in the Click config file and
> then
> > try to do some (* gasp *:) arithmetic on that to
> get
> > the waiting time.
> > 
> > I created a queue that inherits from simplequeue
> and
> > am trying to access the timestamp of the head
> packet
> > with something like
> > 
> > Packet * p = head();
> > currentTime = p->timestamp_anno();
> > 
> > But it keeps seg faulting. Any idea why? Is there
> a
> > better way to do what I am trying? Thank you.
> > 
> > 
> > Harry Lasas
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> > _______________________________________________
> > click mailing list
> > click at amsterdam.lcs.mit.edu
> >
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> >
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the click mailing list