[Xorp-hackers] how to interact with rtrmgr

Bruce M. Simpson bms at incunabulum.net
Sat Nov 29 11:27:06 PST 2008


周杰 wrote:
>
>         Hi ,XORP,
>         I am working to add web interface for Xorp.
>         I want to know how to interact with the
>         rtrmgr.could I use the rgrmgr's xrl interface for
>         xorpsh,while ,how?
>         could someone help me?
>         thank you very much!!
>


Sure, you could use the Router Manager's XRL interface. Just look at 
what xorpsh does.

The problem is, how are you going to handle callbacks. A lot is going to 
depend on the choice of your languge for implementation.

At the moment we have layers of C++ stub libraries around the XRL layer 
which are pretty much dependent on the use of the C++ language to 
service XRL callbacks..

One way of getting aroun this is to use the call_xrl binary, this avoids 
having to deal with C++ language bindings; instead you fork call_xrl to 
run the appropriate XRL. Obviously this isn't really useful apart from 
simple shell scripts, but it serves as an example.

If you implement your web front-end in C++, as an XRL capable process, 
then you side-step these problems. If on the other hand you wish to use 
a language which is perhaps more appropriate to web application 
development (e.g. Python, Ruby) then you have the problem of how to 
realize the C++ callbacks in your chosen language.

The alternative is to try to widen the scope of XRL and reduce its C++ 
dependence. I did start work on porting the XRL layer into Python in the 
summer, however, there have been so many changes to the code base since 
then, and not really enough interest from outside to justify the effort 
so I've shelved it.

thanks
BMS




More information about the Xorp-hackers mailing list