[Click] dynamic reconfiguration

Eddie Kohler kohler at cs.ucla.edu
Wed Aug 30 18:38:03 EDT 2006


This is not exactly possible, but oftentimes you can get similar effects 
within the configuration.  Click is not an imperative programming language 
with "threads of control"; you're specifying a graph of elements instead.  But 
those elements can implement something like "case statements"; check out 
IPClassifier, for example.  It's very easy to say "if the incoming packet is 
TCP, send it through this subgraph; if the incoming packet is UDP, send it 
through this other subgraph", etc.

Eddie


Hamza wrote:
> Thanks Beel,
> 
> I also want to know if different configuration files can run under one main
> configuration file so that a configuration files runs when a particular
> condition is met in the main configuration file like switch case statement?
> 
> 
> On 8/29/06, Koen Beel <koen.beel at gmail.com> wrote:
>> Hi Hamza,
>>
>> You can specify configuration parameters via a configuration string in
>> your click config file.
>> e.g.  FromDevice(eth0, PROMISC true)
>> If you write your own elements check for example the source of
>> FromDevice to see how to parse the configuration string. (method int
>> configure(Vector<String>, ErrorHandler))
>> [CLICKDIR/elements/linuxmodule/fromdevice.cc]
>>
>> And if you want to reconfigure elements at runtime, you can use the
>> proclikefs in kernel mode. e.g. element Queue
>> http://www.read.cs.ucla.edu/click/elements/queue
>> This element has some handlers, some read-only, some read/write. If
>> you want to know the queue length just read (cat) 'length'. If you
>> want to set its capacity, write to 'capacity'.
>>
>> Check section 'userdriver', 'linuxmodule' and 'language' at
>> http://www.read.cs.ucla.edu/click/docs for more info.
>>
>> Also:
>> -http://pdos.csail.mit.edu/click/doxygen/annotated.html
>> -http://pdos.csail.mit.edu/click/doc/progman.html (not complete but
>> usefull)
>> -search the click archives using google e.g. 'configuration
>> site:https://amsterdam.lcs.mit.edu/pipermail/click/'
>> -http://www.read.cs.ucla.edu/click/faq
>>
>> On 8/29/06, Hamza <hamzamalik at gmail.com> wrote:
>>> Hi,
>>>
>>> We are quite new in Click architecture and are trying to implement a
>> user
>>> level protocol .
>>> Can we reconfigure the protocol engine on run time? i.e we want our
>> protocol
>>> to run dynamically without any hard coded information e.g addresses etc.
>>>
>>> Regards
>>>
>>> Hamza
>>> _______________________________________________
>>> click mailing list
>>> click at amsterdam.lcs.mit.edu
>>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>>>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list