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 #ifndef _SMBLIB_SMBLIB_H
27 #define _SMBLIB_SMBLIB_H
29 #include "smblib-common.h"
30 #include "smblib/smbencrypt.h"
31 #include "std-defines.h"
37 /* Just define all the entry points */
39 /* Create a handle to allow us to set/override some parameters ... */
41 SMB_Handle_Type
SMB_Create_Con_Handle(void);
43 /* Connect to a server, but do not do a tree con etc ... */
45 SMB_Handle_Type
SMB_Connect_Server(SMB_Handle_Type Con_Handle
,
47 const char *NTdomain
);
49 /* Connect to a server and give us back a handle. If Con == NULL, create */
50 /* The handle and populate it with defaults */
52 SMB_Handle_Type
SMB_Connect(SMB_Handle_Type Con_Handle
,
53 SMB_Tree_Handle
*tree
,
60 int SMB_Logon_Server(SMB_Handle_Type Con_Handle
,
66 /* Negotiate a protocol */
68 int SMB_Negotiate(SMB_Handle_Type Con_Handle
, const char *Prots
[]);
70 /* Connect to a tree ... */
72 SMB_Tree_Handle
SMB_TreeConnect(SMB_Handle_Type con
,
78 /* Disconnect a tree ... */
80 int SMB_TreeDisconect(void *tree_handle
);
84 void *SMB_Open(void *tree_handle
,
88 unsigned short search
);
92 int SMB_Close(void *file_handle
);
94 /* Disconnect from server. Has flag to specify whether or not we keep the */
97 int SMB_Discon(SMB_Handle_Type Con_Handle
, BOOL KeepHandle
);
99 void *SMB_Create(void *Tree_Handle
,
104 int SMB_Delete(void *tree
, char *file_name
, short search
);
106 int SMB_Create_Dir(void *tree
, char *dir_name
);
108 int SMB_Delete_Dir(void *tree
, char *dir_name
);
110 int SMB_Check_Dir(void *tree
, char *dir_name
);
112 int SMB_Get_Last_Error(void);
114 int SMB_Get_Last_SMB_Err(void);
116 void SMB_Get_Error_Msg(int msg
, char *msgbuf
, int len
);
118 void *SMB_Logon_And_TCon(void *con
, void *tree
, char *user
, char *pass
,
119 char *service
, char *st
);
124 #endif /* _SMBLIB_SMBLIB_H */