HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)
r
rpc_soc(3N) rpc_soc(3N)
(OBSOLETE)
void svc_unregister(rpcprog_t
prognum, rpcvers_t versnum);
bool_t xdr_authunix_parms(XDR *
xdrs
, struct authunix_parms *
aupp);
DESCRIPTION
RPC routines allow C programs to make procedure calls on other machines across the network. First, the
client calls a procedure to send a request to the server. Upon receipt of the request, the server calls a
dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call
returns to the client.
NOTE: The routines described in this manual page have been superseded by other routines. The
preferred routine is given after the description of the routine. New programs should use the preferred
routines, as support for the older interfaces may be dropped in future releases.
The HP-UX implementation of RPC only supports the X/Open Transport Interface (XTI). Applications that
are written using the Transport Layer Interface (TLI) and wish to use RPC, must convert their application
to XTI.
File Descriptors
Transport independent RPC uses XTI as its transport interface instead of sockets.
Some of the routines described in this section (such as clnttcp_create()
) take a pointer to a file
descriptor as one of the parameters. If the user passed
RPC_ANYSOCK as the file descriptor, then the rou-
tine will return a TLI file descriptor and not a socket.
Routines
The following routines require that the header <rpc/rpc.h> be included. The symbol PORTMAP should
be defined so that the appropriate function declarations for the old interfaces are included through the
header files.
AUTH *authdes_create()
authdes_create()
is the first of two routines which interface to the RPC secure authentica-
tion system, known as DES authentication. The second is
authdes_getucred(), below.
Note: the keyserver daemon keyserv (1M) must be running for the DES authentication system to
work.
authdes_create()
, used on the client side, returns an authentication handle that will
enable the use of the secure authentication system. The first parameter name is the network
name, or netname, of the owner of the server process. This field usually represents a hostname
derived from the utility routine
host2netname()
, but could also represent a user name using
user2netname() (see secure_rpc(3N)). The second field window is a window on the validity
of the client credential, given in seconds. A small window is more secure than a large one, but
choosing too small of a window will increase the frequency of resynchronizations because of clock
drift. The third parameter syncaddr is optional. If it is NULL, then the authentication system
will assume that the local clock is always in sync with the server’s clock, and will not attempt
resynchronizations. If an address is supplied, however, then the system will use the address for
consulting the remote time service whenever resynchronization is required. This parameter is
usually the address of the RPC server itself. The final parameter ckey is also optional. If it is
NULL, then the authentication system will generate a random DES key to be used for the
encryption of credentials. If it is supplied, however, then it will be used instead.
Warning: this routine exists for backward compatibility only, and is made obsolete by
authdes_seccreate() (see secure_rpc (3N)).
AUTH *authunix_create()
Create and return an RPC authentication handle that contains UX authentication information.
The parameter host is the name of the machine on which the information was created; uid is the
user’s user ID; gid is the user’s current group ID; grouplen and gidlistp refer to a counted array
of groups to which the user belongs.
Warning: it is not very difficult to impersonate a user.
Warning: this routine exists for backward compatibility only, and is made obsolete by
authsys_create() (see rpc_clnt_auth(3N)).
AUTH *authunix_create_default()
Call authunix_create() with the appropriate parameters.
336 Hewlett-Packard Company − 2 − HP-UX 11i Version 3: February 2007