rama@bgsuvax.UUCP (Sub Ramakrishnan) (02/16/91)
I have a question for those SUN rpc gurus. Background: The portmapper daemon (on port # 111) helps clients find server programs. Servers register their services with the portmapper. The client call goes to port # 111; portmapper returns the port # of the server in its reply message. The client can then sends rpc messages to this port #. Question: How does a client find the "directory" of services (service name, port # and a description) offered on a machine. The client knows neither the name nor the server port #. Two ways that I don't like: (1). The client can exhaustively poll all possible port #s. (2) Read /etc/services file; does'nt give you services that "come & go". I am looking for ways to find the services at run time. Much appreciated. sub ramakrishnan rama@truth.bgsu.edu Voice: 419 372 2337
bstrand@poplar13.cray.com (Brad Strand) (02/16/91)
In article <6988@bgsuvax.UUCP> rama@bgsuvax.UUCP (Sub Ramakrishnan) writes: > >Question: How does a client find the "directory" of services >(service name, port # and a description) offered on a machine. >The client knows neither the name nor the server port #. >Two ways that I don't like: >(1). The client can exhaustively poll all possible port #s. >(2) Read /etc/services file; does'nt give you services that "come & go". >I am looking for ways to find the services at run time. Use "pmap_getmaps()". It takes a pointer to a sockaddr_in structure for the remote host, and returns a pointer to a pmaplist structure. If you've got source for rpcinfo, look how that program does it. >Much appreciated. >sub ramakrishnan rama@truth.bgsu.edu Voice: 419 372 2337 BDS -- Brad Strand bstrand@cray.com (DOMAIN) uunet!cray!bstrand (UUCP) Cray Research, Inc. Networking and Communications Development 655F Lone Oak Drive #include <std/disclaimer.h> Eagan, MN 55121 "No gnu taxes."