Re: add routing enteries from an external file to Click configuration file

Eddie Kohler <[email protected]>
Newsgroups gmane.network.routing.click
Message-ID <CAF0C5SJyZZzjwRpgoMQ1eLbrb+tXa9Wxc14vv5qe34tj-bcMyw@mail.gmail.com>
Hi Ahmed, Sandeep,

Another way is to use Script elements.  For example, create a file
like this; say it is in /tmp/myroutes

add 1.0.0.0/8 1.0.0.1 0
add 2.0.0.0/8 2.0.0.1 1
...

Then, in your configuration:

.... -> my_routing_table :: RadixIPLookup -> ....
Script(write my_routing_table.ctrl $(cat /tmp/myroutes))


Eddie





On Mon, Nov 28, 2011 at 2:43 PM, sandeep <[email protected]> wrote:
> Hi Ahmed,
>
> One way to do it is using
> RadixIPLookup's<http://read.cs.ucla.edu/click/elements/radixiplookup>
> add
> write handler.
>
> Write a program which reads your file and prints appropriate write
> statements.  Eg: write ril.add(ADDR/MASK [GW] OUT)
>
> Send this output to "netcat <host> <port>". This method is for userlevel
> click and works using
> ControlSocket<http://read.cs.ucla.edu/click/elements/controlsocket>
> element.
> For kernel module use /click file system.
>
> Kind Regards,
> Sandeep,
> PhD Student,
> CTVR - Trinity College Dublin
>
> On Mon, Nov 28, 2011 at 8:34 AM, ahmed A. <[email protected]> wrote:
>>
>> hi,
>>
>> My question may sound primitive, but I couldn't find any answer for it so
>> far,  Does anyone know if it is possible to add my routing entries to
> click
>> configuration file from an external file ?
>>
>> For example for RadixIPLookup( ) click element, so instead of adding all
>> the entries between the brackets, how I can tell the element to read them
>> from a file ?
>>
>> Thanks
>>
>> Ahmed
>> _______________________________________________
>> click mailing list
>> [email protected]
>> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
> _______________________________________________
> click mailing list
> [email protected]
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click

_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.