diff --git a/include/maxscale/backend.hh b/include/maxscale/backend.hh index 262f7beef..a7d42101e 100644 --- a/include/maxscale/backend.hh +++ b/include/maxscale/backend.hh @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/include/maxscale/config.h b/include/maxscale/config.h deleted file mode 100644 index bc1b7cbbb..000000000 --- a/include/maxscale/config.h +++ /dev/null @@ -1,611 +0,0 @@ -/* - * Copyright (c) 2018 MariaDB Corporation Ab - * - * Use of this software is governed by the Business Source License included - * in the LICENSE.TXT file and at www.mariadb.com/bsl11. - * - * Change Date: 2022-01-01 - * - * On the date above, in accordance with the Business Source License, use - * of this software will be governed by version 2 or later of the General - * Public License. - */ -#pragma once - -/** - * @file include/maxscale/config.h The configuration handling elements - */ - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#ifdef __cplusplus -#include -#include -// A mapping from a path to a percentage, e.g.: "/disk" -> 80. -typedef std::unordered_map MxsDiskSpaceThreshold; -#else -typedef void MxsDiskSpaceThreshold; -#endif - -MXS_BEGIN_DECLS - -/** Default port where the REST API listens */ -#define DEFAULT_ADMIN_HTTP_PORT 8989 -#define DEFAULT_ADMIN_HOST "127.0.0.1" - -#define RELEASE_STR_LENGTH 256 -#define SYSNAME_LEN 256 -#define MAX_ADMIN_USER_LEN 1024 -#define MAX_ADMIN_PW_LEN 1024 -#define MAX_ADMIN_HOST_LEN 1024 - -/** JSON Pointers to key parts of JSON objects */ -#define MXS_JSON_PTR_DATA "/data" -#define MXS_JSON_PTR_ID "/data/id" -#define MXS_JSON_PTR_TYPE "/data/type" -#define MXS_JSON_PTR_PARAMETERS "/data/attributes/parameters" - -/** Pointers to relation lists */ -#define MXS_JSON_PTR_RELATIONSHIPS "/data/relationships" -#define MXS_JSON_PTR_RELATIONSHIPS_SERVERS "/data/relationships/servers/data" -#define MXS_JSON_PTR_RELATIONSHIPS_SERVICES "/data/relationships/services/data" -#define MXS_JSON_PTR_RELATIONSHIPS_MONITORS "/data/relationships/monitors/data" -#define MXS_JSON_PTR_RELATIONSHIPS_FILTERS "/data/relationships/filters/data" - -/** Parameter value JSON Pointers */ -#define MXS_JSON_PTR_PARAM_PORT MXS_JSON_PTR_PARAMETERS "/port" -#define MXS_JSON_PTR_PARAM_ADDRESS MXS_JSON_PTR_PARAMETERS "/address" -#define MXS_JSON_PTR_PARAM_PROTOCOL MXS_JSON_PTR_PARAMETERS "/protocol" -#define MXS_JSON_PTR_PARAM_AUTHENTICATOR MXS_JSON_PTR_PARAMETERS "/authenticator" -#define MXS_JSON_PTR_PARAM_AUTHENTICATOR_OPTIONS MXS_JSON_PTR_PARAMETERS "/authenticator_options" -#define MXS_JSON_PTR_PARAM_SSL_KEY MXS_JSON_PTR_PARAMETERS "/ssl_key" -#define MXS_JSON_PTR_PARAM_SSL_CERT MXS_JSON_PTR_PARAMETERS "/ssl_cert" -#define MXS_JSON_PTR_PARAM_SSL_CA_CERT MXS_JSON_PTR_PARAMETERS "/ssl_ca_cert" -#define MXS_JSON_PTR_PARAM_SSL_VERSION MXS_JSON_PTR_PARAMETERS "/ssl_version" -#define MXS_JSON_PTR_PARAM_SSL_CERT_VERIFY_DEPTH MXS_JSON_PTR_PARAMETERS "/ssl_cert_verify_depth" -#define MXS_JSON_PTR_PARAM_SSL_VERIFY_PEER_CERT MXS_JSON_PTR_PARAMETERS "/ssl_verify_peer_certificate" - -/** Non-parameter JSON pointers */ -#define MXS_JSON_PTR_ROUTER "/data/attributes/router" -#define MXS_JSON_PTR_MODULE "/data/attributes/module" -#define MXS_JSON_PTR_PASSWORD "/data/attributes/password" -#define MXS_JSON_PTR_ACCOUNT "/data/attributes/account" - -/** - * Common configuration parameters names - * - * All of the constants resolve to a lowercase version without the CN_ prefix. - * For example CN_PASSWORD resolves to the static string "password". - */ -extern const char CN_ACCOUNT[]; -extern const char CN_ADDRESS[]; -extern const char CN_ARG_MAX[]; -extern const char CN_ARG_MIN[]; -extern const char CN_ADMIN_AUTH[]; -extern const char CN_ADMIN_ENABLED[]; -extern const char CN_ADMIN_LOG_AUTH_FAILURES[]; -extern const char CN_ADMIN_HOST[]; -extern const char CN_ADMIN_PORT[]; -extern const char CN_ADMIN_SSL_KEY[]; -extern const char CN_ADMIN_SSL_CERT[]; -extern const char CN_ADMIN_SSL_CA_CERT[]; -extern const char CN_ARGUMENTS[]; -extern const char CN_ATTRIBUTES[]; -extern const char CN_AUTHENTICATOR[]; -extern const char CN_AUTHENTICATOR_DIAGNOSTICS[]; -extern const char CN_AUTHENTICATOR_OPTIONS[]; -extern const char CN_AUTH_ALL_SERVERS[]; -extern const char CN_AUTH_CONNECT_TIMEOUT[]; -extern const char CN_AUTH_READ_TIMEOUT[]; -extern const char CN_AUTH_WRITE_TIMEOUT[]; -extern const char CN_AUTO[]; -extern const char CN_CACHE_SIZE[]; -extern const char CN_CLASSIFY[]; -extern const char CN_CONNECTION_TIMEOUT[]; -extern const char CN_DUMP_LAST_STATEMENTS[]; -extern const char CN_DATA[]; -extern const char CN_DEFAULT[]; -extern const char CN_DESCRIPTION[]; -extern const char CN_DISK_SPACE_THRESHOLD[]; -extern const char CN_ENABLE_ROOT_USER[]; -extern const char CN_FIELDS[]; -extern const char CN_FILTERS[]; -extern const char CN_FILTER[]; -extern const char CN_FILTER_DIAGNOSTICS[]; -extern const char CN_FUNCTIONS[]; -extern const char CN_GATEWAY[]; -extern const char CN_HAS_WHERE_CLAUSE[]; -extern const char CN_ID[]; -extern const char CN_INET[]; -extern const char CN_LISTENER[]; -extern const char CN_LISTENERS[]; -extern const char CN_LOCALHOST_MATCH_WILDCARD_HOST[]; -extern const char CN_LOG_AUTH_WARNINGS[]; -extern const char CN_LOG_THROTTLING[]; -extern const char CN_MAXSCALE[]; -extern const char CN_MAX_CONNECTIONS[]; -extern const char CN_MAX_RETRY_INTERVAL[]; -extern const char CN_META[]; -extern const char CN_METHOD[]; -extern const char CN_MODULE[]; -extern const char CN_MODULES[]; -extern const char CN_MODULE_COMMAND[]; -extern const char CN_MONITORS[]; -extern const char CN_MONITOR[]; -extern const char CN_MONITOR_DIAGNOSTICS[]; -extern const char CN_MS_TIMESTAMP[]; -extern const char CN_NAME[]; -extern const char CN_NON_BLOCKING_POLLS[]; -extern const char CN_OPERATION[]; -extern const char CN_OPTIONS[]; -extern const char CN_PARAMETERS[]; -extern const char CN_PARSE_RESULT[]; -extern const char CN_PASSIVE[]; -extern const char CN_PASSWORD[]; -extern const char CN_POLL_SLEEP[]; -extern const char CN_PORT[]; -extern const char CN_EXTRA_PORT[]; -extern const char CN_PROTOCOL[]; -extern const char CN_QUERY_CLASSIFIER[]; -extern const char CN_QUERY_CLASSIFIER_ARGS[]; -extern const char CN_QUERY_CLASSIFIER_CACHE_SIZE[]; -extern const char CN_QUERY_RETRIES[]; -extern const char CN_QUERY_RETRY_TIMEOUT[]; -extern const char CN_RELATIONSHIPS[]; -extern const char CN_LINKS[]; -extern const char CN_REQUIRED[]; -extern const char CN_RETAIN_LAST_STATEMENTS[]; -extern const char CN_RETRY_ON_FAILURE[]; -extern const char CN_ROUTER[]; -extern const char CN_ROUTER_DIAGNOSTICS[]; -extern const char CN_ROUTER_OPTIONS[]; -extern const char CN_SELF[]; -extern const char CN_SERVERS[]; -extern const char CN_SERVER[]; -extern const char CN_SERVICES[]; -extern const char CN_SERVICE[]; -extern const char CN_SESSIONS[]; -extern const char CN_SESSION_TRACK_TRX_STATE[]; -extern const char CN_SKIP_PERMISSION_CHECKS[]; -extern const char CN_SOCKET[]; -extern const char CN_STATE[]; -extern const char CN_SSL[]; -extern const char CN_SSL_CA_CERT[]; -extern const char CN_SSL_CERT[]; -extern const char CN_SSL_CERT_VERIFY_DEPTH[]; -extern const char CN_SSL_VERIFY_PEER_CERTIFICATE[]; -extern const char CN_SSL_KEY[]; -extern const char CN_SSL_VERSION[]; -extern const char CN_STRIP_DB_ESC[]; -extern const char CN_SUBSTITUTE_VARIABLES[]; -extern const char CN_THREADS[]; -extern const char CN_THREAD_STACK_SIZE[]; -extern const char CN_TICKS[]; -extern const char CN_TYPE[]; -extern const char CN_TYPE_MASK[]; -extern const char CN_UNIX[]; -extern const char CN_USER[]; -extern const char CN_USERS[]; -extern const char CN_VERSION_STRING[]; -extern const char CN_WEIGHTBY[]; -extern const char CN_WRITEQ_HIGH_WATER[]; -extern const char CN_WRITEQ_LOW_WATER[]; - -/* - * Global configuration items that are read (or pre_parsed) to be available for - * subsequent configuration reading. @see config_pre_parse_global_params. - */ -extern const char CN_LOGDIR[]; -extern const char CN_LIBDIR[]; -extern const char CN_PIDDIR[]; -extern const char CN_DATADIR[]; -extern const char CN_CACHEDIR[]; -extern const char CN_LANGUAGE[]; -extern const char CN_EXECDIR[]; -extern const char CN_CONNECTOR_PLUGINDIR[]; -extern const char CN_PERSISTDIR[]; -extern const char CN_MODULE_CONFIGDIR[]; -extern const char CN_SYSLOG[]; -extern const char CN_MAXLOG[]; -extern const char CN_LOG_AUGMENTATION[]; -extern const char CN_LOG_TO_SHM[]; - -/** - * The config parameter - */ -typedef struct config_parameter -{ - char* name; /**< The name of the parameter */ - char* value; /**< The value of the parameter */ - struct config_parameter* next; /**< Next pointer in the linked list */ -} MXS_CONFIG_PARAMETER; - -/** - * The config context structure, used to build the configuration - * data during the parse process - */ -typedef struct config_context -{ - char* object; /**< The name of the object being configured */ - MXS_CONFIG_PARAMETER* parameters; /**< The list of parameter values */ - bool was_persisted; /**< True if this object was persisted */ - struct config_context* next; /**< Next pointer in the linked list */ -} CONFIG_CONTEXT; - -/** - * The gateway global configuration data - */ -typedef struct -{ - bool config_check; /**< Only check config */ - int n_threads; /**< Number of polling threads */ - size_t thread_stack_size; /**< The stack size of each worker thread */ - char release_string[RELEASE_STR_LENGTH]; /**< The release name string of the system */ - char sysname[SYSNAME_LEN]; /**< The OS name of the system */ - uint8_t mac_sha1[SHA_DIGEST_LENGTH]; /**< The SHA1 digest of an interface MAC address - * */ - unsigned int n_nbpoll; /**< Tune number of non-blocking polls */ - unsigned int pollsleep; /**< Wait time in blocking polls */ - int syslog; /**< Log to syslog */ - int maxlog; /**< Log to MaxScale's own logs */ - unsigned int auth_conn_timeout; /**< Connection timeout for the user - * authentication */ - unsigned int auth_read_timeout; /**< Read timeout for the user authentication */ - unsigned int auth_write_timeout; /**< Write timeout for the user authentication */ - bool skip_permission_checks; /**< Skip service and monitor permission checks */ - int32_t passive; /**< True if MaxScale is in passive mode */ - int64_t promoted_at; /**< Time when this Maxscale instance was - * promoted from a passive to an active */ - char qc_name[PATH_MAX]; /**< The name of the query classifier to load */ - char* qc_args; /**< Arguments for the query classifier */ - QC_CACHE_PROPERTIES qc_cache_properties; /**< The query classifier cache properties. */ - qc_sql_mode_t qc_sql_mode; /**< The query classifier sql mode */ - char admin_host[MAX_ADMIN_HOST_LEN]; /**< Admin interface host */ - uint16_t admin_port; /**< Admin interface port */ - bool admin_auth; /**< Admin interface authentication */ - bool admin_enabled; /**< Admin interface is enabled */ - bool admin_log_auth_failures; /**< Log admin interface authentication failures - * */ - char admin_ssl_key[PATH_MAX]; /**< Admin SSL key */ - char admin_ssl_cert[PATH_MAX]; /**< Admin SSL cert */ - char admin_ssl_ca_cert[PATH_MAX]; /**< Admin SSL CA cert */ - int query_retries; /**< Number of times a interrupted query is - * retried */ - time_t query_retry_timeout; /**< Timeout for query retries */ - bool substitute_variables; /**< Should environment variables be substituted - * */ - char* local_address; /**< Local address to use when connecting */ - time_t users_refresh_time; /**< How often the users can be refreshed */ - uint64_t writeq_high_water; /**< High water mark of dcb write queue */ - uint64_t writeq_low_water; /**< Low water mark of dcb write queue */ - char peer_hosts[MAX_ADMIN_HOST_LEN]; /**< The protocol, address and port for peers - * (currently only one) */ - char peer_user[MAX_ADMIN_HOST_LEN]; /**< Username for maxscale-to-maxscale traffic */ - char peer_password[MAX_ADMIN_HOST_LEN]; /**< Password for maxscale-to-maxscale traffic */ - mxb_log_target_t log_target; /**< Log type */ -} MXS_CONFIG; - -/** - * @brief Get global MaxScale configuration - * - * @return The global configuration - */ -MXS_CONFIG* config_get_global_options(); - -/** - * @brief Get a configuration parameter - * - * @param params List of parameters - * @param name Name of parameter to get - * @return The parameter or NULL if the parameter was not found - */ -MXS_CONFIG_PARAMETER* config_get_param(MXS_CONFIG_PARAMETER* params, const char* name); - -/** - * @brief Helper function for checking SSL parameters - * - * @param key Parameter name - * @return True if the parameter is an SSL parameter - */ -bool config_is_ssl_parameter(const char* key); - -/** - * @brief Check if a configuration parameter is valid - * - * If a module has declared parameters and parameters were given to the module, - * the given parameters are compared to the expected ones. This function also - * does preliminary type checking for various basic values as well as enumerations. - * - * @param params Module parameters - * @param key Parameter key - * @param value Parameter value - * @param context Configuration context or NULL for no context (uses runtime checks) - * - * @return True if the configuration parameter is valid - */ -bool config_param_is_valid(const MXS_MODULE_PARAM* params, - const char* key, - const char* value, - const CONFIG_CONTEXT* context); - -/** - * @brief Get a boolean value - * - * The existence of the parameter should be checked with config_get_param() before - * calling this function to determine whether the return value represents an existing - * value or a missing value. - * - * @param params List of configuration parameters - * @param key Parameter name - * - * @return The value as a boolean or false if none was found - */ -bool config_get_bool(const MXS_CONFIG_PARAMETER* params, const char* key); - -/** - * @brief Get an integer value - * - * This is used for both MXS_MODULE_PARAM_INT and MXS_MODULE_PARAM_COUNT. - * - * @param params List of configuration parameters - * @param key Parameter name - * - * @return The integer value of the parameter or 0 if no parameter was found - */ -int config_get_integer(const MXS_CONFIG_PARAMETER* params, const char* key); - -/** - * @brief Get a size in bytes - * - * The value can have either one of the IEC binary prefixes or SI prefixes as - * a suffix. For example, the value 1Ki will be converted to 1024 bytes whereas - * 1k will be converted to 1000 bytes. Supported SI suffix values are k, m, g and t - * in both lower and upper case. Supported IEC binary suffix values are - * Ki, Mi, Gi and Ti both in upper and lower case. - * - * @param params List of configuration parameters - * @param key Parameter name - * - * @return Number of bytes or 0 if no parameter was found - */ -uint64_t config_get_size(const MXS_CONFIG_PARAMETER* params, const char* key); - -/** - * @brief Get a string value - * - * @param params List of configuration parameters - * @param key Parameter name - * - * @return The raw string value or an empty string if no parameter was found - */ -const char* config_get_string(const MXS_CONFIG_PARAMETER* params, const char* key); - -/** - * @brief Get a enumeration value - * - * @param params List of configuration parameters - * @param key Parameter name - * @param values All possible enumeration values - * - * @return The enumeration value converted to an int or -1 if the parameter was not found - * - * @note The enumeration values should not use -1 so that an undefined parameter is - * detected. If -1 is used, config_get_param() should be used to detect whether - * the parameter exists - */ -int config_get_enum(const MXS_CONFIG_PARAMETER* params, - const char* key, - const MXS_ENUM_VALUE* values); - -/** - * @brief Get a service value - * - * @param params List of configuration parameters - * @param key Parameter name - * - * @return Pointer to configured service - */ -struct service* config_get_service(const MXS_CONFIG_PARAMETER* params, const char* key); - -/** - * @brief Get a server value - * - * @param params List of configuration parameters - * @param key Parameter name - * - * @return Pointer to configured server - */ -struct server* config_get_server(const MXS_CONFIG_PARAMETER* params, const char* key); - -/** - * @brief Get an array of servers. The caller should free the produced array, - * but not the array elements. - * - * @param params List of configuration parameters - * @param key Parameter name - * @param output Where to save the output - * @return How many servers were found, equal to output array size - */ -int config_get_server_list(const MXS_CONFIG_PARAMETER* params, - const char* key, - struct server*** output); - -/** - * Get a compiled regular expression and the ovector size of the pattern. The - * return value should be freed by the caller. - * - * @param params List of configuration parameters - * @param key Parameter name - * @param options PCRE2 compilation options - * @param output_ovec_size Output for match data ovector size. On error, - * nothing is written. If NULL, the parameter is ignored. - * @return Compiled regex code on success, NULL otherwise - */ -pcre2_code* config_get_compiled_regex(const MXS_CONFIG_PARAMETER* params, - const char* key, - uint32_t options, - uint32_t* output_ovec_size); - -/** - * Get multiple compiled regular expressions and the maximum ovector size of - * the patterns. The returned regex codes should be freed by the caller. - * - * @param params List of configuration parameters - * @param keys An array of parameter names. If an element is not found in @c params, - * the corresponding spot in @c out_codes is set to NULL. - * @param keys_size Size of both @c keys and @c out_arr - * @param options PCRE2 compilation options - * @param out_ovec_size If not NULL, the maximum ovector size of successfully - * compiled patterns is written here. - * @param out_codes An array of handles to compiled codes. The referenced pointers - * will be set to point to the compiled codes. The array size must be equal to - * @c keys array size and it must contain valid pointers. - * - * @return True, if all patterns given by @c keys were successfully compiled. - * False otherwise. - */ -bool config_get_compiled_regexes(const MXS_CONFIG_PARAMETER* params, - const char* keys[], - int keys_size, - uint32_t options, - uint32_t* out_ovec_size, - pcre2_code** out_codes[]); -/** - * Parse a list of server names and write the results in an array of strings - * with one server name in each. The output array and its elements should be - * deallocated by the caller. The server names are not checked to be actual - * configured servers. - * - * The output array may contain more elements than the the value returned, but these - * extra elements are null and in the end of the array. If no server names were - * parsed or if an error occurs, nothing is written to the output parameter. - * - * @param servers A list of server names - * @param output_array Where to save the output - * @return How many servers were found and set into the array. 0 on error or if - * none were found. - */ -int config_parse_server_list(const char* servers, char*** output_array); - -/** - * @brief Get copy of parameter value if it is defined - * - * If a parameter with the name of @c key is defined in @c params, a copy of the - * value of that parameter is returned. The caller must free the returned string. - * - * @param params List of configuration parameters - * @param key Parameter name - * - * @return Pointer to copy of value or NULL if the parameter was not found - * - * @note The use of this function should be avoided after startup as the function - * will abort the process if memory allocation fails. - */ -char* config_copy_string(const MXS_CONFIG_PARAMETER* params, const char* key); - -/** - * @brief Convert string truth value - * - * Used for truth values with @c 1, @c yes or @c true for a boolean true value and @c 0, @c no - * or @c false for a boolean false value. - * - * @param str String to convert to a truth value - * - * @return 1 if @c value is true, 0 if value is false and -1 if the value is not - * a valid truth value - */ -int config_truth_value(const char* value); - -/** - * @brief Get worker thread count - * - * @return Number of worker threads - */ -int config_threadcount(void); - -/** - * @brief Get thread stack size - * - * @return The configured worker thread stack size. - */ -size_t config_thread_stack_size(void); - - -/** - * @brief Get number of non-blocking polls - * - * @return Number of non-blocking polls - */ -unsigned int config_nbpolls(void); - -/** - * @brief Get poll sleep interval - * - * @return The time each thread waits for a blocking poll - */ -unsigned int config_pollsleep(void); - -/** - * @brief List all path parameters as JSON - * - * @param host Hostname of this server - * @return JSON object representing the paths used by MaxScale - */ -json_t* config_maxscale_to_json(const char* host); - -/** - * @brief Get DCB write queue high water mark - * - * @return Number of high water mark in bytes - */ -uint32_t config_writeq_high_water(); - -/** - * Set writeq high water mark - * - * @param size The high water mark in bytes - * - * @return True if the parameter was larger than MIN_WRITEQ_HIGH_WATER - */ -bool config_set_writeq_high_water(uint32_t size); - -/** - * @brief Get DCB write queue low water mark - * - * @return @return Number of low water mark in bytes - */ -uint32_t config_writeq_low_water(); - -/** - * Set writeq low water mark - * - * @param size The low water mark in bytes - * - * @return True if the parameter was larger than MIN_WRITEQ_LOW_WATER - */ -bool config_set_writeq_low_water(uint32_t size); - -/** - * @brief Interpret a @disk_space_threshold configuration string. - * - * @param disk_space_threshold Data structure for holding disk space configuration. - * @param config_value Configuration value from the configuration file. - * - * @return True, if @ config_value was valid, false otherwise. - * - */ -bool config_parse_disk_space_threshold(MxsDiskSpaceThreshold* disk_space_threshold, - const char* config_value); - -MXS_END_DECLS diff --git a/include/maxscale/config.hh b/include/maxscale/config.hh index 980bf467b..1cda41d53 100644 --- a/include/maxscale/config.hh +++ b/include/maxscale/config.hh @@ -12,7 +12,598 @@ */ #pragma once -#include +/** + * @file include/maxscale/config.h The configuration handling elements + */ + +#include + +#include +#include +// A mapping from a path to a percentage, e.g.: "/disk" -> 80. +typedef std::unordered_map MxsDiskSpaceThreshold; + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +class SERVICE; + +/** Default port where the REST API listens */ +#define DEFAULT_ADMIN_HTTP_PORT 8989 +#define DEFAULT_ADMIN_HOST "127.0.0.1" + +#define RELEASE_STR_LENGTH 256 +#define SYSNAME_LEN 256 +#define MAX_ADMIN_USER_LEN 1024 +#define MAX_ADMIN_PW_LEN 1024 +#define MAX_ADMIN_HOST_LEN 1024 + +/** JSON Pointers to key parts of JSON objects */ +#define MXS_JSON_PTR_DATA "/data" +#define MXS_JSON_PTR_ID "/data/id" +#define MXS_JSON_PTR_TYPE "/data/type" +#define MXS_JSON_PTR_PARAMETERS "/data/attributes/parameters" + +/** Pointers to relation lists */ +#define MXS_JSON_PTR_RELATIONSHIPS "/data/relationships" +#define MXS_JSON_PTR_RELATIONSHIPS_SERVERS "/data/relationships/servers/data" +#define MXS_JSON_PTR_RELATIONSHIPS_SERVICES "/data/relationships/services/data" +#define MXS_JSON_PTR_RELATIONSHIPS_MONITORS "/data/relationships/monitors/data" +#define MXS_JSON_PTR_RELATIONSHIPS_FILTERS "/data/relationships/filters/data" + +/** Parameter value JSON Pointers */ +#define MXS_JSON_PTR_PARAM_PORT MXS_JSON_PTR_PARAMETERS "/port" +#define MXS_JSON_PTR_PARAM_ADDRESS MXS_JSON_PTR_PARAMETERS "/address" +#define MXS_JSON_PTR_PARAM_PROTOCOL MXS_JSON_PTR_PARAMETERS "/protocol" +#define MXS_JSON_PTR_PARAM_AUTHENTICATOR MXS_JSON_PTR_PARAMETERS "/authenticator" +#define MXS_JSON_PTR_PARAM_AUTHENTICATOR_OPTIONS MXS_JSON_PTR_PARAMETERS "/authenticator_options" +#define MXS_JSON_PTR_PARAM_SSL_KEY MXS_JSON_PTR_PARAMETERS "/ssl_key" +#define MXS_JSON_PTR_PARAM_SSL_CERT MXS_JSON_PTR_PARAMETERS "/ssl_cert" +#define MXS_JSON_PTR_PARAM_SSL_CA_CERT MXS_JSON_PTR_PARAMETERS "/ssl_ca_cert" +#define MXS_JSON_PTR_PARAM_SSL_VERSION MXS_JSON_PTR_PARAMETERS "/ssl_version" +#define MXS_JSON_PTR_PARAM_SSL_CERT_VERIFY_DEPTH MXS_JSON_PTR_PARAMETERS "/ssl_cert_verify_depth" +#define MXS_JSON_PTR_PARAM_SSL_VERIFY_PEER_CERT MXS_JSON_PTR_PARAMETERS "/ssl_verify_peer_certificate" + +/** Non-parameter JSON pointers */ +#define MXS_JSON_PTR_ROUTER "/data/attributes/router" +#define MXS_JSON_PTR_MODULE "/data/attributes/module" +#define MXS_JSON_PTR_PASSWORD "/data/attributes/password" +#define MXS_JSON_PTR_ACCOUNT "/data/attributes/account" + +/** + * Common configuration parameters names + * + * All of the constants resolve to a lowercase version without the CN_ prefix. + * For example CN_PASSWORD resolves to the static string "password". + */ +extern const char CN_ACCOUNT[]; +extern const char CN_ADDRESS[]; +extern const char CN_ARG_MAX[]; +extern const char CN_ARG_MIN[]; +extern const char CN_ADMIN_AUTH[]; +extern const char CN_ADMIN_ENABLED[]; +extern const char CN_ADMIN_LOG_AUTH_FAILURES[]; +extern const char CN_ADMIN_HOST[]; +extern const char CN_ADMIN_PORT[]; +extern const char CN_ADMIN_SSL_KEY[]; +extern const char CN_ADMIN_SSL_CERT[]; +extern const char CN_ADMIN_SSL_CA_CERT[]; +extern const char CN_ARGUMENTS[]; +extern const char CN_ATTRIBUTES[]; +extern const char CN_AUTHENTICATOR[]; +extern const char CN_AUTHENTICATOR_DIAGNOSTICS[]; +extern const char CN_AUTHENTICATOR_OPTIONS[]; +extern const char CN_AUTH_ALL_SERVERS[]; +extern const char CN_AUTH_CONNECT_TIMEOUT[]; +extern const char CN_AUTH_READ_TIMEOUT[]; +extern const char CN_AUTH_WRITE_TIMEOUT[]; +extern const char CN_AUTO[]; +extern const char CN_CACHE_SIZE[]; +extern const char CN_CLASSIFY[]; +extern const char CN_CONNECTION_TIMEOUT[]; +extern const char CN_DUMP_LAST_STATEMENTS[]; +extern const char CN_DATA[]; +extern const char CN_DEFAULT[]; +extern const char CN_DESCRIPTION[]; +extern const char CN_DISK_SPACE_THRESHOLD[]; +extern const char CN_ENABLE_ROOT_USER[]; +extern const char CN_FIELDS[]; +extern const char CN_FILTERS[]; +extern const char CN_FILTER[]; +extern const char CN_FILTER_DIAGNOSTICS[]; +extern const char CN_FUNCTIONS[]; +extern const char CN_GATEWAY[]; +extern const char CN_HAS_WHERE_CLAUSE[]; +extern const char CN_ID[]; +extern const char CN_INET[]; +extern const char CN_LISTENER[]; +extern const char CN_LISTENERS[]; +extern const char CN_LOCALHOST_MATCH_WILDCARD_HOST[]; +extern const char CN_LOG_AUTH_WARNINGS[]; +extern const char CN_LOG_THROTTLING[]; +extern const char CN_MAXSCALE[]; +extern const char CN_MAX_CONNECTIONS[]; +extern const char CN_MAX_RETRY_INTERVAL[]; +extern const char CN_META[]; +extern const char CN_METHOD[]; +extern const char CN_MODULE[]; +extern const char CN_MODULES[]; +extern const char CN_MODULE_COMMAND[]; +extern const char CN_MONITORS[]; +extern const char CN_MONITOR[]; +extern const char CN_MONITOR_DIAGNOSTICS[]; +extern const char CN_MS_TIMESTAMP[]; +extern const char CN_NAME[]; +extern const char CN_NON_BLOCKING_POLLS[]; +extern const char CN_OPERATION[]; +extern const char CN_OPTIONS[]; +extern const char CN_PARAMETERS[]; +extern const char CN_PARSE_RESULT[]; +extern const char CN_PASSIVE[]; +extern const char CN_PASSWORD[]; +extern const char CN_POLL_SLEEP[]; +extern const char CN_PORT[]; +extern const char CN_EXTRA_PORT[]; +extern const char CN_PROTOCOL[]; +extern const char CN_QUERY_CLASSIFIER[]; +extern const char CN_QUERY_CLASSIFIER_ARGS[]; +extern const char CN_QUERY_CLASSIFIER_CACHE_SIZE[]; +extern const char CN_QUERY_RETRIES[]; +extern const char CN_QUERY_RETRY_TIMEOUT[]; +extern const char CN_RELATIONSHIPS[]; +extern const char CN_LINKS[]; +extern const char CN_REQUIRED[]; +extern const char CN_RETAIN_LAST_STATEMENTS[]; +extern const char CN_RETRY_ON_FAILURE[]; +extern const char CN_ROUTER[]; +extern const char CN_ROUTER_DIAGNOSTICS[]; +extern const char CN_ROUTER_OPTIONS[]; +extern const char CN_SELF[]; +extern const char CN_SERVERS[]; +extern const char CN_SERVER[]; +extern const char CN_SERVICES[]; +extern const char CN_SERVICE[]; +extern const char CN_SESSIONS[]; +extern const char CN_SESSION_TRACK_TRX_STATE[]; +extern const char CN_SKIP_PERMISSION_CHECKS[]; +extern const char CN_SOCKET[]; +extern const char CN_STATE[]; +extern const char CN_SSL[]; +extern const char CN_SSL_CA_CERT[]; +extern const char CN_SSL_CERT[]; +extern const char CN_SSL_CERT_VERIFY_DEPTH[]; +extern const char CN_SSL_VERIFY_PEER_CERTIFICATE[]; +extern const char CN_SSL_KEY[]; +extern const char CN_SSL_VERSION[]; +extern const char CN_STRIP_DB_ESC[]; +extern const char CN_SUBSTITUTE_VARIABLES[]; +extern const char CN_THREADS[]; +extern const char CN_THREAD_STACK_SIZE[]; +extern const char CN_TICKS[]; +extern const char CN_TYPE[]; +extern const char CN_TYPE_MASK[]; +extern const char CN_UNIX[]; +extern const char CN_USER[]; +extern const char CN_USERS[]; +extern const char CN_VERSION_STRING[]; +extern const char CN_WEIGHTBY[]; +extern const char CN_WRITEQ_HIGH_WATER[]; +extern const char CN_WRITEQ_LOW_WATER[]; + +/* + * Global configuration items that are read (or pre_parsed) to be available for + * subsequent configuration reading. @see config_pre_parse_global_params. + */ +extern const char CN_LOGDIR[]; +extern const char CN_LIBDIR[]; +extern const char CN_PIDDIR[]; +extern const char CN_DATADIR[]; +extern const char CN_CACHEDIR[]; +extern const char CN_LANGUAGE[]; +extern const char CN_EXECDIR[]; +extern const char CN_CONNECTOR_PLUGINDIR[]; +extern const char CN_PERSISTDIR[]; +extern const char CN_MODULE_CONFIGDIR[]; +extern const char CN_SYSLOG[]; +extern const char CN_MAXLOG[]; +extern const char CN_LOG_AUGMENTATION[]; +extern const char CN_LOG_TO_SHM[]; + +/** + * The config parameter + */ +typedef struct config_parameter +{ + char* name; /**< The name of the parameter */ + char* value; /**< The value of the parameter */ + struct config_parameter* next; /**< Next pointer in the linked list */ +} MXS_CONFIG_PARAMETER; + +/** + * The config context structure, used to build the configuration + * data during the parse process + */ +typedef struct config_context +{ + char* object; /**< The name of the object being configured */ + MXS_CONFIG_PARAMETER* parameters; /**< The list of parameter values */ + bool was_persisted; /**< True if this object was persisted */ + struct config_context* next; /**< Next pointer in the linked list */ +} CONFIG_CONTEXT; + +/** + * The gateway global configuration data + */ +typedef struct +{ + bool config_check; /**< Only check config */ + int n_threads; /**< Number of polling threads */ + size_t thread_stack_size; /**< The stack size of each worker thread */ + char release_string[RELEASE_STR_LENGTH]; /**< The release name string of the system */ + char sysname[SYSNAME_LEN]; /**< The OS name of the system */ + uint8_t mac_sha1[SHA_DIGEST_LENGTH]; /**< The SHA1 digest of an interface MAC address + * */ + unsigned int n_nbpoll; /**< Tune number of non-blocking polls */ + unsigned int pollsleep; /**< Wait time in blocking polls */ + int syslog; /**< Log to syslog */ + int maxlog; /**< Log to MaxScale's own logs */ + unsigned int auth_conn_timeout; /**< Connection timeout for the user + * authentication */ + unsigned int auth_read_timeout; /**< Read timeout for the user authentication */ + unsigned int auth_write_timeout; /**< Write timeout for the user authentication */ + bool skip_permission_checks; /**< Skip service and monitor permission checks */ + int32_t passive; /**< True if MaxScale is in passive mode */ + int64_t promoted_at; /**< Time when this Maxscale instance was + * promoted from a passive to an active */ + char qc_name[PATH_MAX]; /**< The name of the query classifier to load */ + char* qc_args; /**< Arguments for the query classifier */ + QC_CACHE_PROPERTIES qc_cache_properties; /**< The query classifier cache properties. */ + qc_sql_mode_t qc_sql_mode; /**< The query classifier sql mode */ + char admin_host[MAX_ADMIN_HOST_LEN]; /**< Admin interface host */ + uint16_t admin_port; /**< Admin interface port */ + bool admin_auth; /**< Admin interface authentication */ + bool admin_enabled; /**< Admin interface is enabled */ + bool admin_log_auth_failures; /**< Log admin interface authentication failures + * */ + char admin_ssl_key[PATH_MAX]; /**< Admin SSL key */ + char admin_ssl_cert[PATH_MAX]; /**< Admin SSL cert */ + char admin_ssl_ca_cert[PATH_MAX]; /**< Admin SSL CA cert */ + int query_retries; /**< Number of times a interrupted query is + * retried */ + time_t query_retry_timeout; /**< Timeout for query retries */ + bool substitute_variables; /**< Should environment variables be substituted + * */ + char* local_address; /**< Local address to use when connecting */ + time_t users_refresh_time; /**< How often the users can be refreshed */ + uint64_t writeq_high_water; /**< High water mark of dcb write queue */ + uint64_t writeq_low_water; /**< Low water mark of dcb write queue */ + char peer_hosts[MAX_ADMIN_HOST_LEN]; /**< The protocol, address and port for peers + * (currently only one) */ + char peer_user[MAX_ADMIN_HOST_LEN]; /**< Username for maxscale-to-maxscale traffic */ + char peer_password[MAX_ADMIN_HOST_LEN]; /**< Password for maxscale-to-maxscale traffic */ + mxb_log_target_t log_target; /**< Log type */ +} MXS_CONFIG; + +/** + * @brief Get global MaxScale configuration + * + * @return The global configuration + */ +MXS_CONFIG* config_get_global_options(); + +/** + * @brief Get a configuration parameter + * + * @param params List of parameters + * @param name Name of parameter to get + * @return The parameter or NULL if the parameter was not found + */ +MXS_CONFIG_PARAMETER* config_get_param(MXS_CONFIG_PARAMETER* params, const char* name); + +/** + * @brief Helper function for checking SSL parameters + * + * @param key Parameter name + * @return True if the parameter is an SSL parameter + */ +bool config_is_ssl_parameter(const char* key); + +/** + * @brief Check if a configuration parameter is valid + * + * If a module has declared parameters and parameters were given to the module, + * the given parameters are compared to the expected ones. This function also + * does preliminary type checking for various basic values as well as enumerations. + * + * @param params Module parameters + * @param key Parameter key + * @param value Parameter value + * @param context Configuration context or NULL for no context (uses runtime checks) + * + * @return True if the configuration parameter is valid + */ +bool config_param_is_valid(const MXS_MODULE_PARAM* params, + const char* key, + const char* value, + const CONFIG_CONTEXT* context); + +/** + * @brief Get a boolean value + * + * The existence of the parameter should be checked with config_get_param() before + * calling this function to determine whether the return value represents an existing + * value or a missing value. + * + * @param params List of configuration parameters + * @param key Parameter name + * + * @return The value as a boolean or false if none was found + */ +bool config_get_bool(const MXS_CONFIG_PARAMETER* params, const char* key); + +/** + * @brief Get an integer value + * + * This is used for both MXS_MODULE_PARAM_INT and MXS_MODULE_PARAM_COUNT. + * + * @param params List of configuration parameters + * @param key Parameter name + * + * @return The integer value of the parameter or 0 if no parameter was found + */ +int config_get_integer(const MXS_CONFIG_PARAMETER* params, const char* key); + +/** + * @brief Get a size in bytes + * + * The value can have either one of the IEC binary prefixes or SI prefixes as + * a suffix. For example, the value 1Ki will be converted to 1024 bytes whereas + * 1k will be converted to 1000 bytes. Supported SI suffix values are k, m, g and t + * in both lower and upper case. Supported IEC binary suffix values are + * Ki, Mi, Gi and Ti both in upper and lower case. + * + * @param params List of configuration parameters + * @param key Parameter name + * + * @return Number of bytes or 0 if no parameter was found + */ +uint64_t config_get_size(const MXS_CONFIG_PARAMETER* params, const char* key); + +/** + * @brief Get a string value + * + * @param params List of configuration parameters + * @param key Parameter name + * + * @return The raw string value or an empty string if no parameter was found + */ +const char* config_get_string(const MXS_CONFIG_PARAMETER* params, const char* key); + +/** + * @brief Get a enumeration value + * + * @param params List of configuration parameters + * @param key Parameter name + * @param values All possible enumeration values + * + * @return The enumeration value converted to an int or -1 if the parameter was not found + * + * @note The enumeration values should not use -1 so that an undefined parameter is + * detected. If -1 is used, config_get_param() should be used to detect whether + * the parameter exists + */ +int config_get_enum(const MXS_CONFIG_PARAMETER* params, + const char* key, + const MXS_ENUM_VALUE* values); + +/** + * @brief Get a service value + * + * @param params List of configuration parameters + * @param key Parameter name + * + * @return Pointer to configured service + */ +SERVICE* config_get_service(const MXS_CONFIG_PARAMETER* params, const char* key); + +/** + * @brief Get a server value + * + * @param params List of configuration parameters + * @param key Parameter name + * + * @return Pointer to configured server + */ +struct server* config_get_server(const MXS_CONFIG_PARAMETER* params, const char* key); + +/** + * @brief Get an array of servers. The caller should free the produced array, + * but not the array elements. + * + * @param params List of configuration parameters + * @param key Parameter name + * @param output Where to save the output + * @return How many servers were found, equal to output array size + */ +int config_get_server_list(const MXS_CONFIG_PARAMETER* params, + const char* key, + struct server*** output); + +/** + * Get a compiled regular expression and the ovector size of the pattern. The + * return value should be freed by the caller. + * + * @param params List of configuration parameters + * @param key Parameter name + * @param options PCRE2 compilation options + * @param output_ovec_size Output for match data ovector size. On error, + * nothing is written. If NULL, the parameter is ignored. + * @return Compiled regex code on success, NULL otherwise + */ +pcre2_code* config_get_compiled_regex(const MXS_CONFIG_PARAMETER* params, + const char* key, + uint32_t options, + uint32_t* output_ovec_size); + +/** + * Get multiple compiled regular expressions and the maximum ovector size of + * the patterns. The returned regex codes should be freed by the caller. + * + * @param params List of configuration parameters + * @param keys An array of parameter names. If an element is not found in @c params, + * the corresponding spot in @c out_codes is set to NULL. + * @param keys_size Size of both @c keys and @c out_arr + * @param options PCRE2 compilation options + * @param out_ovec_size If not NULL, the maximum ovector size of successfully + * compiled patterns is written here. + * @param out_codes An array of handles to compiled codes. The referenced pointers + * will be set to point to the compiled codes. The array size must be equal to + * @c keys array size and it must contain valid pointers. + * + * @return True, if all patterns given by @c keys were successfully compiled. + * False otherwise. + */ +bool config_get_compiled_regexes(const MXS_CONFIG_PARAMETER* params, + const char* keys[], + int keys_size, + uint32_t options, + uint32_t* out_ovec_size, + pcre2_code** out_codes[]); +/** + * Parse a list of server names and write the results in an array of strings + * with one server name in each. The output array and its elements should be + * deallocated by the caller. The server names are not checked to be actual + * configured servers. + * + * The output array may contain more elements than the the value returned, but these + * extra elements are null and in the end of the array. If no server names were + * parsed or if an error occurs, nothing is written to the output parameter. + * + * @param servers A list of server names + * @param output_array Where to save the output + * @return How many servers were found and set into the array. 0 on error or if + * none were found. + */ +int config_parse_server_list(const char* servers, char*** output_array); + +/** + * @brief Get copy of parameter value if it is defined + * + * If a parameter with the name of @c key is defined in @c params, a copy of the + * value of that parameter is returned. The caller must free the returned string. + * + * @param params List of configuration parameters + * @param key Parameter name + * + * @return Pointer to copy of value or NULL if the parameter was not found + * + * @note The use of this function should be avoided after startup as the function + * will abort the process if memory allocation fails. + */ +char* config_copy_string(const MXS_CONFIG_PARAMETER* params, const char* key); + +/** + * @brief Convert string truth value + * + * Used for truth values with @c 1, @c yes or @c true for a boolean true value and @c 0, @c no + * or @c false for a boolean false value. + * + * @param str String to convert to a truth value + * + * @return 1 if @c value is true, 0 if value is false and -1 if the value is not + * a valid truth value + */ +int config_truth_value(const char* value); + +/** + * @brief Get worker thread count + * + * @return Number of worker threads + */ +int config_threadcount(void); + +/** + * @brief Get thread stack size + * + * @return The configured worker thread stack size. + */ +size_t config_thread_stack_size(void); + + +/** + * @brief Get number of non-blocking polls + * + * @return Number of non-blocking polls + */ +unsigned int config_nbpolls(void); + +/** + * @brief Get poll sleep interval + * + * @return The time each thread waits for a blocking poll + */ +unsigned int config_pollsleep(void); + +/** + * @brief List all path parameters as JSON + * + * @param host Hostname of this server + * @return JSON object representing the paths used by MaxScale + */ +json_t* config_maxscale_to_json(const char* host); + +/** + * @brief Get DCB write queue high water mark + * + * @return Number of high water mark in bytes + */ +uint32_t config_writeq_high_water(); + +/** + * Set writeq high water mark + * + * @param size The high water mark in bytes + * + * @return True if the parameter was larger than MIN_WRITEQ_HIGH_WATER + */ +bool config_set_writeq_high_water(uint32_t size); + +/** + * @brief Get DCB write queue low water mark + * + * @return @return Number of low water mark in bytes + */ +uint32_t config_writeq_low_water(); + +/** + * Set writeq low water mark + * + * @param size The low water mark in bytes + * + * @return True if the parameter was larger than MIN_WRITEQ_LOW_WATER + */ +bool config_set_writeq_low_water(uint32_t size); + +/** + * @brief Interpret a @disk_space_threshold configuration string. + * + * @param disk_space_threshold Data structure for holding disk space configuration. + * @param config_value Configuration value from the configuration file. + * + * @return True, if @ config_value was valid, false otherwise. + * + */ +bool config_parse_disk_space_threshold(MxsDiskSpaceThreshold* disk_space_threshold, + const char* config_value); + namespace maxscale { diff --git a/include/maxscale/filter.h b/include/maxscale/filter.h index 077138f25..cc30093eb 100644 --- a/include/maxscale/filter.h +++ b/include/maxscale/filter.h @@ -20,13 +20,11 @@ #include #include #include -#include +#include #include #include #include -MXS_BEGIN_DECLS - /** * MXS_FILTER is an opaque type representing a particular filter instance. * @@ -264,5 +262,3 @@ typedef enum filter_capability { FCAP_TYPE_NONE = 0x0 // TODO: remove once filter capabilities are defined } filter_capability_t; - -MXS_END_DECLS diff --git a/include/maxscale/modulecmd.h b/include/maxscale/modulecmd.h index 3f9e1235d..fba303235 100644 --- a/include/maxscale/modulecmd.h +++ b/include/maxscale/modulecmd.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include MXS_BEGIN_DECLS diff --git a/include/maxscale/monitor.h b/include/maxscale/monitor.h index 3badaf6f5..4b373423d 100644 --- a/include/maxscale/monitor.h +++ b/include/maxscale/monitor.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include #include diff --git a/include/maxscale/protocol/mariadb_client.hh b/include/maxscale/protocol/mariadb_client.hh index 9be7563db..8987ec47a 100644 --- a/include/maxscale/protocol/mariadb_client.hh +++ b/include/maxscale/protocol/mariadb_client.hh @@ -18,7 +18,7 @@ #include #include -#include +#include #include /** A DCB-like client abstraction which ignores responses */ diff --git a/include/maxscale/router.h b/include/maxscale/router.h index 29bcd9c3e..ebedd6e93 100644 --- a/include/maxscale/router.h +++ b/include/maxscale/router.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include MXS_BEGIN_DECLS diff --git a/include/maxscale/server.h b/include/maxscale/server.h index c60b4a841..71229b91c 100644 --- a/include/maxscale/server.h +++ b/include/maxscale/server.h @@ -20,11 +20,9 @@ #include #include -#include +#include #include -MXS_BEGIN_DECLS - #define MAX_SERVER_ADDRESS_LEN 1024 #define MAX_SERVER_MONUSER_LEN 1024 #define MAX_SERVER_MONPW_LEN 1024 @@ -522,5 +520,3 @@ extern void dListServers(DCB*); int server_response_time_num_samples(const SERVER* server); double server_response_time_average(const SERVER* server); - -MXS_END_DECLS diff --git a/include/maxscale/service.h b/include/maxscale/service.hh similarity index 97% rename from include/maxscale/service.h rename to include/maxscale/service.hh index e3f030a2b..c127fdee3 100644 --- a/include/maxscale/service.h +++ b/include/maxscale/service.hh @@ -12,30 +12,22 @@ */ #pragma once -/** - * @file service.h - * - * The service level definitions within the gateway - */ +#include -#include - -#include -#include +#include +#include #include #include #include #include #include +#include #include #include -#include -#include +#include #include -#include - -MXS_BEGIN_DECLS +#include struct server; struct mxs_router; @@ -97,8 +89,9 @@ typedef struct server_ref_t * and a set of client side protocol/port pairs used to listen for new connections * to the service. */ -typedef struct service +class SERVICE { +public: const char* name; /**< The service name */ int state; /**< The service state */ int client_count; /**< Number of connected clients */ @@ -152,7 +145,7 @@ typedef struct service * active */ int32_t retain_last_statements; /**< How many statements to retain per session, * -1 if not explicitly specified. */ -} SERVICE; +}; typedef enum count_spec_t { @@ -280,5 +273,3 @@ typedef enum service_version_which_t * @return The version of the service. */ uint64_t service_get_version(const SERVICE* service, service_version_which_t which); - -MXS_END_DECLS diff --git a/include/maxscale/session.h b/include/maxscale/session.h index a60876384..ac2c68cea 100644 --- a/include/maxscale/session.h +++ b/include/maxscale/session.h @@ -29,7 +29,7 @@ MXS_BEGIN_DECLS struct dcb; -struct service; +class SERVICE; struct mxs_filter_def; struct mxs_filter; struct mxs_filter_session; @@ -218,7 +218,7 @@ typedef struct session struct mxs_router_session* router_session; /*< The router instance data */ MXS_SESSION_STATS stats; /*< Session statistics */ - struct service* service; /*< The service this session is using */ + SERVICE* service; /*< The service this session is using */ MXS_DOWNSTREAM head; /*< Head of the filter chain */ MXS_UPSTREAM tail; /*< The tail of the filter chain */ int refcount; /*< Reference count on the session */ @@ -295,7 +295,7 @@ bool session_route_reply(MXS_SESSION* session, GWBUF* buffer); * @param client_dcb The client side DCB * @return The newly created session or NULL if an error occurred */ -MXS_SESSION* session_alloc(struct service*, struct dcb*); +MXS_SESSION* session_alloc(SERVICE*, struct dcb*); /** * A version of session_alloc() which takes the session id number as parameter. @@ -306,7 +306,7 @@ MXS_SESSION* session_alloc(struct service*, struct dcb*); * @param id Id for the new session. * @return The newly created session or NULL if an error occurred */ -MXS_SESSION* session_alloc_with_id(struct service*, struct dcb*, uint64_t); +MXS_SESSION* session_alloc_with_id(SERVICE*, struct dcb*, uint64_t); MXS_SESSION* session_set_dummy(struct dcb*); diff --git a/include/maxscale/users.h b/include/maxscale/users.h index 0425c84a7..036aa5fbe 100644 --- a/include/maxscale/users.h +++ b/include/maxscale/users.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include MXS_BEGIN_DECLS diff --git a/server/core/admin.cc b/server/core/admin.cc index 16431f249..838b2e1ff 100644 --- a/server/core/admin.cc +++ b/server/core/admin.cc @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/core/config.cc b/server/core/config.cc index 9f2b12d96..a84e4dd9e 100644 --- a/server/core/config.cc +++ b/server/core/config.cc @@ -15,7 +15,6 @@ * @file config.c Configuration file processing */ -#include #include #include diff --git a/server/core/dcb.cc b/server/core/dcb.cc index 49b8e67b7..9e4ee265a 100644 --- a/server/core/dcb.cc +++ b/server/core/dcb.cc @@ -48,7 +48,7 @@ #include #include #include -#include +#include #include #include diff --git a/server/core/filter.cc b/server/core/filter.cc index 77718419d..d8ad0c6e1 100644 --- a/server/core/filter.cc +++ b/server/core/filter.cc @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include diff --git a/server/core/housekeeper.cc b/server/core/housekeeper.cc index 665a51ceb..66221c85c 100644 --- a/server/core/housekeeper.cc +++ b/server/core/housekeeper.cc @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/core/internal/config.hh b/server/core/internal/config.hh index 08e937c04..50d72f99d 100644 --- a/server/core/internal/config.hh +++ b/server/core/internal/config.hh @@ -16,7 +16,7 @@ * @file core/maxscale/config.h - The private config interface */ -#include +#include #include #include diff --git a/server/core/internal/config_runtime.h b/server/core/internal/config_runtime.h index 14e75b1fc..e1f4bc73d 100644 --- a/server/core/internal/config_runtime.h +++ b/server/core/internal/config_runtime.h @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "service.hh" #include "filter.hh" diff --git a/server/core/internal/service.hh b/server/core/internal/service.hh index a6f9a260f..31912c189 100644 --- a/server/core/internal/service.hh +++ b/server/core/internal/service.hh @@ -12,7 +12,7 @@ */ #pragma once -#include +#include #include #include diff --git a/server/core/json_api.cc b/server/core/json_api.cc index 990d7fff7..f876869b1 100644 --- a/server/core/json_api.cc +++ b/server/core/json_api.cc @@ -15,7 +15,7 @@ #include -#include +#include #include using std::string; diff --git a/server/core/listener.cc b/server/core/listener.cc index 70883c707..788d06913 100644 --- a/server/core/listener.cc +++ b/server/core/listener.cc @@ -40,7 +40,7 @@ #include #include #include -#include +#include static RSA* rsa_512 = NULL; static RSA* rsa_1024 = NULL; @@ -58,7 +58,7 @@ static RSA* tmp_rsa_callback(SSL* s, int is_export, int keylength); * @param ssl SSL configuration * @return New listener object or NULL if unable to allocate */ -SERV_LISTENER* listener_alloc(struct service* service, +SERV_LISTENER* listener_alloc(SERVICE* service, const char* name, const char* protocol, const char* address, diff --git a/server/core/log.cc b/server/core/log.cc index e0c4bb666..4122f5a16 100644 --- a/server/core/log.cc +++ b/server/core/log.cc @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/server/core/modulecmd.cc b/server/core/modulecmd.cc index 611e9b820..af0fb5bed 100644 --- a/server/core/modulecmd.cc +++ b/server/core/modulecmd.cc @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include "internal/filter.hh" diff --git a/server/core/mysql_utils.cc b/server/core/mysql_utils.cc index c82b8d8fd..eea72b506 100644 --- a/server/core/mysql_utils.cc +++ b/server/core/mysql_utils.cc @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include diff --git a/server/core/poll.cc b/server/core/poll.cc index 2929456da..fb7232223 100644 --- a/server/core/poll.cc +++ b/server/core/poll.cc @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include diff --git a/server/core/query_classifier.cc b/server/core/query_classifier.cc index aeeb25e1b..3fcfd78a6 100644 --- a/server/core/query_classifier.cc +++ b/server/core/query_classifier.cc @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/core/routingworker.cc b/server/core/routingworker.cc index 86d8cd9a5..4047edee4 100644 --- a/server/core/routingworker.cc +++ b/server/core/routingworker.cc @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/core/server.cc b/server/core/server.cc index aef0b9f2e..6ac9fffe6 100644 --- a/server/core/server.cc +++ b/server/core/server.cc @@ -34,8 +34,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/server/core/service.cc b/server/core/service.cc index 4ca6afd80..b1b6bf708 100644 --- a/server/core/service.cc +++ b/server/core/service.cc @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include #include diff --git a/server/core/session.cc b/server/core/session.cc index 618efe3ea..c4bff9bf8 100644 --- a/server/core/session.cc +++ b/server/core/session.cc @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff --git a/server/core/ssl.cc b/server/core/ssl.cc index bbc415c8d..e4afa3b02 100644 --- a/server/core/ssl.cc +++ b/server/core/ssl.cc @@ -33,7 +33,7 @@ #include #include #include -#include +#include /** * @brief Check client's SSL capability and start SSL if appropriate. diff --git a/server/core/test/test_dcb.cc b/server/core/test/test_dcb.cc index 8096e06f9..959e620d3 100644 --- a/server/core/test/test_dcb.cc +++ b/server/core/test/test_dcb.cc @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include diff --git a/server/core/test/test_local_address.cc b/server/core/test/test_local_address.cc index a0e3b5bcc..54078f4cc 100644 --- a/server/core/test/test_local_address.cc +++ b/server/core/test/test_local_address.cc @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include using namespace std; diff --git a/server/core/test/test_poll.cc b/server/core/test/test_poll.cc index de4f5cc08..f67b1f442 100644 --- a/server/core/test/test_poll.cc +++ b/server/core/test/test_poll.cc @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include "test_utils.h" diff --git a/server/core/test/test_utils.h b/server/core/test/test_utils.h index ae9aaae16..237ad26d6 100644 --- a/server/core/test/test_utils.h +++ b/server/core/test/test_utils.h @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/core/utils.cc b/server/core/utils.cc index 283a40f16..d2b00213f 100644 --- a/server/core/utils.cc +++ b/server/core/utils.cc @@ -43,7 +43,7 @@ #include #include -#include +#include #include #include #include diff --git a/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.cc b/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.cc index cabdf616a..b6252810b 100644 --- a/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.cc +++ b/server/modules/authenticator/GSSAPI/GSSAPIAuth/gssapi_auth.cc @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff --git a/server/modules/authenticator/HTTPAuth/http_auth.cc b/server/modules/authenticator/HTTPAuth/http_auth.cc index e6362c85f..d397d66f0 100644 --- a/server/modules/authenticator/HTTPAuth/http_auth.cc +++ b/server/modules/authenticator/HTTPAuth/http_auth.cc @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include diff --git a/server/modules/authenticator/MySQLAuth/dbusers.cc b/server/modules/authenticator/MySQLAuth/dbusers.cc index 1fc8bdc25..8d7fd30c1 100644 --- a/server/modules/authenticator/MySQLAuth/dbusers.cc +++ b/server/modules/authenticator/MySQLAuth/dbusers.cc @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include diff --git a/server/modules/authenticator/MySQLAuth/mysql_auth.h b/server/modules/authenticator/MySQLAuth/mysql_auth.h index 0588b26d6..41946c7f6 100644 --- a/server/modules/authenticator/MySQLAuth/mysql_auth.h +++ b/server/modules/authenticator/MySQLAuth/mysql_auth.h @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include diff --git a/server/modules/authenticator/PAM/PAMAuth/pam_instance.hh b/server/modules/authenticator/PAM/PAMAuth/pam_instance.hh index 164f4f4a3..3d4301c6c 100644 --- a/server/modules/authenticator/PAM/PAMAuth/pam_instance.hh +++ b/server/modules/authenticator/PAM/PAMAuth/pam_instance.hh @@ -14,7 +14,7 @@ #include "pam_auth.hh" #include -#include +#include #include /** The instance class for the client side PAM authenticator, created in pam_auth_init() */ diff --git a/server/modules/filter/cache/cachept.cc b/server/modules/filter/cache/cachept.cc index 66e0b67aa..976db70c7 100644 --- a/server/modules/filter/cache/cachept.cc +++ b/server/modules/filter/cache/cachept.cc @@ -15,7 +15,7 @@ #include "cachept.hh" #include -#include +#include #include "cachest.hh" #include "storagefactory.hh" diff --git a/server/modules/filter/cache/rules.cc b/server/modules/filter/cache/rules.cc index dbdfddbbf..270d73657 100644 --- a/server/modules/filter/cache/rules.cc +++ b/server/modules/filter/cache/rules.cc @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include #include diff --git a/server/modules/filter/cache/test/testrules.cc b/server/modules/filter/cache/test/testrules.cc index 9418b3fae..39540d275 100644 --- a/server/modules/filter/cache/test/testrules.cc +++ b/server/modules/filter/cache/test/testrules.cc @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/filter/masking/maskingfilterconfig.hh b/server/modules/filter/masking/maskingfilterconfig.hh index c3f72862e..902bfc76d 100644 --- a/server/modules/filter/masking/maskingfilterconfig.hh +++ b/server/modules/filter/masking/maskingfilterconfig.hh @@ -13,7 +13,7 @@ #pragma once #include -#include +#include #include #include diff --git a/server/modules/filter/qlafilter/qlafilter.cc b/server/modules/filter/qlafilter/qlafilter.cc index ab157e8f6..35d7b9df5 100644 --- a/server/modules/filter/qlafilter/qlafilter.cc +++ b/server/modules/filter/qlafilter/qlafilter.cc @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/filter/regexfilter/regexfilter.cc b/server/modules/filter/regexfilter/regexfilter.cc index 6bcb5ff08..72da788c1 100644 --- a/server/modules/filter/regexfilter/regexfilter.cc +++ b/server/modules/filter/regexfilter/regexfilter.cc @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/filter/tee/tee.hh b/server/modules/filter/tee/tee.hh index 844194c3e..56bdcc2a4 100644 --- a/server/modules/filter/tee/tee.hh +++ b/server/modules/filter/tee/tee.hh @@ -18,7 +18,7 @@ #include #include -#include +#include #include "teesession.hh" diff --git a/server/modules/filter/test/maxscale/module.hh b/server/modules/filter/test/maxscale/module.hh index ceff4fe54..39162359c 100644 --- a/server/modules/filter/test/maxscale/module.hh +++ b/server/modules/filter/test/maxscale/module.hh @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include namespace maxscale diff --git a/server/modules/include/cdc.h b/server/modules/include/cdc.h index 4d51a328c..8ebe7fa79 100644 --- a/server/modules/include/cdc.h +++ b/server/modules/include/cdc.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/include/debugcli.h b/server/modules/include/debugcli.h index 9288f07a4..a37eef1a9 100644 --- a/server/modules/include/debugcli.h +++ b/server/modules/include/debugcli.h @@ -28,7 +28,7 @@ */ #include -#include +#include #include MXS_BEGIN_DECLS diff --git a/server/modules/monitor/galeramon/galeramon.cc b/server/modules/monitor/galeramon/galeramon.cc index c37aa0400..034f0c569 100644 --- a/server/modules/monitor/galeramon/galeramon.cc +++ b/server/modules/monitor/galeramon/galeramon.cc @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/monitor/mmmon/mmmon.cc b/server/modules/monitor/mmmon/mmmon.cc index 80afdaf20..be1470f51 100644 --- a/server/modules/monitor/mmmon/mmmon.cc +++ b/server/modules/monitor/mmmon/mmmon.cc @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/protocol/HTTPD/httpd.h b/server/modules/protocol/HTTPD/httpd.h index e02beef45..8e072064f 100644 --- a/server/modules/protocol/HTTPD/httpd.h +++ b/server/modules/protocol/HTTPD/httpd.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/protocol/maxscaled/maxscaled.cc b/server/modules/protocol/maxscaled/maxscaled.cc index fd6b0dc63..db9873f9a 100644 --- a/server/modules/protocol/maxscaled/maxscaled.cc +++ b/server/modules/protocol/maxscaled/maxscaled.cc @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/protocol/telnetd/telnetd.cc b/server/modules/protocol/telnetd/telnetd.cc index 4595a2e5e..7fc9114f7 100644 --- a/server/modules/protocol/telnetd/telnetd.cc +++ b/server/modules/protocol/telnetd/telnetd.cc @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/avrorouter/avro.cc b/server/modules/routing/avrorouter/avro.cc index 42a9f6fa8..0942a6c5f 100644 --- a/server/modules/routing/avrorouter/avro.cc +++ b/server/modules/routing/avrorouter/avro.cc @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/avrorouter/avro_client.cc b/server/modules/routing/avrorouter/avro_client.cc index 1329e3634..d5398179d 100644 --- a/server/modules/routing/avrorouter/avro_client.cc +++ b/server/modules/routing/avrorouter/avro_client.cc @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/avrorouter/avro_main.cc b/server/modules/routing/avrorouter/avro_main.cc index 9745c8c87..ac93223ff 100644 --- a/server/modules/routing/avrorouter/avro_main.cc +++ b/server/modules/routing/avrorouter/avro_main.cc @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/avrorouter/avrorouter.hh b/server/modules/routing/avrorouter/avrorouter.hh index 7f22af073..7b3404151 100644 --- a/server/modules/routing/avrorouter/avrorouter.hh +++ b/server/modules/routing/avrorouter/avrorouter.hh @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/avrorouter/rpl.hh b/server/modules/routing/avrorouter/rpl.hh index 3728af8a6..b00eb110d 100644 --- a/server/modules/routing/avrorouter/rpl.hh +++ b/server/modules/routing/avrorouter/rpl.hh @@ -20,7 +20,7 @@ #include #include -#include +#include #include typedef std::vector Bytes; diff --git a/server/modules/routing/binlogrouter/blr.cc b/server/modules/routing/binlogrouter/blr.cc index 01660c047..1b51118ea 100644 --- a/server/modules/routing/binlogrouter/blr.cc +++ b/server/modules/routing/binlogrouter/blr.cc @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/binlogrouter/blr.hh b/server/modules/routing/binlogrouter/blr.hh index 36b3bf53b..f5ff83391 100644 --- a/server/modules/routing/binlogrouter/blr.hh +++ b/server/modules/routing/binlogrouter/blr.hh @@ -36,7 +36,7 @@ #include #include #include -#include +#include #include #include diff --git a/server/modules/routing/binlogrouter/blr_cache.cc b/server/modules/routing/binlogrouter/blr_cache.cc index c95df75f4..b22ae5868 100644 --- a/server/modules/routing/binlogrouter/blr_cache.cc +++ b/server/modules/routing/binlogrouter/blr_cache.cc @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/binlogrouter/blr_file.cc b/server/modules/routing/binlogrouter/blr_file.cc index 7ab06f7c1..9b9366eb6 100644 --- a/server/modules/routing/binlogrouter/blr_file.cc +++ b/server/modules/routing/binlogrouter/blr_file.cc @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include using std::string; diff --git a/server/modules/routing/binlogrouter/blr_master.cc b/server/modules/routing/binlogrouter/blr_master.cc index d06ca8948..46ea440cd 100644 --- a/server/modules/routing/binlogrouter/blr_master.cc +++ b/server/modules/routing/binlogrouter/blr_master.cc @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include #include diff --git a/server/modules/routing/binlogrouter/blr_slave.cc b/server/modules/routing/binlogrouter/blr_slave.cc index f0fa49940..ce7b04c01 100644 --- a/server/modules/routing/binlogrouter/blr_slave.cc +++ b/server/modules/routing/binlogrouter/blr_slave.cc @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include diff --git a/server/modules/routing/cli/cli.cc b/server/modules/routing/cli/cli.cc index 25e7d8dba..452924d9a 100644 --- a/server/modules/routing/cli/cli.cc +++ b/server/modules/routing/cli/cli.cc @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include /* The router entry points */ diff --git a/server/modules/routing/debugcli/debugcli.cc b/server/modules/routing/debugcli/debugcli.cc index 8fc46c324..f883f6ca0 100644 --- a/server/modules/routing/debugcli/debugcli.cc +++ b/server/modules/routing/debugcli/debugcli.cc @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include /* The router entry points */ diff --git a/server/modules/routing/debugcli/debugcmd.cc b/server/modules/routing/debugcli/debugcmd.cc index 38e75180a..6249fb976 100644 --- a/server/modules/routing/debugcli/debugcmd.cc +++ b/server/modules/routing/debugcli/debugcmd.cc @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/hintrouter/dcb.cc b/server/modules/routing/hintrouter/dcb.cc index 42be267eb..2af05398d 100644 --- a/server/modules/routing/hintrouter/dcb.cc +++ b/server/modules/routing/hintrouter/dcb.cc @@ -13,7 +13,7 @@ #include "dcb.hh" #include -#include +#include Dcb::Dcb(DCB* pDcb) : m_sInner() diff --git a/server/modules/routing/maxinfo/maxinfo.cc b/server/modules/routing/maxinfo/maxinfo.cc index 523c6a057..7d9a58075 100644 --- a/server/modules/routing/maxinfo/maxinfo.cc +++ b/server/modules/routing/maxinfo/maxinfo.cc @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/maxinfo/maxinfo.h b/server/modules/routing/maxinfo/maxinfo.h index 7a4c9c930..35ab41973 100644 --- a/server/modules/routing/maxinfo/maxinfo.h +++ b/server/modules/routing/maxinfo/maxinfo.h @@ -29,7 +29,7 @@ #define MXS_MODULE_NAME "maxinfo" #include -#include +#include #include #include diff --git a/server/modules/routing/maxinfo/maxinfo_error.cc b/server/modules/routing/maxinfo/maxinfo_error.cc index 3b0480445..5fc1bcd51 100644 --- a/server/modules/routing/maxinfo/maxinfo_error.cc +++ b/server/modules/routing/maxinfo/maxinfo_error.cc @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/maxinfo/maxinfo_exec.cc b/server/modules/routing/maxinfo/maxinfo_exec.cc index a51a14350..27f0b6dc2 100644 --- a/server/modules/routing/maxinfo/maxinfo_exec.cc +++ b/server/modules/routing/maxinfo/maxinfo_exec.cc @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include #include @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include "../../../core/internal/maxscale.h" diff --git a/server/modules/routing/maxinfo/maxinfo_parse.cc b/server/modules/routing/maxinfo/maxinfo_parse.cc index 5b9b75191..c1152621e 100644 --- a/server/modules/routing/maxinfo/maxinfo_parse.cc +++ b/server/modules/routing/maxinfo/maxinfo_parse.cc @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/readconnroute/readconnection.h b/server/modules/routing/readconnroute/readconnection.h index 741bf7b30..443edf1b5 100644 --- a/server/modules/routing/readconnroute/readconnection.h +++ b/server/modules/routing/readconnroute/readconnection.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include /** diff --git a/server/modules/routing/readwritesplit/readwritesplit.hh b/server/modules/routing/readwritesplit/readwritesplit.hh index 02823f6ef..3e760f7be 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.hh +++ b/server/modules/routing/readwritesplit/readwritesplit.hh @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/server/modules/routing/schemarouter/schemarouter.hh b/server/modules/routing/schemarouter/schemarouter.hh index 411d1b667..50b9c113b 100644 --- a/server/modules/routing/schemarouter/schemarouter.hh +++ b/server/modules/routing/schemarouter/schemarouter.hh @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include diff --git a/server/modules/routing/schemarouter/shard_map.hh b/server/modules/routing/schemarouter/shard_map.hh index f26891d30..426c95d70 100644 --- a/server/modules/routing/schemarouter/shard_map.hh +++ b/server/modules/routing/schemarouter/shard_map.hh @@ -19,7 +19,7 @@ #include #include -#include +#include using namespace maxscale;