|
||||
File indexing completed on 2025-01-18 10:13:01
0001 /* $NetBSD: pmap_clnt.h,v 1.9 2000/06/02 22:57:55 fvdl Exp $ */ 0002 0003 /* 0004 * Copyright (c) 2009, Sun Microsystems, Inc. 0005 * All rights reserved. 0006 * 0007 * Redistribution and use in source and binary forms, with or without 0008 * modification, are permitted provided that the following conditions are met: 0009 * - Redistributions of source code must retain the above copyright notice, 0010 * this list of conditions and the following disclaimer. 0011 * - Redistributions in binary form must reproduce the above copyright notice, 0012 * this list of conditions and the following disclaimer in the documentation 0013 * and/or other materials provided with the distribution. 0014 * - Neither the name of Sun Microsystems, Inc. nor the names of its 0015 * contributors may be used to endorse or promote products derived 0016 * from this software without specific prior written permission. 0017 * 0018 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 0019 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 0020 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 0021 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 0022 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 0023 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 0024 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0025 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0026 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 0027 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 0028 * POSSIBILITY OF SUCH DAMAGE. 0029 * 0030 * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI 0031 * from: @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC 0032 * $FreeBSD: src/include/rpc/pmap_clnt.h,v 1.14 2002/04/28 15:18:45 des Exp $ 0033 */ 0034 0035 /* 0036 * pmap_clnt.h 0037 * Supplies C routines to get to portmap services. 0038 * 0039 * Copyright (C) 1984, Sun Microsystems, Inc. 0040 */ 0041 0042 /* 0043 * Usage: 0044 * success = pmap_set(program, version, protocol, port); 0045 * success = pmap_unset(program, version); 0046 * port = pmap_getport(address, program, version, protocol); 0047 * head = pmap_getmaps(address); 0048 * clnt_stat = pmap_rmtcall(address, program, version, procedure, 0049 * xdrargs, argsp, xdrres, resp, tout, port_ptr) 0050 * (works for udp only.) 0051 * clnt_stat = clnt_broadcast(program, version, procedure, 0052 * xdrargs, argsp, xdrres, resp, eachresult) 0053 * (like pmap_rmtcall, except the call is broadcasted to all 0054 * locally connected nets. For each valid response received, 0055 * the procedure eachresult is called. Its form is: 0056 * done = eachresult(resp, raddr) 0057 * bool_t done; 0058 * caddr_t resp; 0059 * struct sockaddr_in raddr; 0060 * where resp points to the results of the call and raddr is the 0061 * address if the responder to the broadcast. 0062 */ 0063 0064 #ifndef _RPC_PMAP_CLNT_H_ 0065 #define _RPC_PMAP_CLNT_H_ 0066 0067 #include <rpc/types.h> 0068 #include <rpc/xdr.h> 0069 #include <rpc/clnt.h> 0070 0071 #ifdef __cplusplus 0072 extern "C" { 0073 #endif 0074 extern bool_t pmap_set(u_long, u_long, int, int); 0075 extern bool_t pmap_unset(u_long, u_long); 0076 extern struct pmaplist *pmap_getmaps(struct sockaddr_in *); 0077 extern enum clnt_stat pmap_rmtcall(struct sockaddr_in *, 0078 u_long, u_long, u_long, 0079 xdrproc_t, caddr_t, 0080 xdrproc_t, caddr_t, 0081 struct timeval, u_long *); 0082 extern enum clnt_stat clnt_broadcast(u_long, u_long, u_long, 0083 xdrproc_t, void *, 0084 xdrproc_t, void *, 0085 resultproc_t); 0086 extern u_short pmap_getport(struct sockaddr_in *, 0087 u_long, u_long, u_int); 0088 #ifdef __cplusplus 0089 } 0090 #endif 0091 0092 #endif /* !_RPC_PMAP_CLNT_H_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |