[Xorp-hackers] Remote finder: XRLs, or local ports?

Steven Simpson ss at comp.lancs.ac.uk
Wed Feb 23 03:51:40 PST 2011


On 21/02/11 16:05, Steven Simpson wrote:
> One option for us is simply to get the host-port of one process S across
> to another C, so that C can call S with stcp.  C will also have to
> provide a callback XRL, also stcp.  Both processes therefore need to get
> their port numbers to form stcp XRLs, but we can't seem to find a way
> for the nodes (as Xrl*TargetBases) to obtain such details.  Is it
> possible with the current API?

Okay, we've seen how to do this.

First, we have to run xorp_rtrmgr with XORP_PF=t to ensure that STCP is
used.

As our node starts up, it has to talk to an external resolver to report
its address.  It inherits from XrlStdRouter (which inherits from
XrlRouter), which has been initialized by this time, including the
creation of at least one XrlPFListener registered with the XrlRouter.

All our node needs to do now is iterate over the protected _listeners
member inherited from XrlRouter, and get out the results of protocol()
(e.g. "stcp") and address() (e.g. "127.0.0.1:1234").  These are sent to
the resolver (e.g. as "stcp://127.0.0.1:1234"), which will discard items
it can't use ("unix:...."), and translate 127.0.0.1 to the remote
address of the calling connection.

This method will allow us to progress, but the remote finder:// option
might still be useful to us, btw, if there's an answer to that.

Cheers!

-- 




More information about the Xorp-hackers mailing list