xref: /titanic_41/usr/src/cmd/smbsrv/smbd/smbd.h (revision d4660949aa62dd6a963f4913b7120b383cf473c4)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SMBD_H
28 #define	_SMBD_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 #include <sys/types.h>
37 #include <smbsrv/smb_token.h>
38 #include <smbsrv/libsmb.h>
39 #include <smbsrv/libmlsvc.h>
40 
41 extern int smb_winpipe_doorsvc_start(void);
42 extern void smb_winpipe_doorsvc_stop(void);
43 extern int smb_lmshrd_srv_start(void);
44 extern void smb_lmshrd_srv_stop(void);
45 
46 extern int smb_doorsrv_start(void);
47 extern void smb_doorsrv_stop(void);
48 extern int smb_ntgroup_doorsrv_start(void);
49 extern void smb_ntgroup_doorsrv_stop(void);
50 
51 extern int smb_netlogon_init(void);
52 extern void smb_set_netlogon_cred(void);
53 
54 extern smb_token_t *smbd_user_auth_logon(netr_client_t *);
55 extern void smbd_user_nonauth_logon(uint32_t);
56 extern void smbd_user_auth_logoff(uint32_t);
57 extern uint32_t smbd_join(smb_joininfo_t *);
58 
59 typedef struct smbd {
60 	const char	*s_version;	/* smbd version string */
61 	const char	*s_pname;	/* basename to use for messages */
62 	pid_t		s_pid;		/* process-ID of current daemon */
63 	uid_t		s_uid;		/* UID of current daemon */
64 	gid_t		s_gid;		/* GID of current daemon */
65 	int		s_fg;		/* Run in foreground */
66 	int		s_drv_fd;	/* Handle for SMB kernel driver */
67 	int		s_shutdown_flag; /* Fields for shutdown control */
68 	int		s_sigval;
69 	boolean_t	s_kbound;	/* B_TRUE if bound to kernel */
70 	int		s_door_lmshr;
71 	int		s_door_srv;
72 	int		s_door_winpipe;
73 	int		s_secmode;	/* Current security mode */
74 	smb_kmod_cfg_t	s_kcfg;		/* Current Kernel configuration */
75 } smbd_t;
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif /* _SMBD_H */
82