]> git.ipfire.org Git - thirdparty/squid.git/blame - lib/smblib/smblib.h
SourceFormat Enforcement
[thirdparty/squid.git] / lib / smblib / smblib.h
CommitLineData
94439e4e 1/* UNIX SMBlib NetBIOS implementation
7c16470c
AJ
2
3 Version 1.0
4 SMBlib Defines
5
6 Copyright (C) Richard Sharpe 1996
7
8*/
94439e4e 9
10/*
7c16470c
AJ
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
94439e4e 28
94439e4e 29#include "smblib-common.h"
7c16470c 30#include "smblib/smbencrypt.h"
602d9612 31#include "std-defines.h"
7c16470c
AJ
32
33#ifdef __cplusplus
34extern "C" {
35#endif
94439e4e 36
3c96dd46 37 /* Just define all the entry points */
94439e4e 38
3c96dd46 39 /* Create a handle to allow us to set/override some parameters ... */
94439e4e 40
3c96dd46 41 SMB_Handle_Type SMB_Create_Con_Handle(void);
94439e4e 42
3c96dd46 43 /* Connect to a server, but do not do a tree con etc ... */
94439e4e 44
3c96dd46
A
45 SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle,
46 char *server,
47 const char *NTdomain);
94439e4e 48
3c96dd46
A
49 /* Connect to a server and give us back a handle. If Con == NULL, create */
50 /* The handle and populate it with defaults */
94439e4e 51
3c96dd46
A
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);
94439e4e 57
3c96dd46 58 int SMB_Init(void);
7c16470c 59
3c96dd46
A
60 int SMB_Logon_Server(SMB_Handle_Type Con_Handle,
61 char *UserName,
62 char *PassWord,
63 const char *NtDomain,
64 int PreCrypted);
7c16470c 65
3c96dd46 66 /* Negotiate a protocol */
94439e4e 67
3c96dd46 68 int SMB_Negotiate(SMB_Handle_Type Con_Handle, const char *Prots[]);
94439e4e 69
3c96dd46 70 /* Connect to a tree ... */
94439e4e 71
3c96dd46
A
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);
94439e4e 77
3c96dd46 78 /* Disconnect a tree ... */
94439e4e 79
3c96dd46 80 int SMB_TreeDisconect(void *tree_handle);
94439e4e 81
3c96dd46 82 /* Open a file */
94439e4e 83
3c96dd46
A
84 void *SMB_Open(void *tree_handle,
85 void *file_handle,
86 char *file_name,
87 unsigned short mode,
88 unsigned short search);
94439e4e 89
3c96dd46 90 /* Close a file */
94439e4e 91
3c96dd46 92 int SMB_Close(void *file_handle);
94439e4e 93
3c96dd46
A
94 /* Disconnect from server. Has flag to specify whether or not we keep the */
95 /* handle. */
94439e4e 96
3c96dd46 97 int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle);
94439e4e 98
3c96dd46
A
99 void *SMB_Create(void *Tree_Handle,
100 void *File_Handle,
101 char *file_name,
102 short search);
94439e4e 103
3c96dd46 104 int SMB_Delete(void *tree, char *file_name, short search);
94439e4e 105
3c96dd46 106 int SMB_Create_Dir(void *tree, char *dir_name);
94439e4e 107
3c96dd46 108 int SMB_Delete_Dir(void *tree, char *dir_name);
94439e4e 109
3c96dd46 110 int SMB_Check_Dir(void *tree, char *dir_name);
94439e4e 111
3c96dd46 112 int SMB_Get_Last_Error(void);
94439e4e 113
3c96dd46 114 int SMB_Get_Last_SMB_Err(void);
94439e4e 115
3c96dd46 116 void SMB_Get_Error_Msg(int msg, char *msgbuf, int len);
94439e4e 117
3c96dd46
A
118 void *SMB_Logon_And_TCon(void *con, void *tree, char *user, char *pass,
119 char *service, char *st);
c06f9773 120
7c16470c
AJ
121#ifdef __cplusplus
122}
123#endif
124#endif /* _SMBLIB_SMBLIB_H */