xref: /illumos-gate/usr/src/uts/common/rpc/rpcent.h (revision ddb365bfc9e868ad24ccdcb0dc91af18b10df082)
1 /*
2  * CDDL HEADER START
3  *
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
7  * with the License.
8  *
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.
13  *
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]
19  *
20  * CDDL HEADER END
21  *
22  * Copyright 1991 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
26 /* All Rights Reserved */
27 /*
28  * Portions of this source code were derived from Berkeley
29  * 4.3 BSD under license from the Regents of the University of
30  * California.
31  */
32 
33 /*
34  * rpcent.h,
35  * For converting rpc program numbers to names etc.
36  *
37  */
38 
39 #ifndef _RPC_RPCENT_H
40 #define	_RPC_RPCENT_H
41 
42 #ifdef	__cplusplus
43 extern "C" {
44 #endif
45 
46 struct rpcent {
47 	char	*r_name;	/* name of server for this rpc program */
48 	char	**r_aliases;	/* alias list */
49 	int	r_number;	/* rpc program number */
50 };
51 
52 #ifdef __STDC__
53 extern struct rpcent *getrpcbyname_r
54 		(const char *,	  struct rpcent *, char *, int);
55 extern struct rpcent *getrpcbynumber_r
56 		(const int,	  struct rpcent *, char *, int);
57 extern struct rpcent *getrpcent_r(struct rpcent *, char *, int);
58 
59 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
60 extern struct rpcent *getrpcbyname(const char *);
61 extern struct rpcent *getrpcbynumber(const int);
62 extern struct rpcent *getrpcent(void);
63 extern void setrpcent(const int);
64 extern void endrpcent(void);
65 #else
66 extern struct rpcent *getrpcbyname_r();
67 extern struct rpcent *getrpcbynumber_r();
68 extern struct rpcent *getrpcent_r();
69 
70 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
71 extern struct rpcent *getrpcbyname();
72 extern struct rpcent *getrpcbynumber();
73 extern struct rpcent *getrpcent();
74 extern void setrpcent();
75 extern void endrpcent();
76 #endif
77 
78 #ifdef	__cplusplus
79 }
80 #endif
81 
82 #endif	/* _RPC_RPCENT_H */
83