[Click] Using handlers
Mike Wilson
mlw2 at arl.wustl.edu
Sun May 20 18:14:30 EDT 2007
Hello, Kalin,
The non-comment part of the config is as follows:
FromDevice(eth0) -> Print(ok) -> Discard;
The problem you're having is that there's no such instantiated
element in the test-device.click config. The FromHost element is declared
implicitly, which means that it has a generated name. You're trying to
call the handler from the class name.
See click(5) for the details of the generated name. In this case,
it should be FromDevice at 1. If you're going to use a lot of handlers like
this, you'll want to give the element a name, such as:
fd :: FromDevice(eth0) -> Print(ok) -> Discard;
...and then you can call it with read fd.encap
-Mike Wilson
On Sun, 20 May 2007, kalin lagno wrote:
> Hi,
> I started click with test-device.click,
> and then I telnet to local host and wrote:
>
> read fromhost.encap
>
> But I got this error: 510 No element named 'fromhost'
>
> Can anybody tell me what is wrong?
>
> Regards
> Kalin
>
>
> ---------------------------------
> Pinpoint customers who are looking for what you sell.
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
More information about the click
mailing list