Sun TI-RPC problem

Sun TI-RPC problem

Post by David K.Y. Y » Sat, 10 Aug 1996 04:00:00

Hi netters,

I am writing a straightforward RPC (specifically Sun's TI-RPC using the
loopback /dev/ticots device) application that shows some strange behavior.
Basically, the server side
  (1) create a SVCXPRT handle using
      svc_tli_create(RPC_ANYFD, nconf, NULL, 0, 0);
     where nconf->nc_semantics == NC_TPI_COTS,
           nconf->nc_protofmly is NC_LOOPBACK and
           nconf->nc_proto is NC_NOPROTO, and
  (2) registers the service using svc_reg() (the dispatcher routine registered
     is very simple and supports NULLPROC)

After svc_reg(), the service indeed shows up with rpcinfo(1). However,
when the client side tries to create a CLIENT handle to the service
using clnt_tli_create() (first using rpcb_getaddr to find out the server
address), the call simply blocks there and never returns.

So does anyone know if it is some common mistake that I made which causes
this kind of behavior? Also, does anyone know where to look for references/
examples of callback RPC applications using Sun's TI-RPC (preferably examples
on using the loopback interfaces such as /dev/ticots)?

Thanks in advance,


1. RPC Callbacks in TI-RPC [Solaris 2.2]

Hopefully this is a simple question for the TI-RPC knowledgable.

I'm trying to migrate an application from the old non-TI RPC to TI-RPC
under Solaris 2.2.  I'm having some trouble with RPC callbacks.

The older version of the system uses a code fragment from the old SunOS
docs that returns a transient program number by iteratively doing a
pmap_set until it hits an unused program number (pmap_set takes a protocol,
such as IPPROTO_UDP, and so is not transport-independent).

I'm trying to replace this with a bit of code which uses rpcb_set.  I've
got all of the arguments to rpcb_set down, except for the struct netbuf *
that gets passed in.  I'm assuming that this is the address of the server+
service that I'm trying to establish, but I don't know how to get this netbuf.

netdir_getbyname() looks like it would do the trick, except that I have
to pass it the name of the service I'm looking for as a member of its
nd_hostserv argument.  Since this is a transient service used for callbacks,
it doesn't have a registered name.

There may be multiple clients (acting as transient servers for the purpose
of answering callbacks) on a host at a given time, so I can't do something
like hardcode in a program number; I really do need a transient program
number that I can guarantee is not in use.

Unfortunately, the RPC docs no longer have a section on RPC callbacks. :-)

Can anyone offer a clue as to how to do this?



multimedia computing group / georgia tech       404.894.6266
graphics, visualization, & usability center         atlanta, ga  30332-0280

2. XWindows

3. TI-RPC (ONC+ RPC) for Linux

4. debian + netenv

5. RPC 4.0 vs RPC 4.1 vs TI RPC


7. newer TI-RPC (RPCSEC_GSS) distribution?

8. Network Interface Driver for AIX - Questions for the Networking Gurus

9. TI-RPC, Has anyone ported it to Linux?

10. TI-RPC programming question (yet another...)

11. which is better? Socket or ONC TI-RPC

12. where the ONC TI-RPC rpcgen for ULTRIX can be find?

13. TI-RPC