diff options
Diffstat (limited to 'source4/include')
-rw-r--r-- | source4/include/client.h | 1 | ||||
-rw-r--r-- | source4/include/context.h | 39 | ||||
-rw-r--r-- | source4/include/dlinklist.h | 9 | ||||
-rw-r--r-- | source4/include/includes.h | 5 | ||||
-rw-r--r-- | source4/include/ntvfs.h | 6 | ||||
-rw-r--r-- | source4/include/smb.h | 31 |
6 files changed, 49 insertions, 42 deletions
diff --git a/source4/include/client.h b/source4/include/client.h index 015c8fb18a..8b0aedd48c 100644 --- a/source4/include/client.h +++ b/source4/include/client.h @@ -114,5 +114,4 @@ struct cli_client #define CLI_FULL_CONNECTION_ANNONYMOUS_FALLBACK 0x0004 #define CLI_FULL_CONNECTION_USE_DFS 0x0008 -#include "cli_context.h" #endif /* _CLIENT_H */ diff --git a/source4/include/context.h b/source4/include/context.h index 959793ab5e..f9a9bdc554 100644 --- a/source4/include/context.h +++ b/source4/include/context.h @@ -42,6 +42,44 @@ struct user_context { struct user_struct *vuser; }; + +/* each backend has to be one one of the following 3 basic types. In + * earlier versions of Samba backends needed to handle all types, now + * we implement them separately. */ +enum ntvfs_type {NTVFS_DISK, NTVFS_PRINT, NTVFS_IPC}; + +/* we need a forward declaration of the ntvfs_ops strucutre to prevent + include recursion */ +struct ntvfs_ops; + +struct tcon_context { + struct tcon_context *next, *prev; + + /* the server context that this was created on */ + struct server_context *smb; + + /* a talloc context for all data in this structure */ + TALLOC_CTX *mem_ctx; + + /* a private structure used by the active NTVFS backend */ + void *ntvfs_private; + + uint16 cnum; /* an index passed over the wire (the TID) */ + int service; + enum ntvfs_type type; + BOOL read_only; + BOOL admin_user; + + /* the NTVFS operations - see source/ntvfs/ and include/ntvfs.h for details */ + struct ntvfs_ops *ntvfs_ops; + + /* the reported filesystem type */ + char *fs_type; + + /* the reported device type */ + char *dev_type; +}; + /* the context for a single SMB request. This is passed to any request-context functions */ struct request_context { @@ -343,3 +381,4 @@ struct server_context { struct model_ops *model_ops; }; + diff --git a/source4/include/dlinklist.h b/source4/include/dlinklist.h index f1ceb8acf3..6191299384 100644 --- a/source4/include/dlinklist.h +++ b/source4/include/dlinklist.h @@ -57,16 +57,17 @@ do { \ } while (0) /* hook into the end of the list - needs a tmp pointer */ -#define DLIST_ADD_END(list, p, tmp) \ +#define DLIST_ADD_END(list, p, type) \ do { \ if (!(list)) { \ (list) = (p); \ (p)->next = (p)->prev = NULL; \ } else { \ - for ((tmp) = (list); (tmp)->next; (tmp) = (tmp)->next) ; \ - (tmp)->next = (p); \ + type tmp; \ + for (tmp = (list); tmp->next; tmp = tmp->next) ; \ + tmp->next = (p); \ (p)->next = NULL; \ - (p)->prev = (tmp); \ + (p)->prev = tmp; \ } \ } while (0) diff --git a/source4/include/includes.h b/source4/include/includes.h index 9683d032cc..305875cae0 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -773,6 +773,11 @@ extern int errno; #include "librpc/ndr/libndr.h" #include "librpc/rpc/dcerpc.h" +#include "rpc_server/dcerpc_server.h" +#include "context.h" +#include "ntvfs.h" +#include "cli_context.h" + /* used in net.c */ struct functable { diff --git a/source4/include/ntvfs.h b/source4/include/ntvfs.h index 88122166ee..b03ab218c6 100644 --- a/source4/include/ntvfs.h +++ b/source4/include/ntvfs.h @@ -23,12 +23,6 @@ -/* each backend has to be one one of the following 3 basic types. In - * earlier versions of Samba backends needed to handle all types, now - * we implement them separately. */ -enum ntvfs_type {NTVFS_DISK, NTVFS_PRINT, NTVFS_IPC}; - - /* the ntvfs operations structure - contains function pointers to the backend implementations of each operation */ struct ntvfs_ops { diff --git a/source4/include/smb.h b/source4/include/smb.h index a0a190190b..9b8bc28614 100644 --- a/source4/include/smb.h +++ b/source4/include/smb.h @@ -421,10 +421,7 @@ struct vuid_cache { #include "smb_acls.h" #include "enums.h" #include "events.h" -#include "rpc_server/dcerpc_server.h" -#include "context.h" #include "smb_interfaces.h" -#include "ntvfs.h" typedef struct smb_vfs_handle_struct { @@ -435,34 +432,6 @@ typedef struct smb_vfs_handle_struct } smb_vfs_handle_struct; -struct tcon_context { - struct tcon_context *next, *prev; - - /* the server context that this was created on */ - struct server_context *smb; - - /* a talloc context for all data in this structure */ - TALLOC_CTX *mem_ctx; - - /* a private structure used by the active NTVFS backend */ - void *ntvfs_private; - - uint16 cnum; /* an index passed over the wire (the TID) */ - int service; - enum ntvfs_type type; - BOOL read_only; - BOOL admin_user; - - /* the NTVFS operations - see source/ntvfs/ and include/ntvfs.h for details */ - struct ntvfs_ops *ntvfs_ops; - - /* the reported filesystem type */ - char *fs_type; - - /* the reported device type */ - char *dev_type; -}; - struct current_user { struct tcon_context *conn; |