blob: fa2407bedb8af16cc5d148e5adf4b3b93b0162bf [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
2 #include <configuration.h>
3
4 void configure_driver(int what, mixed data)
5
6DESCRIPTION
7 This efun configures runtime adjustable bahviour of the driver.
8
9 Sets the option <what> to the value <data>.
10
11 This function always causes the privilege_violation
12 ("configure_driver", this_object(), what, data).
13
14 <what> == DC_MEMORY_LIMIT
15 Set new soft and hard memory limits for the driver.
16 <data> is expected to be an array with two elements, which have to
17 be integers giving the amount of memory in bytes.
18 ({<soft memory limit>, <hard memory limit>})
19
20 <what> == DC_ENABLE_HEART_BEATS
21 Globally enable the calling of Heartbeats, if <data> is 1,
22 globally disable them if <data> is 0.
23 If called during heartbeat processing, the change comes into effect
24 at the next backend cycle.
25
26 <what> == DC_LONG_EXEC_TIME
27 Set the time considered as (too) long for top-level executions. If
28 an execution exceeds this time, a stack trace will be written to
29 the debug log. The execution will continue at that point.
30 <data> is an integer and measured in microseconds.
31 A time of 0 disables the detection of long executions.
32
33 <what> == DC_DATA_CLEAN_TIME
34 Sets the average time between clean-ups of an objects data
35 structures. This is not to be confused with the standard cleanup
36 time which determines when H_CLEAN_UP is called. A long time for
37 data cleanup may lead to larger memory consumption and prevents
38 destructed objects being cleaned up. A too short time may lead to
39 high loads and lag on the machine. The actual time delay will be a
40 time between 0.9*DC_DATA_CLEAN_TIME and 1.1*DC_DATA_CLEAN_TIME.
41 Default at driver startup are 3600s.
42 <data> is an integer and measured in seconds.
43
44 <what> == DC_TLS_CERTIFICATE
45 Sets the current certificate used for new TLS sessions.
46 It can be one of the certificates in the key directory
47 (command line option --tls-keydirectory) or the main
48 certificate (given with --tls-certfile).
49 Default is the main certificate or else the first
50 certificate found in the directory. The chosen certificate at the
51 time of the tls_init_connection() call is used for that connection.
52 <data> is a string containing the SHA1 fingerprint
53 of the certificate with hexadecimal numbers,
54 it may contain colons or whitespaces (for example
55 "5A:FE:CA:57:1E:50:5E:1E:C7:ED:BA:11:AD:50:10:75:0F:7A:1E:50").
56 When loading certificates their fingerprints are printed
57 on stdout and into the logfile.
58
59 <what> == DC_TLS_DHE_PARAMETER
60 Sets new parameters for the Diffie-Hellman keyexchange for new TLS
61 sessions. The paramters must be given as a PEM encoded string
62 (e.g. the output of 'openssl dhparam -5 2048').
63 If <data> is 0, the built-in defaults will be restored.
64 If importing the new parameters fails (e.g. due to an incorrect
65 format), the driver tries to keep the old parameters
66
67 <what> == DC_TLS_CIPHERLIST
68 Sets a new list of ciphers (OpenSSL) or priorities (GnuTLS) to use.
69 For the correct format, please refer to the help of 'openssl
70 ciphers' or documentation of priority strings in GnuTLS.
71 With GnuTLS a syntax error in the list causes an error.
72 With OpenSSL an error is only raised of none of the given ciphers
73 could be selected.
74 By default, the preferred ciphers of the driver take precedence
75 This can be changed in the priority strings for GnuTLS, but
76 currently not for OpenSSL.
77
78 <what> == DC_EXTRA_WIZINFO_SIZE
79 Indicate that the wizlist should contain an array of the given size
80 with extra info for each wizard. A negative value indicates
81 a non-array value.
82
83 The value is only used to allocate a proper empty 'extra' value
84 for newly created wizlist entries.
85
86 <what> == DC_DEFAULT_RUNTIME_LIMITS
87 Sets the default runtime limits, that will be used for each thread.
88 They will be in effect as the initial limits with the next thread.
89 The limits must be given as an array with the following entries:
90
91 int[LIMIT_EVAL]: the max number of eval costs
92 int[LIMIT_ARRAY]: the max number of array entries
93 int[LIMIT_MAPPING_SIZE]: the max number of mapping values
94 int[LIMIT_MAPPING_KEYS]: the max number of mapping entries
95 int[LIMIT_BYTE]: the max number of bytes handled with
96 one read_bytes()/write_bytes() call.
97 int[LIMIT_FILE]: the max number of bytes handled with
98 one read_file()/write_file() call.
99 int[LIMIT_CALLOUTS]: the number of callouts at one time.
100 int[LIMIT_COST]: how to account the current cost.
101 int[LIMIT_MEMROY]: the max. number of bytes which can be
102 _additionally_ allocated/used
103 _per top-level execution thread_.
104
105 The limit settings recognize three special values:
106
107 LIMIT_UNLIMITED: the limit is deactivated
108 LIMIT_KEEP: the former setting is kept
109 LIMIT_DEFAULT: the 'global' default setting is used.
110
111 For LIMIT_COST, the special values have these meaning:
112 LIMIT_UNLIMITED: at maximum 1 tick is accounted
113 LIMIT_KEEP: LIMIT_COST is set to 0
114 LIMIT_DEFAULT: LIMIT_COST is set to -100
115
116 <what> == DC_SWAP_COMPACT_MODE
117 Sets free swap space shall be reused immediately to keep
118 the swap file as small as possible.
119 (Same as the --swap-compact command line switch.)
120
121HISTORY
122 Introduced in LDMud 3.3.719.
123 DC_ENABLE_HEART_BEATS was added in 3.5.0.
124 DC_LONG_EXEC_TIME was added in 3.5.0.
125 DC_DATA_CLEAN_TIME was added in 3.5.0.
126 DC_EXTRA_WIZINFO_SIZE was added in 3.5.0.
127 DC_TLS_CERTIFICATE was added in 3.5.0.
128 DC_TLS_DHE_PARAMETER was added in 3.5.0.
129 DC_TLS_CIPHERLIST was added in 3.5.0.
130 DC_SWAP_COMPACT_MODE was added in 3.5.0.
131
132SEE ALSO
133 configure_interactive(E)