xref: /onnv-gate/usr/src/cmd/smbsrv/smbd/smbd.h (revision 7052:efa04b030974)
15331Samw /*
25331Samw  * CDDL HEADER START
35331Samw  *
45331Samw  * The contents of this file are subject to the terms of the
55331Samw  * Common Development and Distribution License (the "License").
65331Samw  * You may not use this file except in compliance with the License.
75331Samw  *
85331Samw  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
95331Samw  * or http://www.opensolaris.org/os/licensing.
105331Samw  * See the License for the specific language governing permissions
115331Samw  * and limitations under the License.
125331Samw  *
135331Samw  * When distributing Covered Code, include this CDDL HEADER in each
145331Samw  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
155331Samw  * If applicable, add the following below this CDDL HEADER, with the
165331Samw  * fields enclosed by brackets "[]" replaced with your own identifying
175331Samw  * information: Portions Copyright [yyyy] [name of copyright owner]
185331Samw  *
195331Samw  * CDDL HEADER END
205331Samw  */
215331Samw 
225331Samw /*
236030Sjb150015  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
245331Samw  * Use is subject to license terms.
255331Samw  */
265331Samw 
275331Samw #ifndef _SMBD_H
285331Samw #define	_SMBD_H
295331Samw 
305331Samw #pragma ident	"%Z%%M%	%I%	%E% SMI"
315331Samw 
325331Samw #ifdef __cplusplus
335331Samw extern "C" {
345331Samw #endif
355331Samw 
365331Samw #include <sys/types.h>
375331Samw #include <smbsrv/smb_token.h>
385331Samw #include <smbsrv/libsmb.h>
395331Samw #include <smbsrv/libmlsvc.h>
405331Samw 
41*7052Samw extern int smbd_opipe_dsrv_start(void);
42*7052Samw extern void smbd_opipe_dsrv_stop(void);
435331Samw 
446771Sjb150015 extern int smb_share_dsrv_start(void);
456771Sjb150015 extern void smb_share_dsrv_stop(void);
465331Samw 
475331Samw extern int smb_netlogon_init(void);
486139Sjb150015 extern void smb_set_netlogon_cred(void);
495331Samw 
505331Samw extern smb_token_t *smbd_user_auth_logon(netr_client_t *);
515331Samw extern void smbd_user_nonauth_logon(uint32_t);
525331Samw extern void smbd_user_auth_logoff(uint32_t);
536139Sjb150015 extern uint32_t smbd_join(smb_joininfo_t *);
545331Samw 
556771Sjb150015 
565331Samw typedef struct smbd {
576432Sas200622 	const char	*s_version;	/* smbd version string */
586432Sas200622 	const char	*s_pname;	/* basename to use for messages */
596432Sas200622 	pid_t		s_pid;		/* process-ID of current daemon */
606432Sas200622 	uid_t		s_uid;		/* UID of current daemon */
616432Sas200622 	gid_t		s_gid;		/* GID of current daemon */
626432Sas200622 	int		s_fg;		/* Run in foreground */
636432Sas200622 	int		s_drv_fd;	/* Handle for SMB kernel driver */
646432Sas200622 	int		s_shutdown_flag; /* Fields for shutdown control */
656432Sas200622 	int		s_sigval;
666432Sas200622 	boolean_t	s_kbound;	/* B_TRUE if bound to kernel */
676432Sas200622 	int		s_door_lmshr;
686432Sas200622 	int		s_door_srv;
69*7052Samw 	int		s_door_opipe;
706432Sas200622 	int		s_secmode;	/* Current security mode */
716432Sas200622 	smb_kmod_cfg_t	s_kcfg;		/* Current Kernel configuration */
725331Samw } smbd_t;
735331Samw 
745331Samw #ifdef __cplusplus
755331Samw }
765331Samw #endif
775331Samw 
785331Samw #endif /* _SMBD_H */
79