Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrejs Kozlovs <andrejs.kozlovs@zabbix.com>2021-01-14 08:36:24 +0300
committerAndrejs Kozlovs <andrejs.kozlovs@zabbix.com>2021-01-14 08:36:24 +0300
commit691cffeb5e50ac48d9f1c53cb9021b52c8556d89 (patch)
treeeb8e6257e3d2e827994e94ba196a98bc140ddb3d /include
parent4dbcd7b71737c62213b19e121cc8cf1edc7eb630 (diff)
parent10623996b1c0468b48c56a1ee3abc1cf810b6a87 (diff)
A.F....PS. [ZBXNEXT-5518] update from branch 'master' of https://git.zabbix.com/scm/zbx/zabbix into feature/ZBXNEXT-5518-5.3
Diffstat (limited to 'include')
-rw-r--r--include/alias.h2
-rw-r--r--include/avail_protocol.h7
-rw-r--r--include/base64.h2
-rw-r--r--include/cfg.h2
-rw-r--r--include/common.h12
-rw-r--r--include/comms.h2
-rw-r--r--include/daemon.h2
-rw-r--r--include/db.h21
-rw-r--r--include/dbcache.h50
-rw-r--r--include/dbschema.h2
-rw-r--r--include/discovery.h2
-rw-r--r--include/disk.h2
-rw-r--r--include/export.h2
-rw-r--r--include/ipc.h2
-rw-r--r--include/log.h2
-rw-r--r--include/memalloc.h2
-rw-r--r--include/modbtype.h5
-rw-r--r--include/module.h2
-rw-r--r--include/mutexs.h2
-rw-r--r--include/perfmon.h2
-rw-r--r--include/pid.h2
-rw-r--r--include/preproc.h2
-rw-r--r--include/proxy.h5
-rw-r--r--include/service.h2
-rw-r--r--include/setproctitle.h2
-rw-r--r--include/sighandler.h2
-rw-r--r--include/symbols.h2
-rw-r--r--include/sysinc.h2
-rw-r--r--include/sysinfo.h2
-rw-r--r--include/telnet.h2
-rw-r--r--include/threads.h2
-rw-r--r--include/version.h2
-rw-r--r--include/zbxalert.h2
-rw-r--r--include/zbxalgo.h2
-rw-r--r--include/zbxavailability.h5
-rw-r--r--include/zbxcompress.h2
-rw-r--r--include/zbxcrypto.h2
-rw-r--r--include/zbxdb.h2
-rw-r--r--include/zbxdbupgrade.h2
-rw-r--r--include/zbxdiag.h2
-rw-r--r--include/zbxembed.h2
-rw-r--r--include/zbxexec.h2
-rw-r--r--include/zbxhistory.h2
-rw-r--r--include/zbxhttp.h2
-rw-r--r--include/zbxicmpping.h2
-rw-r--r--include/zbxipcservice.h2
-rw-r--r--include/zbxjson.h13
-rw-r--r--include/zbxlld.h2
-rw-r--r--include/zbxmedia.h2
-rw-r--r--include/zbxmodules.h2
-rw-r--r--include/zbxnix.h2
-rw-r--r--include/zbxprometheus.h2
-rw-r--r--include/zbxregexp.h2
-rw-r--r--include/zbxself.h2
-rw-r--r--include/zbxserialize.h2
-rw-r--r--include/zbxserver.h2
-rw-r--r--include/zbxtasks.h2
-rw-r--r--include/zbxtrends.h2
-rw-r--r--include/zbxtypes.h2
-rw-r--r--include/zbxvault.h2
60 files changed, 104 insertions, 118 deletions
diff --git a/include/alias.h b/include/alias.h
index ebe76261db8..ac61ff28ebe 100644
--- a/include/alias.h
+++ b/include/alias.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/avail_protocol.h b/include/avail_protocol.h
index a9db7bd25e1..9407926da55 100644
--- a/include/avail_protocol.h
+++ b/include/avail_protocol.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@
#include "zbxalgo.h"
void zbx_availability_serialize(unsigned char **data, size_t *data_alloc, size_t *data_offset,
- const zbx_host_availability_t *host_availability);
-void zbx_availability_deserialize(const unsigned char *data, zbx_uint32_t size, zbx_vector_ptr_t *host_availabilities);
+ const zbx_interface_availability_t *interface_availability);
+void zbx_availability_deserialize(const unsigned char *data, zbx_uint32_t size,
+ zbx_vector_availability_ptr_t *interface_availabilities);
#endif
diff --git a/include/base64.h b/include/base64.h
index 667e3d9de13..d1357cb2ce4 100644
--- a/include/base64.h
+++ b/include/base64.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/cfg.h b/include/cfg.h
index d03169c843b..51bce71276c 100644
--- a/include/cfg.h
+++ b/include/cfg.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/common.h b/include/common.h
index a7e6ff81832..85b7e665be3 100644
--- a/include/common.h
+++ b/include/common.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -377,6 +377,8 @@ const char *zbx_dservice_type_string(zbx_dservice_type_t service);
#define CONDITION_OPERATOR_NOT_REGEXP 9
#define CONDITION_OPERATOR_YES 10
#define CONDITION_OPERATOR_NO 11
+#define CONDITION_OPERATOR_EXIST 12
+#define CONDITION_OPERATOR_NOT_EXIST 13
/* maintenance tag operators */
#define ZBX_MAINTENANCE_TAG_OPERATOR_EQUAL 0
@@ -638,10 +640,10 @@ zbx_prototype_discover_t;
#define HOST_INVENTORY_FIELD_COUNT 70
-/* host availability */
-#define HOST_AVAILABLE_UNKNOWN 0
-#define HOST_AVAILABLE_TRUE 1
-#define HOST_AVAILABLE_FALSE 2
+/* interface availability */
+#define INTERFACE_AVAILABLE_UNKNOWN 0
+#define INTERFACE_AVAILABLE_TRUE 1
+#define INTERFACE_AVAILABLE_FALSE 2
/* trigger statuses */
#define TRIGGER_STATUS_ENABLED 0
diff --git a/include/comms.h b/include/comms.h
index ba1f1730069..f1e5f8c5a70 100644
--- a/include/comms.h
+++ b/include/comms.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/daemon.h b/include/daemon.h
index 78dfb9cdc10..0240e362094 100644
--- a/include/daemon.h
+++ b/include/daemon.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/db.h b/include/db.h
index 972b88cd92c..1c721098c6d 100644
--- a/include/db.h
+++ b/include/db.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -94,8 +94,6 @@ struct _DC_TRIGGER;
#define HOST_HOST_LEN MAX_ZBX_HOSTNAME_LEN
#define HOST_HOST_LEN_MAX (HOST_HOST_LEN + 1)
#define HOST_NAME_LEN 128
-#define HOST_ERROR_LEN 2048
-#define HOST_ERROR_LEN_MAX (HOST_ERROR_LEN + 1)
#define HOST_IPMI_USERNAME_LEN 16
#define HOST_IPMI_USERNAME_LEN_MAX (HOST_IPMI_USERNAME_LEN + 1)
#define HOST_IPMI_PASSWORD_LEN 20
@@ -111,6 +109,8 @@ struct _DC_TRIGGER;
#define INTERFACE_ADDR_LEN_MAX (INTERFACE_ADDR_LEN + 1)
#define INTERFACE_PORT_LEN 64
#define INTERFACE_PORT_LEN_MAX (INTERFACE_PORT_LEN + 1)
+#define INTERFACE_ERROR_LEN 2048
+#define INTERFACE_ERROR_LEN_MAX (INTERFACE_ERROR_LEN + 1)
#define ITEM_NAME_LEN 255
#define ITEM_KEY_LEN 2048
@@ -566,7 +566,6 @@ char *DBdyn_escape_string(const char *src);
char *DBdyn_escape_string_len(const char *src, size_t length);
char *DBdyn_escape_like_pattern(const char *src);
-zbx_uint64_t DBadd_host(char *server, int port, int status, int useip, char *ip, int disable_until, int available);
int DBadd_templates_to_host(int hostid, int host_templateid);
int DBadd_template_linkage(int hostid, int templateid, int items, int triggers, int graphs);
@@ -729,14 +728,16 @@ zbx_agent_availability_t;
typedef struct
{
- zbx_uint64_t hostid;
-
- zbx_agent_availability_t agents[ZBX_AGENT_MAX];
- int id; /* ensure chronological order in case of flapping host availability */
+ zbx_uint64_t interfaceid;
+ zbx_agent_availability_t agent;
+ /* ensure chronological order in case of flapping interface availability */
+ int id;
}
-zbx_host_availability_t;
+zbx_interface_availability_t;
+
+ZBX_PTR_VECTOR_DECL(availability_ptr, zbx_interface_availability_t *);
-void zbx_db_update_host_availabilities(const zbx_vector_ptr_t *host_availabilities);
+void zbx_db_update_interface_availabilities(const zbx_vector_availability_ptr_t *interface_availabilities);
int DBget_user_by_active_session(const char *sessionid, zbx_user_t *user);
typedef struct
diff --git a/include/dbcache.h b/include/dbcache.h
index d8e72d0a4e9..70daf1cd463 100644
--- a/include/dbcache.h
+++ b/include/dbcache.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -82,6 +82,10 @@ typedef struct
unsigned char useip;
unsigned char type;
unsigned char main;
+ unsigned char available;
+ int disable_until;
+ char error[INTERFACE_ERROR_LEN_MAX];
+ int errors_from;
}
DC_INTERFACE;
@@ -109,22 +113,10 @@ typedef struct
unsigned char maintenance_status;
unsigned char maintenance_type;
int maintenance_from;
- int errors_from;
- unsigned char available;
- int disable_until;
- int snmp_errors_from;
- unsigned char snmp_available;
- int snmp_disable_until;
- int ipmi_errors_from;
- unsigned char ipmi_available;
- int ipmi_disable_until;
signed char ipmi_authtype;
unsigned char ipmi_privilege;
char ipmi_username[HOST_IPMI_USERNAME_LEN_MAX];
char ipmi_password[HOST_IPMI_PASSWORD_LEN_MAX];
- int jmx_errors_from;
- unsigned char jmx_available;
- int jmx_disable_until;
char inventory_mode;
unsigned char status;
unsigned char tls_connect;
@@ -135,10 +127,6 @@ typedef struct
char tls_psk_identity[HOST_TLS_PSK_IDENTITY_LEN_MAX];
char tls_psk[HOST_TLS_PSK_LEN_MAX];
#endif
- char error[HOST_ERROR_LEN_MAX];
- char snmp_error[HOST_ERROR_LEN_MAX];
- char ipmi_error[HOST_ERROR_LEN_MAX];
- char jmx_error[HOST_ERROR_LEN_MAX];
}
DC_HOST;
@@ -759,11 +747,11 @@ void DCget_user_macro(const zbx_uint64_t *hostids, int hostids_num, const char *
char *DCexpression_expand_user_macros(const char *expression);
char *zbx_dc_expand_func_params_user_macros(zbx_uint64_t hostid, const char *params);
-int DChost_activate(zbx_uint64_t hostid, unsigned char agent_type, const zbx_timespec_t *ts,
- zbx_agent_availability_t *in, zbx_agent_availability_t *out);
+int DCinterface_activate(zbx_uint64_t interfaceid, const zbx_timespec_t *ts, zbx_agent_availability_t *in,
+ zbx_agent_availability_t *out);
-int DChost_deactivate(zbx_uint64_t hostid, unsigned char agent_type, const zbx_timespec_t *ts,
- zbx_agent_availability_t *in, zbx_agent_availability_t *out, const char *error_msg);
+int DCinterface_deactivate(zbx_uint64_t interfaceid, const zbx_timespec_t *ts, zbx_agent_availability_t *in,
+ zbx_agent_availability_t *out, const char *error_msg);
#define ZBX_QUEUE_FROM_DEFAULT 6 /* default lower limit for delay (in seconds) */
#define ZBX_QUEUE_TO_INFINITY -1 /* no upper limit for delay */
@@ -802,20 +790,20 @@ unsigned int DCget_internal_action_count(void);
void zbx_config_get(zbx_config_t *cfg, zbx_uint64_t flags);
void zbx_config_clean(zbx_config_t *cfg);
-int DCset_hosts_availability(zbx_vector_ptr_t *availabilities);
+int DCset_interfaces_availability(zbx_vector_availability_ptr_t *availabilities);
-int DCreset_hosts_availability(zbx_vector_ptr_t *hosts);
-void DCupdate_hosts_availability(void);
+int DCreset_interfaces_availability(zbx_vector_availability_ptr_t *interfaces);
+void DCupdate_interfaces_availability(void);
void zbx_dc_get_actions_eval(zbx_vector_ptr_t *actions, unsigned char opflags);
-int DCget_hosts_availability(zbx_vector_ptr_t *hosts, int *ts);
-void DCtouch_hosts_availability(const zbx_vector_uint64_t *hostids);
+int DCget_interfaces_availability(zbx_vector_ptr_t *interfaces, int *ts);
+void DCtouch_interfaces_availability(const zbx_vector_uint64_t *interfaceids);
-void zbx_host_availability_init(zbx_host_availability_t *availability, zbx_uint64_t hostid);
-void zbx_host_availability_clean(zbx_host_availability_t *ha);
-void zbx_host_availability_free(zbx_host_availability_t *availability);
-int zbx_host_availability_is_set(const zbx_host_availability_t *ha);
+void zbx_interface_availability_init(zbx_interface_availability_t *availability, zbx_uint64_t interfaceid);
+void zbx_interface_availability_clean(zbx_interface_availability_t *ia);
+void zbx_interface_availability_free(zbx_interface_availability_t *availability);
+int zbx_interface_availability_is_set(const zbx_interface_availability_t *ia);
void zbx_set_availability_diff_ts(int ts);
@@ -1016,4 +1004,6 @@ void zbx_dc_free_timers(zbx_vector_ptr_t *timers);
int zbx_db_trigger_queue_locked(void);
void zbx_db_trigger_queue_unlock(void);
+void zbx_get_host_interfaces_availability(zbx_uint64_t hostid, zbx_agent_availability_t *agents);
+
#endif
diff --git a/include/dbschema.h b/include/dbschema.h
index 889d5d4300d..170086c7f17 100644
--- a/include/dbschema.h
+++ b/include/dbschema.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/discovery.h b/include/discovery.h
index 1d8a105c5af..1798d69f6c5 100644
--- a/include/discovery.h
+++ b/include/discovery.h
@@ -1,7 +1,7 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/disk.h b/include/disk.h
index d38bca139a2..17df8619d3e 100644
--- a/include/disk.h
+++ b/include/disk.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/export.h b/include/export.h
index fd25af737ba..94c7d66f1e5 100644
--- a/include/export.h
+++ b/include/export.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/ipc.h b/include/ipc.h
index 9ece724b9ee..f0000fedb72 100644
--- a/include/ipc.h
+++ b/include/ipc.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/log.h b/include/log.h
index 6a779d56217..caa628c65c0 100644
--- a/include/log.h
+++ b/include/log.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/memalloc.h b/include/memalloc.h
index 60d04b04e44..7015bc384da 100644
--- a/include/memalloc.h
+++ b/include/memalloc.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/modbtype.h b/include/modbtype.h
index fb5277762fa..bcc1a82dda7 100644
--- a/include/modbtype.h
+++ b/include/modbtype.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -124,6 +124,7 @@ typedef enum
} modbus_endianness_t;
int MODBUS_GET(AGENT_REQUEST *request, AGENT_RESULT *result);
-int zbx_init_modbus(char **error);
+int zbx_init_modbus(char **error);
+void zbx_deinit_modbus(void);
#endif /* ZABBIX_SYSINFO_COMMON_MODBTYPE_H */
diff --git a/include/module.h b/include/module.h
index a8c8c070122..816e04a7971 100644
--- a/include/module.h
+++ b/include/module.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/mutexs.h b/include/mutexs.h
index 99894c6679b..756ec363086 100644
--- a/include/mutexs.h
+++ b/include/mutexs.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/perfmon.h b/include/perfmon.h
index 00704c97315..ed0205a3d25 100644
--- a/include/perfmon.h
+++ b/include/perfmon.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/pid.h b/include/pid.h
index 024fe26b0b5..53fa7bc09cf 100644
--- a/include/pid.h
+++ b/include/pid.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/preproc.h b/include/preproc.h
index 36afc5cf6ba..6a011cbd716 100644
--- a/include/preproc.h
+++ b/include/preproc.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/proxy.h b/include/proxy.h
index 19702eab7a6..2d045c2aa75 100644
--- a/include/proxy.h
+++ b/include/proxy.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -42,8 +42,7 @@ void update_proxy_lastaccess(const zbx_uint64_t hostid, time_t last_access);
int get_proxyconfig_data(zbx_uint64_t proxy_hostid, struct zbx_json *j, char **error);
void process_proxyconfig(struct zbx_json_parse *jp_data);
-int get_host_availability_data(struct zbx_json *json, int *ts);
-int process_host_availability(struct zbx_json_parse *jp, char **error);
+int get_interface_availability_data(struct zbx_json *json, int *ts);
int proxy_get_hist_data(struct zbx_json *j, zbx_uint64_t *lastid, int *more);
int proxy_get_dhis_data(struct zbx_json *j, zbx_uint64_t *lastid, int *more);
diff --git a/include/service.h b/include/service.h
index 5f22e34570b..99fc6b2cf7b 100644
--- a/include/service.h
+++ b/include/service.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/setproctitle.h b/include/setproctitle.h
index 085a211ef8d..ce9d5a18b6c 100644
--- a/include/setproctitle.h
+++ b/include/setproctitle.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/sighandler.h b/include/sighandler.h
index e6c4ef00804..eda969843e9 100644
--- a/include/sighandler.h
+++ b/include/sighandler.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/symbols.h b/include/symbols.h
index f4e59ae7d7c..412e1bc2420 100644
--- a/include/symbols.h
+++ b/include/symbols.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/sysinc.h b/include/sysinc.h
index a8626b8f4dd..41193c5c00f 100644
--- a/include/sysinc.h
+++ b/include/sysinc.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/sysinfo.h b/include/sysinfo.h
index bce3954af83..d3a872a057b 100644
--- a/include/sysinfo.h
+++ b/include/sysinfo.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/telnet.h b/include/telnet.h
index 0e05bb160b4..16a3096baf3 100644
--- a/include/telnet.h
+++ b/include/telnet.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/threads.h b/include/threads.h
index 9051102dcba..00edd79ac7b 100644
--- a/include/threads.h
+++ b/include/threads.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/version.h b/include/version.h
index a992d43a276..377cbaa4eff 100644
--- a/include/version.h
+++ b/include/version.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxalert.h b/include/zbxalert.h
index 67cfaa2ecc9..e8b6c8095cb 100644
--- a/include/zbxalert.h
+++ b/include/zbxalert.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxalgo.h b/include/zbxalgo.h
index 4a3c53648b8..4e016a9171c 100644
--- a/include/zbxalgo.h
+++ b/include/zbxalgo.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxavailability.h b/include/zbxavailability.h
index fad98f1af08..42d1bd9f396 100644
--- a/include/zbxavailability.h
+++ b/include/zbxavailability.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -22,11 +22,12 @@
#include "zbxtypes.h"
#include "zbxalgo.h"
+#include "db.h"
#define ZBX_IPC_SERVICE_AVAILABILITY "availability"
#define ZBX_IPC_AVAILABILITY_REQUEST 1
void zbx_availability_flush(unsigned char *data, zbx_uint32_t size);
-void zbx_availabilities_flush(const zbx_vector_ptr_t *host_availabilities);
+void zbx_availabilities_flush(const zbx_vector_availability_ptr_t *interface_availabilities);
#endif /* ZABBIX_AVAILABILITY_H */
diff --git a/include/zbxcompress.h b/include/zbxcompress.h
index ae4e9171566..5657451b3d0 100644
--- a/include/zbxcompress.h
+++ b/include/zbxcompress.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxcrypto.h b/include/zbxcrypto.h
index 5d88553e363..6196c492e26 100644
--- a/include/zbxcrypto.h
+++ b/include/zbxcrypto.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxdb.h b/include/zbxdb.h
index 2a410b145f7..29cfb570cd4 100644
--- a/include/zbxdb.h
+++ b/include/zbxdb.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxdbupgrade.h b/include/zbxdbupgrade.h
index 9e9dae38ffa..b908979b902 100644
--- a/include/zbxdbupgrade.h
+++ b/include/zbxdbupgrade.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxdiag.h b/include/zbxdiag.h
index e151c687074..e185b8f05bb 100644
--- a/include/zbxdiag.h
+++ b/include/zbxdiag.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxembed.h b/include/zbxembed.h
index f8b810285c5..b9889a7e4ff 100644
--- a/include/zbxembed.h
+++ b/include/zbxembed.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxexec.h b/include/zbxexec.h
index 5e9b647e3aa..7e828b1d752 100644
--- a/include/zbxexec.h
+++ b/include/zbxexec.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxhistory.h b/include/zbxhistory.h
index 38dec2f89c5..2fe5f779d70 100644
--- a/include/zbxhistory.h
+++ b/include/zbxhistory.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxhttp.h b/include/zbxhttp.h
index 31427206888..b06308a1f00 100644
--- a/include/zbxhttp.h
+++ b/include/zbxhttp.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxicmpping.h b/include/zbxicmpping.h
index 29936c702c2..064adb223c6 100644
--- a/include/zbxicmpping.h
+++ b/include/zbxicmpping.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxipcservice.h b/include/zbxipcservice.h
index 600de651f5d..8f9cd56e0b3 100644
--- a/include/zbxipcservice.h
+++ b/include/zbxipcservice.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxjson.h b/include/zbxjson.h
index 87db8a0a662..9e4284390cb 100644
--- a/include/zbxjson.h
+++ b/include/zbxjson.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
@@ -56,18 +56,12 @@
#define ZBX_PROTO_TAG_SCRIPTID "scriptid"
#define ZBX_PROTO_TAG_HOSTID "hostid"
#define ZBX_PROTO_TAG_AVAILABLE "available"
-#define ZBX_PROTO_TAG_SNMP_AVAILABLE "snmp_available"
-#define ZBX_PROTO_TAG_IPMI_AVAILABLE "ipmi_available"
-#define ZBX_PROTO_TAG_JMX_AVAILABLE "jmx_available"
#define ZBX_PROTO_TAG_ERROR "error"
-#define ZBX_PROTO_TAG_SNMP_ERROR "snmp_error"
-#define ZBX_PROTO_TAG_IPMI_ERROR "ipmi_error"
-#define ZBX_PROTO_TAG_JMX_ERROR "jmx_error"
#define ZBX_PROTO_TAG_USERNAME "username"
#define ZBX_PROTO_TAG_PASSWORD "password"
#define ZBX_PROTO_TAG_SID "sid"
#define ZBX_PROTO_TAG_VERSION "version"
-#define ZBX_PROTO_TAG_HOST_AVAILABILITY "host availability"
+#define ZBX_PROTO_TAG_INTERFACE_AVAILABILITY "interface availability"
#define ZBX_PROTO_TAG_HISTORY_DATA "history data"
#define ZBX_PROTO_TAG_DISCOVERY_DATA "discovery data"
#define ZBX_PROTO_TAG_AUTOREGISTRATION "auto registration"
@@ -163,13 +157,10 @@
#define ZBX_PROTO_TAG_SSL_KEY_PASSWORD "ssl_key_password"
#define ZBX_PROTO_TAG_MAINTENANCE_STATUS "maintenance_status"
#define ZBX_PROTO_TAG_MAINTENANCE_TYPE "maintenance_type"
-#define ZBX_PROTO_TAG_SNMP_AVAILABLE "snmp_available"
-#define ZBX_PROTO_TAG_IPMI_AVAILABLE "ipmi_available"
#define ZBX_PROTO_TAG_IPMI_AUTHTYPE "ipmi_authtype"
#define ZBX_PROTO_TAG_IPMI_PRIVILEGE "ipmi_privilege"
#define ZBX_PROTO_TAG_IPMI_USERNAME "ipmi_username"
#define ZBX_PROTO_TAG_IPMI_PASSWORD "ipmi_password"
-#define ZBX_PROTO_TAG_JMX_AVAILABLE "jmx_available"
#define ZBX_PROTO_TAG_DATA_TYPE "datatype"
#define ZBX_PROTO_TAG_PROXY_DELAY "proxy_delay"
#define ZBX_PROTO_TAG_EXPRESSIONS "expressions"
diff --git a/include/zbxlld.h b/include/zbxlld.h
index 639389ea92f..6df122d99ed 100644
--- a/include/zbxlld.h
+++ b/include/zbxlld.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxmedia.h b/include/zbxmedia.h
index ae5f926e8ef..763e457d3c7 100644
--- a/include/zbxmedia.h
+++ b/include/zbxmedia.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxmodules.h b/include/zbxmodules.h
index f81ff1e7e6c..6cfeab43ef6 100644
--- a/include/zbxmodules.h
+++ b/include/zbxmodules.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxnix.h b/include/zbxnix.h
index a037616bcfb..c25f31c96b2 100644
--- a/include/zbxnix.h
+++ b/include/zbxnix.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxprometheus.h b/include/zbxprometheus.h
index 360231e9911..698b44be2da 100644
--- a/include/zbxprometheus.h
+++ b/include/zbxprometheus.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxregexp.h b/include/zbxregexp.h
index a25e56e2581..81ed3bb4d24 100644
--- a/include/zbxregexp.h
+++ b/include/zbxregexp.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxself.h b/include/zbxself.h
index eec30149e5b..8869c5c3dac 100644
--- a/include/zbxself.h
+++ b/include/zbxself.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxserialize.h b/include/zbxserialize.h
index b39dc8618aa..8afc9787be5 100644
--- a/include/zbxserialize.h
+++ b/include/zbxserialize.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxserver.h b/include/zbxserver.h
index a246495d50a..7eebcb271fb 100644
--- a/include/zbxserver.h
+++ b/include/zbxserver.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxtasks.h b/include/zbxtasks.h
index 565d0fd941e..6b35f2e3266 100644
--- a/include/zbxtasks.h
+++ b/include/zbxtasks.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxtrends.h b/include/zbxtrends.h
index 73ba30d3efd..a99b587af94 100644
--- a/include/zbxtrends.h
+++ b/include/zbxtrends.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxtypes.h b/include/zbxtypes.h
index 9495e412e7e..42c55a17800 100644
--- a/include/zbxtypes.h
+++ b/include/zbxtypes.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
diff --git a/include/zbxvault.h b/include/zbxvault.h
index d796b6076a0..0a8e11d8586 100644
--- a/include/zbxvault.h
+++ b/include/zbxvault.h
@@ -1,6 +1,6 @@
/*
** Zabbix
-** Copyright (C) 2001-2020 Zabbix SIA
+** Copyright (C) 2001-2021 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by