Add a SMB2 crediting algorithm, by default the same as Windows. Defaults to 128 credits.
[metze/samba/wip.git] / source3 / include / local.h
index ee8d672553591a94d139ba89b7b5958de8493be5..3014f613b2a65ac184b6789bfe6aa6ca63ea63d3 100644 (file)
 #define WORKGROUP "WORKGROUP"
 #endif
 
-/* the maximum debug level to compile into the code. This assumes a good 
-   optimising compiler that can remove unused code 
-   for embedded or low-memory systems set this to a value like 2 to get
-   only important messages. This gives *much* smaller binaries
-*/
-#ifndef MAX_DEBUG_LEVEL
-#define MAX_DEBUG_LEVEL 1000
-#endif
-
 /* This defines the section name in the configuration file that will contain */
 /* global parameters - that is, parameters relating to the whole server, not */
 /* just services. This name is then reserved, and may not be used as a       */
 #define SYSLOG_FACILITY LOG_DAEMON
 #endif
 
-/* 
+/*
+ * Fudgefactor required for open tdb's, etc.
+ */
+
+#ifndef MAX_OPEN_FUDGEFACTOR
+#define MAX_OPEN_FUDGEFACTOR 20
+#endif
+
+/*
+ * Minimum number of open files needed for Windows7 to
+ * work correctly. A little conservative but better that
+ * than run out of fd's.
+ */
+
+#ifndef MIN_OPEN_FILES_WINDOWS
+#define MIN_OPEN_FILES_WINDOWS 16384
+#endif
+
+/*
  * Default number of maximum open files per smbd. This is
  * also limited by the maximum available file descriptors
  * per process and can also be set in smb.conf as "max open files"
@@ -64,9 +73,9 @@
  */
 
 #ifndef MAX_OPEN_FILES
-#define MAX_OPEN_FILES 10000
+#define MAX_OPEN_FILES (MIN_OPEN_FILES_WINDOWS + MAX_OPEN_FUDGEFACTOR)
 #endif
+
 #define WORDMAX 0xFFFF
 
 /* the maximum password length before we declare a likely attack */
 /* the maximum age in seconds of a password. Should be a lp_ parameter */
 #define MAX_PASSWORD_AGE (21*24*60*60)
 
-/* Allocation roundup. */
+/* Default allocation roundup. */
 #define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000
 
 /* shall we deny oplocks to clients that get timeouts? */
 /* Number in seconds for winbindd to wait for the mutex. Make this 2 * smbd wait time. */
 #define WINBIND_SERVER_MUTEX_WAIT_TIME (( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT)/1000)) + 5)*2)
 
-/* Max number of simultaneous winbindd socket connections. */
-#define WINBINDD_MAX_SIMULTANEOUS_CLIENTS 200
-
 /* Buffer size to use when printing backtraces */
 #define BACKTRACE_STACK_SIZE 64
 
 /* Number of microseconds to wait before a sharing violation. */
 #define SHARING_VIOLATION_USEC_WAIT 950000
 
+/* Number of microseconds to wait before a updating the write time (2 secs). */
+#define WRITE_TIME_UPDATE_USEC_DELAY 2000000
+
+#define MAX_LDAP_REPLICATION_SLEEP_TIME 5000 /* In milliseconds. */
+
+/* tdb hash size for the open database. */
+#define SMB_OPEN_DATABASE_TDB_HASH_SIZE 10007
+
+/* Characters we disallow in sharenames. */
+#define INVALID_SHARENAME_CHARS "%<>*?|/\\+=;:\","
+
+/* Seconds between connection attempts to a remote server. */
+#define FAILED_CONNECTION_CACHE_TIMEOUT 30
+
+/* Default hash size for the winbindd cache. */
+#define WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE 5000
+
+/* Windows minimum lock resolution timeout in ms */
+#define WINDOWS_MINIMUM_LOCK_TIMEOUT_MS 200
+
+/* Maximum size of RPC data we will accept for one call. */
+#define MAX_RPC_DATA_SIZE (15*1024*1024)
+
+#define CLIENT_NDR_PADDING_SIZE 8
+#define SERVER_NDR_PADDING_SIZE 8
+
+#define DEFAULT_SMB2_MAX_READ (1024*1024)
+#define DEFAULT_SMB2_MAX_WRITE (1024*1024)
+#define DEFAULT_SMB2_MAX_TRANSACT (1024*1024)
+#define DEFAULT_SMB2_MAX_CREDITS 128
+
 #endif