[Click] Write handler problem

Eddie Kohler kohler at cs.ucla.edu
Sat Dec 8 16:33:36 EST 2007


I'll also note that you can use a Script element to get this done.

ICMPAdvertInterval :: Script(TYPE PASSIVE,
      write ICMPAdvert at 1.interval $args,
      write ICMPAdvert at 2.interval $args,
      write ICMPAdvert at 3.interval $args);

Then

ICMPAdvertInterval.run 500

will do what you want.
Eddie


Marco Wenzel wrote:
> Hi Daniel,
> 
> thank you very much for that suggestion. I know, how to use such a configuration
> element and this approach should work very fine :)
> 
> Regards,
> Marco.
> 
> Zitat von Daniel Henkel <henk at gmx.com>:
>> Marco,
>>
>> one possible solution would be to introduce a central
>> information/configuration element which gets queried by all ICMP
>> advertisers. You would only change the parameter once in that element
>> and all others get notified of the change or query in a set interval.
>> One example is given in elements/analysis/aggregateipflows.hh, and
>> related elements like ToIPFlowDumps (elements/analysis). (There was an
>> email by Eddie on this subject some time ago.)
>>
>> Cheers,
>> - Daniel.
>>
>> -------
>> Thursday, December 6, 2007, 8:05:38 AM, you wrote:
>>
>>> Hi,
>>> while implementing an element for ICMP router discovery (RFC 1256), I added
>> a
>>> write handler to configure the advertisement-interval at runtime. This
>> interval
>>> is the time between sending advertisement-messages on multiple interfaces
>> of my
>>> router. I've got one advertisement element for each interface, eg:
>> ICMPAdvert(eth0) ->> ToDevice(eth0);
>> ICMPAdvert(eth1) ->> ToDevice(eth1);
>> ICMPAdvert(eth2) ->> ToDevice(eth2);
>>> and so on... (simpified version)
>>> I want to use the handler to configure the interval globally for every
>> element
>>> at one time. Is this possible? At the moment I have to enter a command for
>>> every element, eg:
>>> # write ICMPAdvert at 1.interval 500
>>> # write ICMPAdvert at 2.interval 500
>>> # write ICMPAdvert at 3.interval 500
>>> While writing a GUI for my router, it would be easier to me, to do
>>> # write ICMPAdvert@*.interval 500
>>> or something like this. Any ideas?
>>> Thanks and best regards,
>>> Marco.
> 



More information about the click mailing list