1 /* UNIX SMBlib NetBIOS implementation
6 Copyright (C) Richard Sharpe 1996
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.
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.
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.
26 #include "std-defines.h"
27 #include "smblib-common.h"
29 /* Just define all the entry points */
31 /* Create a handle to allow us to set/override some parameters ... */
33 void *SMB_Create_Con_Handle();
35 /* Connect to a server, but do not do a tree con etc ... */
37 void *SMB_Connect_Server(void *Con, char *server, char *NTdomain);
39 /* Connect to a server and give us back a handle. If Con == NULL, create */
40 /* The handle and populate it with defaults */
42 void *SMB_Connect(void *Con, void **tree,
43 char *name, char *User, char *Password);
45 /* Negotiate a protocol */
47 int SMB_Negotiate(void *Con_Handle, char *Prots[]);
49 /* Connect to a tree ... */
51 void *SMB_TreeConnect(void *con_handle, void *tree_handle,
52 char *path, char *password, char *dev);
54 /* Disconnect a tree ... */
56 int SMB_TreeDisconect(void *tree_handle);
60 void *SMB_Open(void *tree_handle,
64 unsigned short search);
68 int SMB_Close(void *file_handle);
70 /* Disconnect from server. Has flag to specify whether or not we keep the */
73 int SMB_Discon(void *Con, BOOL KeepHandle);
75 void *SMB_Create(void *Tree_Handle,
80 int SMB_Delete(void *tree, char *file_name, short search);
82 int SMB_Create_Dir(void *tree, char *dir_name);
84 int SMB_Delete_Dir(void *tree, char *dir_name);
86 int SMB_Check_Dir(void *tree, char *dir_name);
88 int SMB_Get_Last_Error();
90 int SMB_Get_Last_SMB_Err();
92 int SMB_Get_Error_Msg(int msg, char *msgbuf, int len);
94 void *SMB_Logon_And_TCon(void *con, void *tree, char *user, char *pass,
95 char *service, char *st);
97 #define SMBLIB_DEFAULT_DOMAIN "anydom"