[Click] Passing a structure pointer to some element (handler)?
Markku Savela
Markku.Savela at vtt.fi
Thu Mar 15 06:59:31 EDT 2012
On 03/13/2012 01:28 PM, Markku Savela wrote:
>
> 1) Ugly solution: translate key and sadatuple address into string
> and pass it, setkey parses the addres from string into pointer]
>
> 2) less ugly, but not Click philopsophy? Require the pipeline element
> to provide direct IPsec support api with "setkey(keydata, sa)"
> function.
There seems to be lack of examples using LLRPC, but could that mechanism
be used? That is in element x
Element *e; // Other element
e->llrpc(MY_SETKEYCOMMAD, &keydata);
What puzzles me that all LLRPC commands seems to be in llrpc.h? I would
have expected each element itself to define the commands it understands
in the own header? Would I have to allocate command values as globally
unique, and not just element specific integers starting from 0 or 1?
More information about the click
mailing list