]> git.ipfire.org Git - thirdparty/squid.git/blob - lib/smblib/smblib.h
Sync with trunk rev.13542
[thirdparty/squid.git] / lib / smblib / smblib.h
1 /* UNIX SMBlib NetBIOS implementation
2
3 Version 1.0
4 SMBlib Defines
5
6 Copyright (C) Richard Sharpe 1996
7
8 */
9
10 /*
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */
25
26 #ifndef _SMBLIB_SMBLIB_H
27 #define _SMBLIB_SMBLIB_H
28
29 #include "smblib-common.h"
30 #include "smblib/smbencrypt.h"
31 #include "std-defines.h"
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 /* Just define all the entry points */
38
39 /* Create a handle to allow us to set/override some parameters ... */
40
41 SMB_Handle_Type SMB_Create_Con_Handle(void);
42
43 /* Connect to a server, but do not do a tree con etc ... */
44
45 SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle,
46 char *server,
47 const char *NTdomain);
48
49 /* Connect to a server and give us back a handle. If Con == NULL, create */
50 /* The handle and populate it with defaults */
51
52 SMB_Handle_Type SMB_Connect(SMB_Handle_Type Con_Handle,
53 SMB_Tree_Handle *tree,
54 char *service,
55 char *username,
56 char *password);
57
58 int SMB_Init(void);
59
60 int SMB_Logon_Server(SMB_Handle_Type Con_Handle,
61 char *UserName,
62 char *PassWord,
63 const char *NtDomain,
64 int PreCrypted);
65
66 /* Negotiate a protocol */
67
68 int SMB_Negotiate(SMB_Handle_Type Con_Handle, const char *Prots[]);
69
70 /* Connect to a tree ... */
71
72 SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type con,
73 SMB_Tree_Handle tree,
74 const char *path,
75 const char *password,
76 const char *dev);
77
78 /* Disconnect a tree ... */
79
80 int SMB_TreeDisconect(void *tree_handle);
81
82 /* Open a file */
83
84 void *SMB_Open(void *tree_handle,
85 void *file_handle,
86 char *file_name,
87 unsigned short mode,
88 unsigned short search);
89
90 /* Close a file */
91
92 int SMB_Close(void *file_handle);
93
94 /* Disconnect from server. Has flag to specify whether or not we keep the */
95 /* handle. */
96
97 int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle);
98
99 void *SMB_Create(void *Tree_Handle,
100 void *File_Handle,
101 char *file_name,
102 short search);
103
104 int SMB_Delete(void *tree, char *file_name, short search);
105
106 int SMB_Create_Dir(void *tree, char *dir_name);
107
108 int SMB_Delete_Dir(void *tree, char *dir_name);
109
110 int SMB_Check_Dir(void *tree, char *dir_name);
111
112 int SMB_Get_Last_Error(void);
113
114 int SMB_Get_Last_SMB_Err(void);
115
116 void SMB_Get_Error_Msg(int msg, char *msgbuf, int len);
117
118 void *SMB_Logon_And_TCon(void *con, void *tree, char *user, char *pass,
119 char *service, char *st);
120
121 #ifdef __cplusplus
122 }
123 #endif
124 #endif /* _SMBLIB_SMBLIB_H */