xref: /titanic_41/usr/src/cmd/fs.d/nfs/mountd/mountd.h (revision b71850598a2db561ea000776fd51cc0bdc94c188)
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 
23 /*
24  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
25  * Use is subject to license terms.
26  */
27 
28 #ifndef	_MOUNTD_H
29 #define	_MOUNTD_H
30 
31 #pragma ident	"%Z%%M%	%I%	%E% SMI"
32 
33 #include <nfs/nfs.h>
34 
35 #ifdef	__cplusplus
36 extern "C" {
37 #endif
38 
39 #define	MAXIPADDRLEN	512
40 
41 struct nd_hostservlist;
42 extern void rmtab_load(void);
43 extern void mntlist_send(SVCXPRT *transp);
44 extern void mntlist_new(char *host, char *path);
45 extern void mntlist_delete(char *host, char *path);
46 extern void mntlist_delete_all(char *host);
47 extern void netgroup_init(void);
48 extern int  netgroup_check(struct nd_hostservlist *, char *, int);
49 extern void export(struct svc_req *);
50 extern int svc_create_local_service(void (*) (), ulong_t, ulong_t,
51 					char *, char *);
52 extern char *inet_ntoa_r(struct in_addr, char *);
53 extern int nfs_getfh(char *, fhandle_t *);
54 
55 extern void nfsauth_prog(struct svc_req *, SVCXPRT *);
56 
57 extern struct sh_list *share_list;
58 extern rwlock_t sharetab_lock;
59 extern void check_sharetab(void);
60 
61 extern void log_cant_reply(SVCXPRT *);
62 
63 extern void *exmalloc(size_t);
64 
65 extern struct share *findentry(char *);
66 extern int check_client(struct share *, struct netbuf *,
67 				struct nd_hostservlist *, int);
68 extern struct nd_hostservlist *anon_client(char *host);
69 
70 /*
71  * These functions are defined here due to the fact
72  * that we can not find the proper header file to
73  * include. These functions are, at present, not
74  * listed in any other header files.
75  */
76 /*
77  * These three functions are hidden functions in the
78  * bsm libraries (libbsm).
79  */
80 extern void audit_mountd_setup(void);
81 extern void audit_mountd_mount(char *, char *, int);
82 extern void audit_mountd_umount(char *, char *);
83 
84 /*
85  * This is a hidden function in the rpc libraries (libnsl).
86  */
87 extern int __rpc_negotiate_uid(int);
88 
89 /*
90  * This appears to be a hidden function in libc.
91  * Private interface to nss_search().
92  * Accepts N strings rather than 1.
93  */
94 extern  int __multi_innetgr();
95 
96 #ifdef	__cplusplus
97 }
98 #endif
99 
100 #endif	/* _MOUNTD_H */
101