Re: Passing a structure pointer to some element (handler)?

Markku Savela <[email protected]>
Newsgroups gmane.network.routing.click
Message-ID <[email protected]>
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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.