[Xorp-hackers] Q: Can't validate start of process protoC

Orion Hodson orion@icir.org
Wed, 03 Mar 2004 14:36:09 -0800


/-- Liang Qin wrote:
| Hi XORP users,
| 
| I'm porting a routing protocol "protoC" to XORP v.0.5, I have a problem 
| when I launch
| this module in XORP.
| 
| Here is part of error message:
| --------------------
| New module has PID 4406
| step1_done (protoC)
| step2 (protoC)
| validate
| XRL: >finder://protoC/common/0.1/get_status<
| [ 2004/03/03 15:23:35  WARNING xorp_rtrmgr:4403 XrlFinderTarget +376 
| finder_base.cc handle_finder_0_2_resolve_xrl ] Handling method for 
| finder/0.2/resolve_xrl failed: XrlCmdError 102 Command failed Target 
| "protoC" does not exist or is not enabled.
| *-*-*- start running protoC target
| ***************the protoC status is 3
| --------------------------
| This error message will repeat until this module is killed.
| 
| The printout messages are added by me, we can see that the target is 
| running from its status code.
| 
| It'll work if I add a infinite loop late, like
| while(true)
|     e.run();
| 
| e is an instance of EventLoop
| 
| My question is
| 1. Does this error message mean that protoC process is not up? or rtrmgr 
| cannot find the process?

Yes.

| 2. Do I have to use the infinite loop?

Yes.  XORP is single-thread.  All processing is done on the basis of timers 
and file descriptor.  Events are dispatched out of the eventloop.  Ideally, 
your application will just loop about eventloop.run() after start up and call 
it from just one place.  A good example of this is the standalone Finder 
process in libxipc/finder_main.cc.

For the time being, it's probably better to work with the current CVS image of 
XORP rather than the 0.5 source code.  Several things have improved, including 
some Router Manager diagnostics have improved since then.

Kind Regards
- Orion