4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
26 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
27 /* All Rights Reserved */
29 * Portions of this source code were derived from Berkeley
30 * 4.3 BSD under license from the Regents of the University of
34 #ifndef _RPC_PMAP_CLNT_H
35 #define _RPC_PMAP_CLNT_H
37 #pragma ident "%Z%%M% %I% %E% SMI"
42 * Supplies C routines to get to portmap services.
45 #include <netinet/in.h>
57 * success = pmap_set(program, version, protocol, port);
58 * success = pmap_unset(program, version);
59 * port = pmap_getport(address, program, version, protocol);
60 * head = pmap_getmaps(address);
61 * clnt_stat = pmap_rmtcall(address, program, version, procedure,
62 * xdrargs, argsp, xdrres, resp, tout, port_ptr)
63 * (works for udp only.)
64 * clnt_stat = clnt_broadcast(program, version, procedure,
65 * xdrargs, argsp, xdrres, resp, eachresult)
66 * (like pmap_rmtcall, except the call is broadcasted to all
67 * locally connected nets. For each valid response received,
68 * the procedure eachresult is called. Its form is:
69 * done = eachresult(resp, raddr)
72 * struct sockaddr_in raddr;
73 * where resp points to the results of the call and raddr is the
74 * address if the responder to the broadcast.
78 extern bool_t
pmap_set(rpcprog_t
, rpcvers_t
, rpcprot_t
, unsigned short port
);
79 extern bool_t
pmap_unset(rpcprog_t
, rpcvers_t
);
80 extern struct pmaplist
*pmap_getmaps(struct sockaddr_in
*);
81 extern ushort_t
pmap_getport(struct sockaddr_in
*, rpcprog_t
, rpcvers_t
,
84 enum clnt_stat
clnt_broadcast(rpcprog_t
, rpcvers_t
, rpcproc_t
, xdrproc_t
,
85 char *, xdrproc_t
, char *, resultproc_t
);
86 enum clnt_stat
pmap_rmtcall(struct sockaddr_in
*, rpcprog_t
, rpcvers_t
,
87 rpcproc_t
, xdrproc_t
, caddr_t
, xdrproc_t
, caddr_t
, struct timeval
,
91 extern bool_t
pmap_set();
92 extern bool_t
pmap_unset();
93 extern struct pmaplist
*pmap_getmaps();
94 extern ushort_t
pmap_getport();
96 enum clnt_stat
clnt_broadcast();
97 enum clnt_stat
pmap_rmtcall();
105 #endif /* _RPC_PMAP_CLNT_H */