r5754: implement derrell's solution for binary compatibilty in the _SMBCCTX structure...
[Samba.git] / source / include / libsmb_internal.h
bloba1db5c27926aa46dfd7b3f08747f6a3147847bd3
1 #ifndef _LIBSMB_INTERNAL_H_
2 #define _LIBSMB_INTERNAL_H_
4 #define SMBC_MAX_NAME 1023
5 #define SMBC_FILE_MODE (S_IFREG | 0444)
6 #define SMBC_DIR_MODE (S_IFDIR | 0555)
9 #include "include/libsmbclient.h"
12 struct _SMBCSRV {
13 struct cli_state cli;
14 dev_t dev;
15 BOOL no_pathinfo2;
16 BOOL no_nt_session;
17 int server_fd;
19 SMBCSRV *next, *prev;
23 /*
24 * Keep directory entries in a list
26 struct smbc_dir_list {
27 struct smbc_dir_list *next;
28 struct smbc_dirent *dirent;
33 * Structure for open file management
34 */
35 struct _SMBCFILE {
36 int cli_fd;
37 char *fname;
38 off_t offset;
39 struct _SMBCSRV *srv;
40 BOOL file;
41 struct smbc_dir_list *dir_list, *dir_end, *dir_next;
42 int dir_type, dir_error;
44 SMBCFILE *next, *prev;
48 struct smbc_internal_data {
50 /** INTERNAL: is this handle initialized ?
52 int _initialized;
54 /** INTERNAL: dirent pointer location
56 * Leave room for any urlencoded filename and the comment field.
58 * We really should use sizeof(struct smbc_dirent) plus (NAME_MAX * 3)
59 * plus whatever the max length of a comment is, plus a couple of null
60 * terminators (one after the filename, one after the comment).
62 * According to <linux/limits.h>, NAME_MAX is 255. Is it longer
63 * anyplace else?
65 char _dirent[1024];
67 /** INTERNAL: server connection list
69 SMBCSRV * _servers;
71 /** INTERNAL: open file/dir list
73 SMBCFILE * _files;
74 };
77 #endif