[Click] How to reference Method Interfaces?

Beyers Cronje bcronje at gmail.com
Wed Jun 4 07:23:17 EDT 2008


Hi Bjorn,

You have two options, you can pass the queue element name to your element's
configuration and obtain a pointer to it. See staticthreadsched.cc for an
example. Or you can find the queue element names via flow-based router
context, see red.cc for an example on this. This file uses both options, see
RED::initialize() for the flow-based code.

Beyers


On Wed, Jun 4, 2008 at 5:41 AM, 刘冰洋 <bjornliu at gmail.com> wrote:

> Hi~, I'm a fresh man for click.
> I learned "Flow-Based Router Context", and it is said that "A can refer to
> B
> by name". But I couldn't find any tutorial about "Refer Element's Method
> Interface by Name".
> For example, there is a configuration:
>    ... -> q::Queue -> MyPrint(config string) -> ...
>    MyPrint() is just an element which passes packets unchanged, and will
> print any type of data as configured.
>    and i want to print q's length().
>    How can I achieve that?
> Thx!!
>
> --
> Bjorn Liu
> Tsinghua Uni, Beijing, China
> +86 010 51531429
> +86 13141300043
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>


More information about the click mailing list