|
||||
File indexing completed on 2025-01-18 10:01:04
0001 /* @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC; from 1.11 88/02/08 SMI */ 0002 /* 0003 * Copyright (c) 2010, Oracle America, Inc. 0004 * 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 * 0010 * * Redistributions of source code must retain the above copyright 0011 * notice, this list of conditions and the following disclaimer. 0012 * 0013 * * Redistributions in binary form must reproduce the above copyright 0014 * notice, this list of conditions and the following disclaimer in 0015 * the documentation and/or other materials provided with the 0016 * distribution. 0017 * 0018 * * Neither the name of the "Oracle America, Inc." nor the names of 0019 * its contributors may be used to endorse or promote products 0020 * derived from this software without specific prior written permission. 0021 * 0022 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 0023 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 0024 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 0025 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 0026 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 0027 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 0028 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 0029 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 0030 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 0031 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 0032 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0033 */ 0034 0035 /* 0036 * pmap_clnt.h 0037 * Supplies C routines to get to portmap services. 0038 */ 0039 0040 #ifndef GSSRPC_PMAP_CLNT_H 0041 #define GSSRPC_PMAP_CLNT_H 0042 0043 /* 0044 * Usage: 0045 * success = pmap_set(program, version, protocol, port); 0046 * success = pmap_unset(program, version); 0047 * port = pmap_getport(address, program, version, protocol); 0048 * head = pmap_getmaps(address); 0049 * clnt_stat = pmap_rmtcall(address, program, version, procedure, 0050 * xdrargs, argsp, xdrres, resp, tout, port_ptr) 0051 * (works for udp only.) 0052 * clnt_stat = clnt_broadcast(program, version, procedure, 0053 * xdrargs, argsp, xdrres, resp, eachresult) 0054 * (like pmap_rmtcall, except the call is broadcasted to all 0055 * locally connected nets. For each valid response received, 0056 * the procedure eachresult is called. Its form is: 0057 * done = eachresult(resp, raddr) 0058 * bool_t done; 0059 * caddr_t resp; 0060 * struct sockaddr_in raddr; 0061 * where resp points to the results of the call and raddr is the 0062 * address if the responder to the broadcast. 0063 */ 0064 0065 GSSRPC__BEGIN_DECLS 0066 extern bool_t pmap_set(rpcprog_t, rpcvers_t, rpcprot_t, u_int); 0067 extern bool_t pmap_unset(rpcprog_t, rpcvers_t); 0068 extern struct pmaplist *pmap_getmaps(struct sockaddr_in *); 0069 enum clnt_stat pmap_rmtcall(struct sockaddr_in *, rpcprog_t, 0070 rpcvers_t, rpcproc_t, xdrproc_t, 0071 caddr_t, xdrproc_t, caddr_t, 0072 struct timeval, rpcport_t *); 0073 0074 typedef bool_t (*resultproc_t)(caddr_t, struct sockaddr_in *); 0075 0076 enum clnt_stat clnt_broadcast(rpcprog_t, rpcvers_t, rpcproc_t, 0077 xdrproc_t, caddr_t, xdrproc_t, 0078 caddr_t, resultproc_t); 0079 extern u_short pmap_getport(struct sockaddr_in *, 0080 rpcprog_t, 0081 rpcvers_t, rpcprot_t); 0082 GSSRPC__END_DECLS 0083 #endif /* !defined(GSSRPC_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 |