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 /* 238474SJose.Borrego@Sun.COM * Copyright 2009 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 #ifdef __cplusplus 315331Samw extern "C" { 325331Samw #endif 335331Samw 345331Samw #include <sys/types.h> 358167Samw@Sun.COM #include <smbsrv/smb_ioctl.h> 365331Samw #include <smbsrv/smb_token.h> 375331Samw #include <smbsrv/libsmb.h> 385331Samw #include <smbsrv/libmlsvc.h> 395331Samw 407052Samw extern int smbd_opipe_dsrv_start(void); 417052Samw extern void smbd_opipe_dsrv_stop(void); 425331Samw 436771Sjb150015 extern int smb_share_dsrv_start(void); 446771Sjb150015 extern void smb_share_dsrv_stop(void); 455331Samw 468334SJose.Borrego@Sun.COM extern boolean_t smbd_set_netlogon_cred(void); 478334SJose.Borrego@Sun.COM extern int smbd_locate_dc_start(void); 485331Samw 495331Samw extern smb_token_t *smbd_user_auth_logon(netr_client_t *); 505331Samw extern void smbd_user_nonauth_logon(uint32_t); 515331Samw extern void smbd_user_auth_logoff(uint32_t); 526139Sjb150015 extern uint32_t smbd_join(smb_joininfo_t *); 535331Samw 548334SJose.Borrego@Sun.COM extern void smbd_set_secmode(int); 556771Sjb150015 568871Samw@Sun.COM extern int smbd_vss_get_count(const char *, uint32_t *); 578871Samw@Sun.COM extern void smbd_vss_get_snapshots(const char *, uint32_t, uint32_t *, 588871Samw@Sun.COM uint32_t *, char **); 598871Samw@Sun.COM extern int smbd_vss_map_gmttoken(const char *, char *, char *); 608474SJose.Borrego@Sun.COM 615331Samw typedef struct smbd { 626432Sas200622 const char *s_version; /* smbd version string */ 636432Sas200622 const char *s_pname; /* basename to use for messages */ 646432Sas200622 pid_t s_pid; /* process-ID of current daemon */ 656432Sas200622 uid_t s_uid; /* UID of current daemon */ 666432Sas200622 gid_t s_gid; /* GID of current daemon */ 676432Sas200622 int s_fg; /* Run in foreground */ 688334SJose.Borrego@Sun.COM boolean_t s_shutting_down; /* shutdown control */ 698334SJose.Borrego@Sun.COM volatile uint_t s_sigval; 708334SJose.Borrego@Sun.COM volatile uint_t s_refreshes; 716432Sas200622 boolean_t s_kbound; /* B_TRUE if bound to kernel */ 726432Sas200622 int s_door_lmshr; 736432Sas200622 int s_door_srv; 747052Samw int s_door_opipe; 756432Sas200622 int s_secmode; /* Current security mode */ 769046SJose.Borrego@Sun.COM boolean_t s_nbt_listener_running; 779046SJose.Borrego@Sun.COM boolean_t s_tcp_listener_running; 789046SJose.Borrego@Sun.COM pthread_t s_nbt_listener_id; 799046SJose.Borrego@Sun.COM pthread_t s_tcp_listener_id; 80*9832Samw@Sun.COM boolean_t s_fatal_error; 815331Samw } smbd_t; 825331Samw 835331Samw #ifdef __cplusplus 845331Samw } 855331Samw #endif 865331Samw 875331Samw #endif /* _SMBD_H */ 88