[Xorp-hackers] XRL Template

Pavlin Radoslavov pavlin at ICSI.Berkeley.EDU
Sat Feb 7 21:58:17 PST 2009


Victor Faion <vfaion at gmail.com> wrote:

> Hello,
> 
> I was trying to make an XRL that would get called when my XORP process
> starts which would set all the neighbours of the router. I wanted to
> be able to list all the neighbours' IP addresses in the XORP
> configuration file that is read when xorp_rtrmgr starts and have them
> passed to my process in an XrlAtomList.
> 
> In my interface file I have this:
> 
> set_neighbours ? neighbours:list
> 
> and in my template file I have this:
> 
> %activate: xrl "$(bpsf.targetname)/bpsf/0.1/set_neighbours?neighbours:list=$(@)";
> 
> I generated the functions from the interface and implemented them in
> my process, but XORP doesn't like the template file (the only thing I
> changed in it to make it stop working was adding the line above):
> 
> [ 2009/02/06 22:59:03  ERROR xorp_rtrmgr:8107 RTRMGR +369
> main_rtrmgr.cc run ] rtrmgr shutting down due to an init error: PARSE
> ERROR [Config File /root/project/xorp1.6/install/config.boot, line
> 54]: syntax error; Last symbol parsed was "neighbours"
> 
> Is it possible to list the neighbours this way or should I be doing
> something else?

I believe you can't use attribute of type "list", because XRL values
of type "list" can be encoded/decoded only within C++.
One simple workaround that comes to mind is to define "neighbours"
of type "txt", and encode/decode the string in the form you like;
e.g., names separated by comma.

Hope that helps,
Pavlin

> 
> Victor
> 
> _______________________________________________
> Xorp-hackers mailing list
> Xorp-hackers at icir.org
> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers



More information about the Xorp-hackers mailing list