diff options
author | Dmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com> | 2022-04-20 16:07:55 +0300 |
---|---|---|
committer | Dmitrijs Goloscapovs <dmitrijs.goloscapovs@zabbix.com> | 2022-04-20 16:07:55 +0300 |
commit | 1e1dbac949c573bcaec90ba78d1fd7feb861a78f (patch) | |
tree | 60369e2600c5d58b59ecf69e279d4b913e0cc461 /include | |
parent | 0b614eec1c789b286f0779883a9722f340daf297 (diff) | |
parent | 6da7abd84c7d80ddb4e9ac8a8197549308cf55e5 (diff) |
.......... [ZBX-20638] updated to latest release/6.0
Diffstat (limited to 'include')
-rw-r--r-- | include/cfg.h | 7 | ||||
-rw-r--r-- | include/common.h | 5 | ||||
-rw-r--r-- | include/db.h | 3 | ||||
-rw-r--r-- | include/dbcache.h | 2 | ||||
-rw-r--r-- | include/discovery.h | 1 | ||||
-rw-r--r-- | include/disk.h | 2 | ||||
-rw-r--r-- | include/perfmon.h | 4 | ||||
-rw-r--r-- | include/preproc.h | 2 | ||||
-rw-r--r-- | include/proxy.h | 2 | ||||
-rw-r--r-- | include/service_protocol.h | 1 | ||||
-rw-r--r-- | include/setproctitle.h | 2 | ||||
-rw-r--r-- | include/sha256crypt.h | 2 | ||||
-rw-r--r-- | include/symbols.h | 4 | ||||
-rw-r--r-- | include/version.h | 4 | ||||
-rw-r--r-- | include/zbxalert.h | 1 | ||||
-rw-r--r-- | include/zbxalgo.h | 1 | ||||
-rw-r--r-- | include/zbxavailability.h | 1 | ||||
-rw-r--r-- | include/zbxcompress.h | 2 | ||||
-rw-r--r-- | include/zbxeval.h | 12 | ||||
-rw-r--r-- | include/zbxexec.h | 2 | ||||
-rw-r--r-- | include/zbxhttp.h | 6 | ||||
-rw-r--r-- | include/zbxipcservice.h | 1 | ||||
-rw-r--r-- | include/zbxlld.h | 1 | ||||
-rw-r--r-- | include/zbxrtc.h | 1 | ||||
-rw-r--r-- | include/zbxserver.h | 4 | ||||
-rw-r--r-- | include/zbxservice.h | 1 | ||||
-rw-r--r-- | include/zbxvariant.h | 1 |
27 files changed, 34 insertions, 41 deletions
diff --git a/include/cfg.h b/include/cfg.h index 096326c49d4..5159053cecb 100644 --- a/include/cfg.h +++ b/include/cfg.h @@ -70,11 +70,14 @@ typedef struct } zbx_addr_t; +typedef struct +{ + int (*cfg_custom_parameter_parser_func)(const char *value, const struct cfg_line *cfg); +} cfg_custom_parameter_parser_t; + void zbx_addr_copy(zbx_vector_ptr_t *addr_to, const zbx_vector_ptr_t *addr_from); void zbx_addr_free(zbx_addr_t *addr); -typedef int (*cfg_custom_parameter_parser_t)(const char *value, struct cfg_line *cfg); - int parse_cfg_file(const char *cfg_file, struct cfg_line *cfg, int optional, int strict, int noexit); int check_cfg_feature_int(const char *parameter, int value, const char *feature); diff --git a/include/common.h b/include/common.h index ca28821dc09..513d00d84bc 100644 --- a/include/common.h +++ b/include/common.h @@ -21,7 +21,6 @@ #define ZABBIX_COMMON_H #include "sysinc.h" -#include "zbxtypes.h" #include "module.h" #include "version.h" #include "md5.h" @@ -99,6 +98,7 @@ extern char ZABBIX_EVENT_SOURCE[ZBX_SERVICE_NAME_LEN]; #define AGENT_ERROR -5 #define GATEWAY_ERROR -6 #define CONFIG_ERROR -7 +#define SIG_ERROR -8 #define SUCCEED_OR_FAIL(result) (FAIL != (result) ? SUCCEED : FAIL) const char *zbx_sysinfo_ret_string(int ret); @@ -188,6 +188,7 @@ typedef enum INTERFACE_TYPE_SNMP, INTERFACE_TYPE_IPMI, INTERFACE_TYPE_JMX, + INTERFACE_TYPE_OPT = 254, INTERFACE_TYPE_ANY = 255 } zbx_interface_type_t; @@ -1693,7 +1694,7 @@ int zbx_validate_value_dbl(double value, int dbl_precision); void zbx_update_env(double time_now); int zbx_get_agent_item_nextcheck(zbx_uint64_t itemid, const char *delay, int now, - int *nextcheck, char **error); + int *nextcheck, int *scheduling, char **error); #define ZBX_DATA_SESSION_TOKEN_SIZE (MD5_DIGEST_SIZE * 2) char *zbx_create_token(zbx_uint64_t seed); diff --git a/include/db.h b/include/db.h index 53b95faad8f..89f309db40a 100644 --- a/include/db.h +++ b/include/db.h @@ -20,7 +20,6 @@ #ifndef ZABBIX_DB_H #define ZABBIX_DB_H -#include "common.h" #include "zbxalgo.h" #include "zbxdb.h" #include "dbschema.h" @@ -75,7 +74,7 @@ zbx_graph_item_type; #define TRIGGER_OPDATA_LEN 255 #define TRIGGER_URL_LEN 255 -#define TRIGGER_DESCRIPTION_LEN 2048 +#define TRIGGER_DESCRIPTION_LEN 255 #define TRIGGER_EXPRESSION_LEN 2048 #define TRIGGER_EXPRESSION_LEN_MAX (TRIGGER_EXPRESSION_LEN + 1) #if defined(HAVE_ORACLE) diff --git a/include/dbcache.h b/include/dbcache.h index ee7f442fa40..bff0b519217 100644 --- a/include/dbcache.h +++ b/include/dbcache.h @@ -23,8 +23,6 @@ #include "sysinfo.h" //included for convenience #include "db.h" #include "comms.h" -#include "zbxalgo.h" -#include "zbxjson.h" #include "memalloc.h" #include "zbxeval.h" diff --git a/include/discovery.h b/include/discovery.h index edbab8ef2de..8018b03bcf0 100644 --- a/include/discovery.h +++ b/include/discovery.h @@ -1,4 +1,3 @@ - /* ** Zabbix ** Copyright (C) 2001-2022 Zabbix SIA diff --git a/include/disk.h b/include/disk.h index 85cdfa962d8..e544863e612 100644 --- a/include/disk.h +++ b/include/disk.h @@ -20,6 +20,8 @@ #ifndef ZABBIX_DISK_H #define ZABBIX_DISK_H +#include "config.h" + #if !defined(_WINDOWS) && !defined(__MINGW32__) # error "This module is only available for Windows OS" #endif diff --git a/include/perfmon.h b/include/perfmon.h index 12a03797339..2202c32f7bb 100644 --- a/include/perfmon.h +++ b/include/perfmon.h @@ -20,12 +20,12 @@ #ifndef ZABBIX_PERFMON_H #define ZABBIX_PERFMON_H +#include "sysinc.h" + #if !defined(_WINDOWS) && !defined(__MINGW32__) # error "This module is only available for Windows OS" #endif -#include "sysinc.h" - /* this struct must be only modified along with mapping builtin_counter_ref[] in perfmon.c */ typedef enum { diff --git a/include/preproc.h b/include/preproc.h index d06b2b60ec5..662110dbcb6 100644 --- a/include/preproc.h +++ b/include/preproc.h @@ -20,10 +20,8 @@ #ifndef ZABBIX_PREPROC_H #define ZABBIX_PREPROC_H -#include "common.h" #include "module.h" #include "dbcache.h" -#include "zbxvariant.h" /* preprocessing step execution result */ typedef struct diff --git a/include/proxy.h b/include/proxy.h index 6170f1228a0..1ebd4b8e995 100644 --- a/include/proxy.h +++ b/include/proxy.h @@ -20,8 +20,6 @@ #ifndef ZABBIX_PROXY_H #define ZABBIX_PROXY_H -#include "zbxjson.h" -#include "comms.h" #include "dbcache.h" #define ZBX_PROXYMODE_ACTIVE 0 diff --git a/include/service_protocol.h b/include/service_protocol.h index fa0a2776a24..baad5c53ab0 100644 --- a/include/service_protocol.h +++ b/include/service_protocol.h @@ -20,7 +20,6 @@ #ifndef ZABBIX_SERVICE_PROTOCOL_H #define ZABBIX_SERVICE_PROTOCOL_H -#include "zbxalgo.h" #include "zbxservice.h" typedef struct diff --git a/include/setproctitle.h b/include/setproctitle.h index 43d856d2db8..f61c036d58e 100644 --- a/include/setproctitle.h +++ b/include/setproctitle.h @@ -20,6 +20,8 @@ #ifndef ZABBIX_SETPROCTITLE_H #define ZABBIX_SETPROCTITLE_H +#include "sysinc.h" + #if defined(__linux__) /* Linux */ # define PS_OVERWRITE_ARGV #elif defined(_AIX) /* AIX */ diff --git a/include/sha256crypt.h b/include/sha256crypt.h index aae5faf1aa6..f799f0c4f5b 100644 --- a/include/sha256crypt.h +++ b/include/sha256crypt.h @@ -20,7 +20,7 @@ #ifndef ZABBIX_SHA256CRYPT_H #define ZABBIX_SHA256CRYPT_H -#include "common.h" +#include "sysinc.h" #define ZBX_SHA256_DIGEST_SIZE 32 diff --git a/include/symbols.h b/include/symbols.h index 0558e2fac45..da009b70d27 100644 --- a/include/symbols.h +++ b/include/symbols.h @@ -20,10 +20,10 @@ #ifndef ZABBIX_SYMBOLS_H #define ZABBIX_SYMBOLS_H -#if defined(_WINDOWS) || defined(__MINGW32__) - #include "sysinc.h" +#if defined(_WINDOWS) || defined(__MINGW32__) + /* some definitions which are not available on older MS Windows versions */ typedef enum { /* we only use below values, the rest of enumerated values are omitted here */ diff --git a/include/version.h b/include/version.h index 2fdf1588356..5b214d31df9 100644 --- a/include/version.h +++ b/include/version.h @@ -24,10 +24,10 @@ #define ZBX_STR(str) ZBX_STR2(str) #define APPLICATION_NAME "Zabbix Agent" -#define ZABBIX_REVDATE "22 February 2022" +#define ZABBIX_REVDATE "4 April 2022" #define ZABBIX_VERSION_MAJOR 6 #define ZABBIX_VERSION_MINOR 0 -#define ZABBIX_VERSION_PATCH 1 +#define ZABBIX_VERSION_PATCH 4 #ifndef ZABBIX_VERSION_REVISION # define ZABBIX_VERSION_REVISION {ZABBIX_REVISION} #endif diff --git a/include/zbxalert.h b/include/zbxalert.h index ebf0d7ba6ab..a7a14291598 100644 --- a/include/zbxalert.h +++ b/include/zbxalert.h @@ -20,7 +20,6 @@ #ifndef ZABBIX_ZBXALERT_H #define ZABBIX_ZBXALERT_H -#include "common.h" #include "db.h" #include "zbxipcservice.h" diff --git a/include/zbxalgo.h b/include/zbxalgo.h index 1779138d8c3..d7b82c09465 100644 --- a/include/zbxalgo.h +++ b/include/zbxalgo.h @@ -472,6 +472,7 @@ void zbx_list_iterator_clear(zbx_list_iterator_t *iterator); int zbx_list_iterator_equal(const zbx_list_iterator_t *iterator1, const zbx_list_iterator_t *iterator2); int zbx_list_iterator_isset(const zbx_list_iterator_t *iterator); void zbx_list_iterator_update(zbx_list_iterator_t *iterator); +void *zbx_list_iterator_remove_next(zbx_list_iterator_t *iterator); ZBX_PTR_VECTOR_DECL(tags, zbx_tag_t*) diff --git a/include/zbxavailability.h b/include/zbxavailability.h index 7779be6638a..b5008c208e0 100644 --- a/include/zbxavailability.h +++ b/include/zbxavailability.h @@ -21,7 +21,6 @@ #define ZABBIX_AVAILABILITY_H #include "zbxtypes.h" -#include "zbxalgo.h" #include "db.h" #define ZBX_IPC_SERVICE_AVAILABILITY "availability" diff --git a/include/zbxcompress.h b/include/zbxcompress.h index 6e42fc3c854..cdea21ca2ce 100644 --- a/include/zbxcompress.h +++ b/include/zbxcompress.h @@ -20,6 +20,8 @@ #ifndef ZABBIX_COMPRESS_H #define ZABBIX_COMPRESS_H +#include "zbxtypes.h" + int zbx_compress(const char *in, size_t size_in, char **out, size_t *size_out); int zbx_uncompress(const char *in, size_t size_in, char *out, size_t *size_out); const char *zbx_compress_strerror(void); diff --git a/include/zbxeval.h b/include/zbxeval.h index d7d2fc0c65f..676ab972c87 100644 --- a/include/zbxeval.h +++ b/include/zbxeval.h @@ -20,8 +20,6 @@ #ifndef ZABBIX_ZBXEVAL_H #define ZABBIX_ZBXEVAL_H -#include "common.h" -#include "zbxalgo.h" #include "zbxvariant.h" /* @@ -105,12 +103,12 @@ /* expression parsing rules */ -#define ZBX_EVAL_PARSE_TRIGGER_EXPRESSSION (ZBX_EVAL_PARSE_MACRO | ZBX_EVAL_PARSE_USERMACRO |\ +#define ZBX_EVAL_PARSE_TRIGGER_EXPRESSION (ZBX_EVAL_PARSE_MACRO | ZBX_EVAL_PARSE_USERMACRO |\ ZBX_EVAL_PARSE_FUNCTIONID | ZBX_EVAL_PARSE_FUNCTION |\ ZBX_EVAL_PARSE_MATH | ZBX_EVAL_PARSE_COMPARE |\ ZBX_EVAL_PARSE_LOGIC | ZBX_EVAL_PARSE_VAR) -#define ZBX_EVAL_PARSE_CALC_EXPRESSSION (ZBX_EVAL_PARSE_MACRO | ZBX_EVAL_PARSE_USERMACRO |\ +#define ZBX_EVAL_PARSE_CALC_EXPRESSION (ZBX_EVAL_PARSE_MACRO | ZBX_EVAL_PARSE_USERMACRO |\ ZBX_EVAL_PARSE_ITEM_QUERY | ZBX_EVAL_PARSE_FUNCTION |\ ZBX_EVAL_PARSE_MATH | ZBX_EVAL_PARSE_COMPARE |\ ZBX_EVAL_PARSE_LOGIC | ZBX_EVAL_PARSE_VAR |\ @@ -138,16 +136,16 @@ /* composite rules */ -#define ZBX_EVAL_TRIGGER_EXPRESSION (ZBX_EVAL_PARSE_TRIGGER_EXPRESSSION | \ +#define ZBX_EVAL_TRIGGER_EXPRESSION (ZBX_EVAL_PARSE_TRIGGER_EXPRESSION | \ ZBX_EVAL_PARSE_CONST_INDEX | \ ZBX_EVAL_PROCESS_ERROR) -#define ZBX_EVAL_TRIGGER_EXPRESSION_LLD (ZBX_EVAL_PARSE_TRIGGER_EXPRESSSION | \ +#define ZBX_EVAL_TRIGGER_EXPRESSION_LLD (ZBX_EVAL_PARSE_TRIGGER_EXPRESSION | \ ZBX_EVAL_PARSE_LLDMACRO | \ ZBX_EVAL_COMPOSE_LLD | \ ZBX_EVAL_COMPOSE_FUNCTIONID) -#define ZBX_EVAL_CALC_EXPRESSION_LLD (ZBX_EVAL_PARSE_CALC_EXPRESSSION | \ +#define ZBX_EVAL_CALC_EXPRESSION_LLD (ZBX_EVAL_PARSE_CALC_EXPRESSION | \ ZBX_EVAL_PARSE_LLDMACRO | \ ZBX_EVAL_COMPOSE_LLD) diff --git a/include/zbxexec.h b/include/zbxexec.h index c16904d1774..9ec549216b1 100644 --- a/include/zbxexec.h +++ b/include/zbxexec.h @@ -20,6 +20,8 @@ #ifndef ZABBIX_ZBXEXEC_H #define ZABBIX_ZBXEXEC_H +#include "sysinc.h" + #define ZBX_EXIT_CODE_CHECKS_DISABLED 0 #define ZBX_EXIT_CODE_CHECKS_ENABLED 1 diff --git a/include/zbxhttp.h b/include/zbxhttp.h index 1338175d1b5..b6d1513c5e5 100644 --- a/include/zbxhttp.h +++ b/include/zbxhttp.h @@ -39,8 +39,10 @@ zbx_http_response_t; size_t zbx_curl_write_cb(void *ptr, size_t size, size_t nmemb, void *userdata); size_t zbx_curl_ignore_cb(void *ptr, size_t size, size_t nmemb, void *userdata); -int zbx_http_prepare_callbacks(CURL *easyhandle, zbx_http_response_t *header, - zbx_http_response_t *body, void *header_cb, void *body_cb, char *errbuf, char **error); +typedef size_t (*zbx_curl_cb_t)(void *ptr, size_t size, size_t nmemb, void *userdata); + +int zbx_http_prepare_callbacks(CURL *easyhandle, zbx_http_response_t *header, zbx_http_response_t *body, + zbx_curl_cb_t header_cb, zbx_curl_cb_t body_cb, char *errbuf, char **error); int zbx_http_prepare_ssl(CURL *easyhandle, const char *ssl_cert_file, const char *ssl_key_file, const char *ssl_key_password, unsigned char verify_peer, unsigned char verify_host, char **error); int zbx_http_prepare_auth(CURL *easyhandle, unsigned char authtype, const char *username, const char *password, diff --git a/include/zbxipcservice.h b/include/zbxipcservice.h index c1dd5fa08e1..5695ae0e6a1 100644 --- a/include/zbxipcservice.h +++ b/include/zbxipcservice.h @@ -20,7 +20,6 @@ #ifndef ZABBIX_ZBXIPCSERVICE_H #define ZABBIX_ZBXIPCSERVICE_H -#include "common.h" #include "zbxalgo.h" #define ZBX_IPC_SOCKET_BUFFER_SIZE 4096 diff --git a/include/zbxlld.h b/include/zbxlld.h index 198afc0808d..196a4e0c8dd 100644 --- a/include/zbxlld.h +++ b/include/zbxlld.h @@ -20,7 +20,6 @@ #ifndef ZABBIX_LLD_H #define ZABBIX_LLD_H -#include "common.h" #include "zbxalgo.h" void zbx_lld_process_value(zbx_uint64_t itemid, zbx_uint64_t hostid, const char *value, const zbx_timespec_t *ts, unsigned char meta, diff --git a/include/zbxrtc.h b/include/zbxrtc.h index 50053cfcf64..ab44c05d245 100644 --- a/include/zbxrtc.h +++ b/include/zbxrtc.h @@ -20,7 +20,6 @@ #ifndef ZABBIX_ZBXRTC_H #define ZABBIX_ZBXRTC_H -#include "zbxalgo.h" #include "zbxipcservice.h" typedef struct diff --git a/include/zbxserver.h b/include/zbxserver.h index db0d65fa8df..1c35b256756 100644 --- a/include/zbxserver.h +++ b/include/zbxserver.h @@ -20,12 +20,8 @@ #ifndef ZABBIX_ZBXSERVER_H #define ZABBIX_ZBXSERVER_H -#include "common.h" -#include "db.h" #include "dbcache.h" -#include "zbxjson.h" #include "zbxvariant.h" -#include "zbxeval.h" #define MACRO_TYPE_MESSAGE_NORMAL 0x00000001 #define MACRO_TYPE_MESSAGE_RECOVERY 0x00000002 diff --git a/include/zbxservice.h b/include/zbxservice.h index b351da655ed..d98de741a9b 100644 --- a/include/zbxservice.h +++ b/include/zbxservice.h @@ -21,7 +21,6 @@ #define ZABBIX_SERVICE_H #include "zbxtypes.h" -#include "zbxalgo.h" #include "db.h" #include "zbxipcservice.h" diff --git a/include/zbxvariant.h b/include/zbxvariant.h index 5494b9f2d0d..32d743261e9 100644 --- a/include/zbxvariant.h +++ b/include/zbxvariant.h @@ -20,7 +20,6 @@ #ifndef ZABBIX_ZBXVARIANT_H #define ZABBIX_ZBXVARIANT_H -#include "common.h" #include "zbxalgo.h" typedef union |