[Click] Information sharing in Click

Nicholas Weaver nweaver at ICSI.Berkeley.EDU
Thu Aug 2 13:29:08 EDT 2007


On Thu, Aug 02, 2007 at 07:19:34PM +0200, Beyers Cronje composed:
> Hi Adam,
> 
> The way I do it is via handler calls. So a downstream element will call an
> upstream element's read/write handler. Alternatively you could use the
> header space of a packet to include custom data per packet. Or you could
> extend the packet annotations for your purposes.

The problem with handler information is that it sounds like Adam wants
to annotate significant information onto each packet.

Thus the options seem to be:

a) prepend an additional header and define some structure for the
Bucket o Bits for this information.

b) Subclass Packet

Subclassing packet makes more sense IFF the packets are created only
by an element you define so they can create the subclass.

-- 
Nicholas C. Weaver                               nweaver at icsi.berkeley.edu
     This message has been ROT-13 encrypted twice for higher security.


More information about the click mailing list