[Click] Using handlers

kalin lagno kalinlagno at yahoo.com
Mon May 21 02:20:11 EDT 2007


  Thanks for answer, now it works.
  kalin
  
Mike Wilson <mlw2 at arl.wustl.edu> wrote:
  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
>


       
---------------------------------
Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.


More information about the click mailing list