1dba7a33eSGarrett Wollman /* 2dba7a33eSGarrett Wollman * Sun RPC is a product of Sun Microsystems, Inc. and is provided for 3dba7a33eSGarrett Wollman * unrestricted use provided that this legend is included on all tape 4dba7a33eSGarrett Wollman * media and as a part of the software program in whole or part. Users 5dba7a33eSGarrett Wollman * may copy or modify Sun RPC without charge, but are not authorized 6dba7a33eSGarrett Wollman * to license or distribute it to anyone else except as part of a product or 7dba7a33eSGarrett Wollman * program developed by the user. 8dba7a33eSGarrett Wollman * 9dba7a33eSGarrett Wollman * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE 10dba7a33eSGarrett Wollman * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR 11dba7a33eSGarrett Wollman * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. 12dba7a33eSGarrett Wollman * 13dba7a33eSGarrett Wollman * Sun RPC is provided with no support and without any obligation on the 14dba7a33eSGarrett Wollman * part of Sun Microsystems, Inc. to assist in its use, correction, 15dba7a33eSGarrett Wollman * modification or enhancement. 16dba7a33eSGarrett Wollman * 17dba7a33eSGarrett Wollman * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE 18dba7a33eSGarrett Wollman * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC 19dba7a33eSGarrett Wollman * OR ANY PART THEREOF. 20dba7a33eSGarrett Wollman * 21dba7a33eSGarrett Wollman * In no event will Sun Microsystems, Inc. be liable for any lost revenue 22dba7a33eSGarrett Wollman * or profits or other special, indirect and consequential damages, even if 23dba7a33eSGarrett Wollman * Sun has been advised of the possibility of such damages. 24dba7a33eSGarrett Wollman * 25dba7a33eSGarrett Wollman * Sun Microsystems, Inc. 26dba7a33eSGarrett Wollman * 2550 Garcia Avenue 27dba7a33eSGarrett Wollman * Mountain View, California 94043 2886b9a9ccSGarrett Wollman * 2986b9a9ccSGarrett Wollman * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI 3086b9a9ccSGarrett Wollman * from: @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC 3186b9a9ccSGarrett Wollman * $Id: pmap_clnt.h,v 1.1 1993/10/27 05:40:33 paul Exp $ 32dba7a33eSGarrett Wollman */ 33dba7a33eSGarrett Wollman 34dba7a33eSGarrett Wollman /* 35dba7a33eSGarrett Wollman * pmap_clnt.h 36dba7a33eSGarrett Wollman * Supplies C routines to get to portmap services. 37dba7a33eSGarrett Wollman * 38dba7a33eSGarrett Wollman * Copyright (C) 1984, Sun Microsystems, Inc. 39dba7a33eSGarrett Wollman */ 40dba7a33eSGarrett Wollman 41dba7a33eSGarrett Wollman /* 42dba7a33eSGarrett Wollman * Usage: 43dba7a33eSGarrett Wollman * success = pmap_set(program, version, protocol, port); 44dba7a33eSGarrett Wollman * success = pmap_unset(program, version); 45dba7a33eSGarrett Wollman * port = pmap_getport(address, program, version, protocol); 46dba7a33eSGarrett Wollman * head = pmap_getmaps(address); 47dba7a33eSGarrett Wollman * clnt_stat = pmap_rmtcall(address, program, version, procedure, 48dba7a33eSGarrett Wollman * xdrargs, argsp, xdrres, resp, tout, port_ptr) 49dba7a33eSGarrett Wollman * (works for udp only.) 50dba7a33eSGarrett Wollman * clnt_stat = clnt_broadcast(program, version, procedure, 51dba7a33eSGarrett Wollman * xdrargs, argsp, xdrres, resp, eachresult) 52dba7a33eSGarrett Wollman * (like pmap_rmtcall, except the call is broadcasted to all 53dba7a33eSGarrett Wollman * locally connected nets. For each valid response received, 54dba7a33eSGarrett Wollman * the procedure eachresult is called. Its form is: 55dba7a33eSGarrett Wollman * done = eachresult(resp, raddr) 56dba7a33eSGarrett Wollman * bool_t done; 57dba7a33eSGarrett Wollman * caddr_t resp; 58dba7a33eSGarrett Wollman * struct sockaddr_in raddr; 59dba7a33eSGarrett Wollman * where resp points to the results of the call and raddr is the 60dba7a33eSGarrett Wollman * address if the responder to the broadcast. 61dba7a33eSGarrett Wollman */ 62dba7a33eSGarrett Wollman 6386b9a9ccSGarrett Wollman #ifndef _RPC_PMAPCLNT_H 6486b9a9ccSGarrett Wollman #define _RPC_PMAPCLNT_H 6586b9a9ccSGarrett Wollman #include <sys/cdefs.h> 6686b9a9ccSGarrett Wollman 6786b9a9ccSGarrett Wollman __BEGIN_DECLS 6886b9a9ccSGarrett Wollman extern bool_t pmap_set __P((u_long, u_long, int, int)); 6986b9a9ccSGarrett Wollman extern bool_t pmap_unset __P((u_long, u_long)); 7086b9a9ccSGarrett Wollman extern struct pmaplist *pmap_getmaps __P((struct sockaddr_in *)); 7186b9a9ccSGarrett Wollman extern enum clnt_stat pmap_rmtcall __P((struct sockaddr_in *, 7286b9a9ccSGarrett Wollman u_long, u_long, u_long, 7386b9a9ccSGarrett Wollman xdrproc_t, caddr_t, 7486b9a9ccSGarrett Wollman xdrproc_t, caddr_t, 7586b9a9ccSGarrett Wollman struct timeval, u_long *)); 7686b9a9ccSGarrett Wollman extern enum clnt_stat clnt_broadcast __P((u_long, u_long, u_long, 7786b9a9ccSGarrett Wollman xdrproc_t, char *, 7886b9a9ccSGarrett Wollman xdrproc_t, char *, 7986b9a9ccSGarrett Wollman bool_t (*)())); 8086b9a9ccSGarrett Wollman extern u_short pmap_getport __P((struct sockaddr_in *, 8186b9a9ccSGarrett Wollman u_long, u_long, u_int)); 8286b9a9ccSGarrett Wollman __END_DECLS 8386b9a9ccSGarrett Wollman 8486b9a9ccSGarrett Wollman #endif /* !_RPC_PMAPCLNT_H */ 85