On Sun, Feb 8, 2009 at 05:58, Pavlin Radoslavov <[email protected]> wrote: > Victor Faion <[email protected]> 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 >> [email protected] >> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers >
Thanks for the help, that works for me. I'll parse the string into an XrlAtomList. Victor _______________________________________________ Xorp-hackers mailing list [email protected] http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
