Thank you, this has made it work. I think I misunderstood the point of the template files, I thought all the functions in the protocol had to be described in the template, but it's just the ones that are used for configuration when you start rtrmgr (I think).
On Tue, Jan 27, 2009 at 11:10, Pavlin Radoslavov <[email protected]> wrote: > Victor Faion <[email protected]> wrote: > >> Hello, >> >> Just wanted some help regarding template files. I was trying to write >> a simple template file for a process that has a function that just >> takes in an input message (string), modifies it and gives it back to >> the callback function, but I didn't know how. Or are the template >> files supposed to be automatically generated? > > You need to write them by hand. > > Your template file should look like the following. The string to be > set in the user config is "my-string", and the XRL itself is > "myproto/myproto/0.1/set_mystring?mystring:txt=$(@)" > > Hope that helps, > Pavlin > > protocols { > myproto { > targetname: txt = "myproto"; > my-string: txt; > } > } > > protocols { > myproto { > %help: short "Configure myproto"; > %modinfo: provides myproto; > /* XXX: uncomment if the FEA must be started first > %modinfo: depends fea; > */ > %modinfo: path "myproto/xorp_myproto"; > %modinfo: default_targetname "myproto"; > %modinfo: status_method xrl > "$(myproto.targetname)/common/0.1/get_status->status:u32&reason:txt"; > %modinfo: shutdown_method xrl > "$(myproto.targetname)/common/0.1/shutdown"; > > %mandatory: $(@.targetname); > > /* XXX: The optional XRL that will be called on startup > %activate: xrl "$(myproto.targetname)/myproto/0.1/start_myproto"; > */ > > targetname { > %user-hidden: "XRL target name"; > %help: short "XRL target name"; > %set:; > } > > my-string { > %help: short "Set my string"; > %set: xrl > "$(myproto.targetname)/myproto/0.1/set_mystring?mystring:txt=$(@)"; > } > } > } > _______________________________________________ Xorp-hackers mailing list [email protected] http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
