]> git.ipfire.org Git - thirdparty/squid.git/blame - helpers/basic_auth/MSNT/smblib.h
Author: Alex Rousskov <rousskov@measurement-factory.com>
[thirdparty/squid.git] / helpers / basic_auth / MSNT / smblib.h
CommitLineData
94439e4e 1/* UNIX SMBlib NetBIOS implementation
26ac0430 2 *
94439e4e 3 * Version 1.0
4 * SMBlib Defines
26ac0430 5 *
94439e4e 6 * Copyright (C) Richard Sharpe 1996
26ac0430 7 *
94439e4e 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.
26ac0430 15 *
94439e4e 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.
26ac0430 20 *
94439e4e 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#include "std-defines.h"
27#include "smblib-common.h"
28
29/* Just define all the entry points */
30
31/* Create a handle to allow us to set/override some parameters ... */
32
c06f9773 33SMB_Handle_Type SMB_Create_Con_Handle(void);
94439e4e 34
35/* Connect to a server, but do not do a tree con etc ... */
36
37SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type, char *server, char *NTdomain);
38
39/* Connect to a server and give us back a handle. If Con == NULL, create */
40/* The handle and populate it with defaults */
41
42SMB_Handle_Type SMB_Connect(SMB_Handle_Type Con_Handle,
26ac0430
AJ
43 SMB_Tree_Handle * tree,
44 char *service,
45 char *username,
46 char *password);
94439e4e 47
48/* Negotiate a protocol */
49
c06f9773 50int SMB_Negotiate(SMB_Handle_Type Con_Handle, const char *Prots[]);
94439e4e 51
52/* Connect to a tree ... */
53
c06f9773 54SMB_Tree_Handle SMB_TreeConnect(SMB_Handle_Type con_handle, SMB_Tree_Handle tree_handle,
26ac0430 55 char *path, char *password, const char *dev);
94439e4e 56
57/* Disconnect a tree ... */
58
59int SMB_TreeDisconect(void *tree_handle);
60
61/* Open a file */
62
63void *SMB_Open(void *tree_handle,
26ac0430
AJ
64 void *file_handle,
65 char *file_name,
66 unsigned short mode,
67 unsigned short search);
94439e4e 68
69/* Close a file */
70
71int SMB_Close(void *file_handle);
72
73/* Disconnect from server. Has flag to specify whether or not we keep the */
74/* handle. */
75
76int SMB_Discon(SMB_Handle_Type Con_Handle, BOOL KeepHandle);
77
78void *SMB_Create(void *Tree_Handle,
26ac0430
AJ
79 void *File_Handle,
80 char *file_name,
81 short search);
94439e4e 82
83int SMB_Delete(void *tree, char *file_name, short search);
84
85int SMB_Create_Dir(void *tree, char *dir_name);
86
87int SMB_Delete_Dir(void *tree, char *dir_name);
88
89int SMB_Check_Dir(void *tree, char *dir_name);
90
c06f9773 91int SMB_Get_Last_Error(void);
94439e4e 92
c06f9773 93int SMB_Get_Last_SMB_Err(void);
94439e4e 94
c06f9773 95void SMB_Get_Error_Msg(int msg, char *msgbuf, int len);
94439e4e 96
97void *SMB_Logon_And_TCon(void *con, void *tree, char *user, char *pass,
26ac0430 98 char *service, char *st);
c06f9773 99
100void SMB_Get_My_Name(char *, int);
101
102int SMB_Init(void);
103
104extern int SMB_Logon_Server(SMB_Handle_Type, char *, char *);
105