[Click] How to reference Method Interfaces?
Eddie Kohler
kohler at cs.ucla.edu
Wed Jun 4 16:21:37 EDT 2008
I would not use this method for Bjorn's problem.
Eddie
Javier Sánchez Recacha wrote:
> Hi,
>
> Basically, as far as i know, you have 3 options
>
> 1) use packet annotations to put data into the packet.
> you have to program new queue element to put this data, and read
> this annotation at your MyPrint element.
>
> new queue element.cc:
>
> ...
> //get the capacity and store it in usserspace annotation
>
> #include <click/packet_anno.hh>
>
> ...
> uint32_t a = (uint32_t) capacity();
> p->set_user_anno_u32(1,a);
> ...
>
> MyPrint.cc:
>
> #include <click/packet_anno.hh>
>
> ...
> uint32_t a = p->user_anno_s32(1);
> int capacity = (int) a;
> ....
>
> I didn't tried this code so... something may be wrong
> I don't like this method because you have limited data capacity,
> and you need the elements conected in the same chain.
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list