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