Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

pmap_clnt.h

Go to the documentation of this file.
00001 /*  $Id$ */
00002 /*      $OpenBSD: pmap_clnt.h,v 1.3 1998/08/29 18:57:14 deraadt Exp $   */
00003 /*      $NetBSD: pmap_clnt.h,v 1.5 1994/12/04 01:12:42 cgd Exp $        */
00004 
00005 /*
00006  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
00007  * unrestricted use provided that this legend is included on all tape
00008  * media and as a part of the software program in whole or part.  Users
00009  * may copy or modify Sun RPC without charge, but are not authorized
00010  * to license or distribute it to anyone else except as part of a product or
00011  * program developed by the user.
00012  * 
00013  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
00014  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
00015  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
00016  * 
00017  * Sun RPC is provided with no support and without any obligation on the
00018  * part of Sun Microsystems, Inc. to assist in its use, correction,
00019  * modification or enhancement.
00020  * 
00021  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
00022  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
00023  * OR ANY PART THEREOF.
00024  * 
00025  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
00026  * or profits or other special, indirect and consequential damages, even if
00027  * Sun has been advised of the possibility of such damages.
00028  * 
00029  * Sun Microsystems, Inc.
00030  * 2550 Garcia Avenue
00031  * Mountain View, California  94043
00032  *
00033  *      from: @(#)pmap_clnt.h 1.11 88/02/08 SMI 
00034  *      @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC
00035  */
00036 
00037 /*
00038  * pmap_clnt.h
00039  * Supplies C routines to get to portmap services.
00040  *
00041  * Copyright (C) 1984, Sun Microsystems, Inc.
00042  */
00043 
00044 /*
00045  * Usage:
00046  *      success = pmap_set(program, version, protocol, port);
00047  *      success = pmap_unset(program, version);
00048  *      port = pmap_getport(address, program, version, protocol);
00049  *      head = pmap_getmaps(address);
00050  *      clnt_stat = pmap_rmtcall(address, program, version, procedure,
00051  *              xdrargs, argsp, xdrres, resp, tout, port_ptr)
00052  *              (works for udp only.) 
00053  *      clnt_stat = clnt_broadcast(program, version, procedure,
00054  *              xdrargs, argsp, xdrres, resp, eachresult)
00055  *              (like pmap_rmtcall, except the call is broadcasted to all
00056  *              locally connected nets.  For each valid response received,
00057  *              the procedure eachresult is called.  Its form is:
00058  *      done = eachresult(resp, raddr)
00059  *              bool_t done;
00060  *              caddr_t resp;
00061  *              struct sockaddr_in raddr;
00062  *              where resp points to the results of the call and raddr is the
00063  *              address if the responder to the broadcast.
00064  */
00065 
00066 #ifndef _RPC_PMAPCLNT_H
00067 #define _RPC_PMAPCLNT_H
00068 #include <sys/cdefs.h>
00069 
00070 __BEGIN_DECLS
00071 extern bool_t           pmap_set        __P((u_long, u_long, u_int, int));
00072 extern bool_t           pmap_unset      __P((u_long, u_long));
00073 extern struct pmaplist  *pmap_getmaps   __P((struct sockaddr_in *));
00074 extern enum clnt_stat   pmap_rmtcall    __P((struct sockaddr_in *,
00075                                              u_long, u_long, u_long,
00076                                              xdrproc_t, caddr_t,
00077                                              xdrproc_t, caddr_t,
00078                                              struct timeval, u_long *));
00079 extern enum clnt_stat   clnt_broadcast  __P((u_long, u_long, u_long,
00080                                              xdrproc_t, char *,
00081                                              xdrproc_t, char *,
00082                                              bool_t (*) __P((caddr_t,
00083                                                 struct sockaddr_in *))));
00084 extern u_short          pmap_getport    __P((struct sockaddr_in *,
00085                                              u_long, u_long, u_int));
00086 __END_DECLS
00087 
00088 #endif /* !_RPC_PMAPCLNT_H */

Generated on Sun May 14 14:51:20 2006 by  doxygen 1.4.2