s3:pylibsmb: add settimeout()
[samba.git] / source3 / include / smb.h
index 751b0e6bf007e530d6567fc569f8db4bad8020d2..0fd9471c356c393183f51909ceec8be84525bf0e 100644 (file)
@@ -30,7 +30,7 @@
 #include "libds/common/roles.h"
 
 /* logged when starting the various Samba daemons */
-#define COPYRIGHT_STARTUP_MESSAGE      "Copyright Andrew Tridgell and the Samba Team 1992-2015"
+#define COPYRIGHT_STARTUP_MESSAGE      "Copyright Andrew Tridgell and the Samba Team 1992-2018"
 
 #define SAFETY_MARGIN 1024
 #define LARGE_WRITEX_HDR_SIZE 65
 
 #define SIZEOFWORD 2
 
-#ifndef DEF_CREATE_MASK
-#define DEF_CREATE_MASK (0755)
-#endif
-
 /* string manipulation flags - see clistr.c and srvstr.c */
 #define STR_TERMINATE 1
 #define STR_UPPER 2
 
 #include "librpc/gen_ndr/security.h"
 
-struct idle_event;
 struct share_mode_entry;
 struct uuid;
 struct named_mutex;
 struct wb_context;
 struct rpc_cli_smbd_conn;
-struct fncall_context;
 
 /* the basic packet size, assuming no words or bytes */
 #define smb_size 39
@@ -158,6 +152,8 @@ struct sys_notify_context {
 struct current_user {
        struct connection_struct *conn;
        uint64_t vuid; /* SMB2 compat */
+       bool need_chdir;
+       bool done_chdir;
        struct security_unix_token ut;
        struct security_token *nt_user_token;
 };
@@ -181,6 +177,9 @@ struct interface {
        struct sockaddr_storage ip;
        struct sockaddr_storage netmask;
        struct sockaddr_storage bcast;
+       uint32_t if_index;
+       uint64_t linkspeed;
+       uint32_t capability;
 };
 
 #define SHARE_MODE_FLAG_POSIX_OPEN     0x1
@@ -418,6 +417,9 @@ Offset  Data                        length.
 /* Private options for printer support */
 #define NTCREATEX_OPTIONS_PRIVATE_DELETE_ON_CLOSE 0x0008
 
+/* Private option for streams support */
+#define NTCREATEX_OPTIONS_PRIVATE_STREAM_BASEOPEN 0x0010
+
 /* Flag for NT transact rename call. */
 #define RENAME_REPLACE_IF_EXISTS 1
 
@@ -481,14 +483,6 @@ Offset  Data                       length.
    otherwise NT will not honour the announce packets */
 #define MAX_SERVER_STRING_LENGTH 48
 
-
-#define SMB_SUCCESS 0  /* The request was successful. */
-
-#ifdef WITH_DFS
-void dfs_unlogin(void);
-extern int dcelogin_atmost_once;
-#endif
-
 #ifdef NOSTRDUP
 char *strdup(char *s);
 #endif
@@ -531,7 +525,7 @@ http://msdn.microsoft.com/en-us/library/cc246334(PROT.13).aspx
 #define NO_SUBSTREAMS          0x2
 #define NO_REPARSETAG          0x4
 
-/* Remote architectures we know about. */
+/* Remote architectures we know about, keep in sync with remote_arch_strings */
 enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT,
                        RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_VISTA,
                        RA_SAMBA, RA_CIFSFS, RA_WINXP64, RA_OSX};
@@ -548,13 +542,8 @@ enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT,
 
 #define FNUM_FIELD_INVALID 0
 
-/* 
- * Size of buffer to use when moving files across filesystems. 
- */
-#define COPYBUF_SIZE (8*1024)
-
 /*
- * Map the Core and Extended Oplock requesst bits down
+ * Map the Core and Extended Oplock request bits down
  * to common bits (EXCLUSIVE_OPLOCK & BATCH_OPLOCK).
  */
 
@@ -662,26 +651,9 @@ enum smbd_capability {
     DAC_OVERRIDE_CAPABILITY
 };
 
-/*
- * Kernel oplocks capability flags.
- */
-
-/* Level 2 oplocks are supported natively by kernel oplocks. */
-#define KOPLOCKS_LEVEL2_SUPPORTED              0x1
-
-/* The kernel notifies deferred openers when they can retry the open. */
-#define KOPLOCKS_DEFERRED_OPEN_NOTIFICATION    0x2
-
-/* The kernel notifies smbds when an oplock break times out. */
-#define KOPLOCKS_TIMEOUT_NOTIFICATION          0x4
-
-/* The kernel notifies smbds when an oplock is broken. */
-#define KOPLOCKS_OPLOCK_BROKEN_NOTIFICATION    0x8
-
 struct kernel_oplocks_ops;
 struct kernel_oplocks {
        const struct kernel_oplocks_ops *ops;
-       uint32_t flags;
        void *private_data;
 };
 
@@ -702,10 +674,6 @@ struct kernel_oplocks_ops {
                           files_struct *fsp, int oplock_type);
        void (*release_oplock)(struct kernel_oplocks *ctx,
                               files_struct *fsp, int oplock_type);
-       void (*contend_level2_oplocks_begin)(files_struct *fsp,
-                                            enum level2_contention_type type);
-       void (*contend_level2_oplocks_end)(files_struct *fsp,
-                                          enum level2_contention_type type);
 };
 
 #include "smb_macros.h"
@@ -738,12 +706,6 @@ struct node_status_extra {
 
 #define SAFE_NETBIOS_CHARS ". -_"
 
-/* The maximum length of a trust account password.
-   Used when we randomly create it, 15 char passwords
-   exceed NT4's max password length */
-
-#define DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH 14
-
 #define PORT_NONE      0
 #ifndef LDAP_PORT
 #define LDAP_PORT      389