xref: /onnv-gate/usr/src/lib/smbsrv/libsmbrdr/common/libsmbrdr.h (revision 10504:ee04788f8605)
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  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_LIBSMBRDR_H
27 #define	_LIBSMBRDR_H
28 
29 #include <smbsrv/libsmb.h>
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 typedef struct smbrdr_session_info {
36 	int si_server_os;
37 	int si_server_lm;
38 	int si_dc_type;
39 } smbrdr_session_info_t;
40 
41 /*
42  * Redirector IPC functions
43  *
44  * The following functions are required by the mlsvc_join to
45  * apply new authentication information for the authenticated IPC, rollback
46  * or commit the changes to the original authentication information.
47  */
48 extern void smbrdr_ipc_set(char *, unsigned char *);
49 extern void smbrdr_ipc_commit(void);
50 extern void smbrdr_ipc_rollback(void);
51 extern char *smbrdr_ipc_get_user(void);
52 extern unsigned char *smbrdr_ipc_get_passwd(void);
53 
54 
55 /* Redirector LOGON function */
56 extern int mlsvc_logon(char *, char *, char *);
57 extern int smbrdr_get_ssnkey(int, unsigned char *, size_t);
58 
59 /* Redirector named pipe functions */
60 extern int smbrdr_open_pipe(char *, char *, char *, char *);
61 extern int smbrdr_close_pipe(int);
62 extern int smbrdr_readx(int, char *, int);
63 extern int smbrdr_transact(int, char *, int, char *, int);
64 
65 /* Redirector session functions */
66 extern void smbrdr_init(void);
67 extern int smbrdr_session_info(int, smbrdr_session_info_t *);
68 extern int mlsvc_echo(char *);
69 extern void mlsvc_disconnect(char *);
70 
71 /* DEBUG functions */
72 extern void smbrdr_dump_ofiles(void);
73 extern void smbrdr_dump_sessions(void);
74 extern void smbrdr_dump_netuse();
75 
76 #ifdef	__cplusplus
77 }
78 #endif
79 
80 #endif	/* _LIBSMBRDR_H */
81