rpc_soc, authdes_create, authunix_create, authunix_create_default, callrpc, clnt_broadcast, clntraw_create, clnttcp_create, clntudp_bufcreate, clntudp_create, get_myaddress, getrpcport, pmap_getmaps, pmap_getport, pmap_rmtcall, pmap_set, pmap_unset, registerrpc, svc_fds, svc_getcaller, svc_getreq, svc_register, svc_unregister, svcfd_create, svcraw_create, svctcp_create, svcudp_bufcreate, svcudp_create, xdr_authunix_parms - obsolete library routines for RPC
#define PORTMAP #include <rpc/rpc.h>
AUTH *authdes_create(char *name, uint_t window, struct sockaddr_in *syncaddr, des_block *ckey);
AUTH *authunix_create(char *host, uid_t uid, gid_t gid, int grouplen, gid_t *gidlistp);
AUTH *authunix_create_default(void)
callrpc(char *host, rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out);
enum clnt_stat_clnt_broadcast(rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum, xdrproc_t inproc, char *in, xdrproc_t outproc, char *out, resultproc_teachresult);
CLIENT *clntraw_create(rpcproc_t procnum, rpcvers_t versnum);
CLIENT *clnttcp_create(struct sockaddr_in *addr, rpcprog_t prognum, rpcvers_t versnum, int *fdp, uint_t sendz, uint_t recvsz);
CLIENT *clntudp_bufcreate(struct sockaddr_in *addr, rpcprog_t prognum, rpcvers_t versnum, struct timeval wait, int *fdp, uint_t sendz, uint_t recvsz);
CLIENT *clntudp_create(struct sockaddr_in *addr, rpcprog_t prognum, struct timeval wait, int *fdp);
void get_myaddress(struct sockaddr_in *addr);
ushort getrpcport(char *host, rpcprog_t prognum, rpcvers_t versnum, rpcprot_t proto);
struct pmaplist *pmap_getmaps(struct sockaddr_in *addr);
ushort pmap_getport(struct sockaddr_in *addr, rpcprog_t prognum, rpcvers_t versnum, rpcprot_t protocol);
enum clnt_stat pmap_rmtcall(struct sockaddr_in *addr, rpcprog_t prognum, rpcvers_t versnum, rpcproc_t progcnum, caddr_t in, xdrproct_t inproc, caddr_t out, cdrproct_t outproc, struct timeval tout, rpcport_t *portp);
bool_t pmap_set(rpcprog_t prognum, rpcvers_t versnum, rpcprot_t protocol, u_short port);
bool_t pmap_unset(rpcprog_t prognum, rpcvers_t versnum);
int svc_fds;
struct sockaddr_in *svc_getcaller(SVCXPRT *xprt);
void svc_getreq(int rdfds);
SVCXPRT *svcfd_create(int fd, uint_t sendsz, uint_t recvsz);
SVCXPRT *svcraw_create(void)
SVCXPRT *svctcp_create(int fd, uint_t sendsz, uint_t recvsz);
SVCXPRT *svcudp_bufcreate(int fd, uint_t sendsz, uint_t recvsz);
SVCXPRT *svcudp_create(int fd);
registerrpc(rpcprog_t prognum, rpcvers_t versnum, rpcproc_t procnum, char *(*procname)(), xdrproc_t inproc, xdrproc_t outproc);
bool_tsvc_register(SVCXPRT *xprt, rpcprog_t prognum, rpcvers_t versnum, void (*dispatch(), int protocol);
void svc_unregister(rpcprog_t prognum, rpcvers_t versnum);
bool_t xdr_authunix_parms(XDR *xdrs, struct authunix_parms *supp);
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.
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.
Transport independent RPC uses TLI 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 wants the file descriptor to be a socket, then the application will have to be linked with both librpcsoc and libnsl. If the user passed RPC_ANYSOCK as the file descriptor, and the application is linked with libnsl only, then the routine will return a TLI file descriptor and not a socket.
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.
authdes_create()
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(3NSL). The second field is 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.
This routine exists for backward compatibility only, and it is made obsolete by authdes_seccreate(). See secure_rpc(3NSL).
authunix_create()
It is not very difficult to impersonate a user.
This routine exists for backward compatibility only, and it is made obsolete by authsys_create(). See rpc_clnt_auth(3NSL).
authunix_create_default()
This routine exists for backward compatibility only, and it is made obsolete by authsys_create_default(). See rpc_clnt_auth(3NSL).
callrpc()
You do not have control of timeouts or authentication using this routine. This routine exists for backward compatibility only, and is made obsolete by rpc_call(). See rpc_clnt_calls(3NSL).
clnt_stat_clnt_broadcast()
eachresult(char *out, struct sockaddr_in *addr);
where out is the same as out passed to clnt_broadcast(), except that the remote procedure's output is decoded there; addr points to the address of the machine that sent the results. If eachresult() returns 0. clnt_broadcast() waits for more replies; otherwise it returns with appropriate status. If eachresult() is NULL, clnt_broadcast() returns without waiting for any replies.
Broadcast packets are limited in size to the maximum transfer unit of the transports involved. For Ethernet, the callers argument size is approximately 1500 bytes. Since the call message is sent to all connected networks, it may potentially lead to broadcast storms. clnt_broadcast() uses SB AUTH_SYS credentials by default. See rpc_clnt_auth(3NSL). This routine exists for backward compatibility only, and is made obsolete by rpc_broadcast(). See rpc_clnt_calls(3NSL).
clntraw_create()
This routine exists for backward compatibility only. It has the same functionality as clnt_raw_create(). See rpc_clnt_create(3NSL), which obsoletes it.
clnttcp_create()
This routine exists for backward compatibility only. clnt_create(), clnt_tli_create(), or clnt_vc_create() should be used instead. See rpc_clnt_create(3NSL).
clntudp_bufcreate()
The user can specify the maximum packet size for sending and receiving by using sendsz and recvsz arguments for UDP-based RPC messages.
If addr->sin_port is 0 and the requested version number versnum is not registered with the remote portmap service, it returns a handle if at least a version number for the given program number is registered. The version mismatch is discovered by a clnt_call() later (see rpc_clnt_calls(3NSL)).
This routine exists for backward compatibility only. clnt_tli_create() or clnt_dg_create() should be used instead. See rpc_clnt_create(3NSL).
clntudp_create()
Since UDP-based RPC messages can only hold up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.
This routine exists for backward compatibility only. clnt_create(), clnt_tli_create(), or clnt_dg_create() should be used instead. See rpc_clnt_create(3NSL).
get_myaddress()
This routine is only intended for use with the RPC library. It returns the local system's address in a form compatible with the RPC library, and should not be taken as the system's actual IP address. In fact, the *addr buffer's host address part is actually zeroed. This address may have only local significance and should not be assumed to be an address that can be used to connect to the local system by remote systems or processes.
This routine remains for backward compatibility only. The routine netdir_getbyname() should be used with the name HOST_SELF to retrieve the local system's network address as a netbuf structure. See netdir(3NSL).
getrpcport()
This routine exists for backward compatibility only. Enhanced functionality is provided by rpcb_getaddr(). See rpcbind(3NSL).
pmaplist()
This routine exists for backward compatibility only, enhanced functionality is provided by rpcb_getmaps(). See rpcbind(3NSL).
pmap_getport()
This routine exists for backward compatibility only, enhanced functionality is provided by rpcb_getaddr(). See rpcbind(3NSL).
pmap_rmtcall()
This procedure is only available for the UDP transport.
If the requested remote procedure is not registered with the remote portmap then no error response is returned and the call times out. Also, no authentication is done.
This routine exists for backward compatibility only, enhanced functionality is provided by rpcb_rmtcall(). See rpcbind(3NSL).
pmap_set()
This routine exists for backward compatibility only, enhanced functionality is provided by rpcb_set(). See rpcbind(3NSL).
pmap_unset()
This routine exists for backward compatibility only, enhanced functionality is provided by rpcb_unset(). See rpcbind(3NSL).
svc_fds()
This interface is made obsolete by svc_fdset. See rpc_svc_calls(3NSL).
svc_getcaller()
This routine exists for backward compatibility only, and is obsolete. The preferred interface is svc_getrpccaller(). See rpc_svc_reg(3NSL), which returns the address as a struct netbuf.
svc_getreq()
This interface is made obsolete by svc_getreqset()
svcfd_create()
This interface is made obsolete by svc_fd_create() (see rpc_svc_create(3NSL)).
svcraw_create()
This routine exists for backward compatibility only, and has the same functionality of svc_raw_create(). See rpc_svc_create(3NSL), which obsoletes it.
svctcp_create()
This routine exists for backward compatibility only. svc_create(), svc_tli_create(), or svc_vc_create() should be used instead. See rpc_svc_create(3NSL).
svcudp_bufcreate()
The user specifies the maximum packet size for sending and receiving UDP-based RPC messages by using the sendsz and recvsz parameters.
This routine exists for backward compatibility only. svc_tli_create(), or svc_dg_create() should be used instead. See rpc_svc_create(3NSL).
svcudp_create()
Since UDP-based RPC messages can only hold up to 8 Kbytes of encoded data, this transport cannot be used for procedures that take large arguments or return huge results.
This routine exists for backward compatibility only. svc_create(), svc_tli_create(), or svc_dg_create() should be used instead. See rpc_svc_create(3NSL).
registerrpc()
svc_run() must be called after all the services are registered.
This routine exists for backward compatibility only, and it is made obsolete by rpc_reg().
svc_register()
dispatch(struct svc_req *request, SVCXPRT *xprt);
The svc_register() routine returns one if it succeeds, and 0 otherwise.
This routine exists for backward compatibility only. Enhanced functionality is provided by svc_reg().
svc_unregister()
This routine exists for backward compatibility. Enhanced functionality is provided by svc_unreg().
xdr_authunix_parms()
This routine exists for backward compatibility only, and is made obsolete by xdr_authsys_parms(). See rpc_xdr(3NSL).
See attributes(5) for descriptions of the following attributes:
|
keyserv(1M), rpcbind(1M), rpcinfo(1M), netdir(3NSL), netdir_getbyname(3NSL), rpc(3NSL), rpc_clnt_auth(3NSL), rpc_clnt_calls(3NSL), rpc_clnt_create(3NSL), rpc_svc_calls(3NSL), rpc_svc_create(3NSL), rpc_svc_err(3NSL), rpc_svc_reg(3NSL), rpc_xdr(3NSL), rpcbind(3NSL), secure_rpc(3NSL), select(3C), xdr_authsys_parms(3NSL), libnsl(3LIB), librpcsoc(3LIBUCB), attributes(5)
These interfaces are unsafe in multithreaded applications. Unsafe interfaces should be called only from the main thread.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |