Update my copyrights according to my agreement with IBM
[bbaumbach/samba-autobuild/.git] / source3 / include / libsmb_internal.h
1 #ifndef _LIBSMB_INTERNAL_H_
2 #define _LIBSMB_INTERNAL_H_
3
4 #define SMBC_MAX_NAME  1023
5 #define SMBC_FILE_MODE (S_IFREG | 0444)
6 #define SMBC_DIR_MODE  (S_IFDIR | 0555)
7
8
9 #include "../include/libsmbclient.h"
10
11
12 struct _SMBCSRV {
13         struct cli_state cli;
14         dev_t dev;
15         BOOL no_pathinfo2;
16         int server_fd;
17
18         SMBCSRV *next, *prev;
19         
20 };
21
22 /* 
23  * Keep directory entries in a list 
24  */
25 struct smbc_dir_list {
26         struct smbc_dir_list *next;
27         struct smbc_dirent *dirent;
28 };
29
30
31 /*
32  * Structure for open file management
33  */ 
34 struct _SMBCFILE {
35         int cli_fd; 
36         char *fname;
37         off_t offset;
38         struct _SMBCSRV *srv;
39         BOOL file;
40         struct smbc_dir_list *dir_list, *dir_end, *dir_next;
41         int dir_type, dir_error;
42
43         SMBCFILE *next, *prev;
44 };
45
46
47 struct smbc_internal_data {
48
49         /** INTERNAL: is this handle initialized ? 
50          */
51         int     _initialized;
52
53         /** INTERNAL: dirent pointer location 
54          */
55         char    _dirent[512];  
56
57         /** INTERNAL: server connection list
58          */
59         SMBCSRV * _servers;
60         
61         /** INTERNAL: open file/dir list
62          */
63         SMBCFILE * _files;
64 };      
65
66
67 #endif