2 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 /* UNIX SMBlib NetBIOS implementation
14 Copyright (C) Richard Sharpe 1996
18 This program is free software; you can redistribute it and/or modify
19 it under the terms of the GNU General Public License as published by
20 the Free Software Foundation; either version 2 of the License, or
21 (at your option) any later version.
23 This program is distributed in the hope that it will be useful,
24 but WITHOUT ANY WARRANTY; without even the implied warranty of
25 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 GNU General Public License for more details.
28 You should have received a copy of the GNU General Public License
29 along with this program; if not, write to the Free Software
30 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 #ifndef _SMBLIB_SMBLIB_H
34 #define _SMBLIB_SMBLIB_H
36 #include "smblib-common.h"
37 #include "smblib/smbencrypt.h"
38 #include "std-defines.h"
44 /* Just define all the entry points */
46 /* Create a handle to allow us to set/override some parameters ... */
48 SMB_Handle_Type
SMB_Create_Con_Handle(void);
50 /* Connect to a server, but do not do a tree con etc ... */
52 SMB_Handle_Type
SMB_Connect_Server(SMB_Handle_Type Con_Handle
,
54 const char *NTdomain
);
56 /* Connect to a server and give us back a handle. If Con == NULL, create */
57 /* The handle and populate it with defaults */
59 SMB_Handle_Type
SMB_Connect(SMB_Handle_Type Con_Handle
,
60 SMB_Tree_Handle
*tree
,
67 int SMB_Logon_Server(SMB_Handle_Type Con_Handle
,
73 /* Negotiate a protocol */
75 int SMB_Negotiate(SMB_Handle_Type Con_Handle
, const char *Prots
[]);
77 /* Connect to a tree ... */
79 SMB_Tree_Handle
SMB_TreeConnect(SMB_Handle_Type con
,
85 /* Disconnect a tree ... */
87 int SMB_TreeDisconect(void *tree_handle
);
91 void *SMB_Open(void *tree_handle
,
95 unsigned short search
);
99 int SMB_Close(void *file_handle
);
101 /* Disconnect from server. Has flag to specify whether or not we keep the */
104 int SMB_Discon(SMB_Handle_Type Con_Handle
, BOOL KeepHandle
);
106 void *SMB_Create(void *Tree_Handle
,
111 int SMB_Delete(void *tree
, char *file_name
, short search
);
113 int SMB_Create_Dir(void *tree
, char *dir_name
);
115 int SMB_Delete_Dir(void *tree
, char *dir_name
);
117 int SMB_Check_Dir(void *tree
, char *dir_name
);
119 int SMB_Get_Last_Error(void);
121 int SMB_Get_Last_SMB_Err(void);
123 void SMB_Get_Error_Msg(int msg
, char *msgbuf
, int len
);
125 void *SMB_Logon_And_TCon(void *con
, void *tree
, char *user
, char *pass
,
126 char *service
, char *st
);
131 #endif /* _SMBLIB_SMBLIB_H */