few edits
[Samba.git] / source / smbwrapper / smbw.h
blobd059b20c788873dc4646f9d1fe8dac104f15c9bb
1 /*
2 Unix SMB/Netbios implementation.
3 Version 2.0
4 SMB wrapper functions - definitions
5 Copyright (C) Andrew Tridgell 1998
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #ifndef _SMBW_H
23 #define _SMBW_H
25 #define SMBW_PREFIX "/smb/"
26 #define SMBW_DUMMY "/dev/null"
28 #define SMBW_CLI_FD 512
29 #define SMBW_MAX_OPEN 8192
31 #define SMBW_FILE_MODE (S_IFREG | 0444)
32 #define SMBW_DIR_MODE (S_IFDIR | 0555)
34 struct smbw_server {
35 struct smbw_server *next, *prev;
36 struct cli_state cli;
37 char *server_name;
38 char *share_name;
39 char *workgroup;
40 char *username;
41 dev_t dev;
42 BOOL no_pathinfo2;
45 struct smbw_filedes {
46 int cli_fd;
47 int ref_count;
48 char *fname;
49 off_t offset;
52 struct smbw_file {
53 struct smbw_file *next, *prev;
54 struct smbw_filedes *f;
55 int fd;
56 struct smbw_server *srv;
59 struct smbw_dir {
60 struct smbw_dir *next, *prev;
61 int fd;
62 int offset, count, malloced;
63 struct smbw_server *srv;
64 struct file_info *list;
65 char *path;
68 typedef void (*smbw_get_auth_data_fn)(char *server, char *share,
69 char **workgroup, char **username,
70 char **password);
72 #endif /* _SMBW_H */