diff options
author | Andris Zeila <andris.zeila@zabbix.com> | 2016-11-01 17:20:48 +0300 |
---|---|---|
committer | Andris Zeila <andris.zeila@zabbix.com> | 2016-11-01 17:20:48 +0300 |
commit | 5b7f85e1e9dcd5c200a595bc9cec5879025c2c44 (patch) | |
tree | 99d063603541e631e4cc787f3c30eb8daa0dba79 /include/comms.h | |
parent | 74fb24530dcd29686505d141303806a8fd9870c5 (diff) |
.......P.. [ZBXNEXT-1804] added version tag to passive proxy responses to server requests
Diffstat (limited to 'include/comms.h')
-rw-r--r-- | include/comms.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/comms.h b/include/comms.h index 892610d0ad8..38f42d1a191 100644 --- a/include/comms.h +++ b/include/comms.h @@ -103,7 +103,8 @@ void zbx_gethost_by_ip(const char *ip, char *host, size_t hostlen); int zbx_tcp_connect(zbx_socket_t *s, const char *source_ip, const char *ip, unsigned short port, int timeout, unsigned int tls_connect, char *tls_arg1, char *tls_arg2); -#define ZBX_TCP_PROTOCOL 0x01 +#define ZBX_TCP_PROTOCOL 0x01 +#define ZBX_TCP_COMPONENT_VERSION 0x02 #define ZBX_TCP_SEC_UNENCRYPTED 1 /* do not use encryption with this socket */ #define ZBX_TCP_SEC_TLS_PSK 2 /* use TLS with pre-shared key (PSK) with this socket */ @@ -169,6 +170,9 @@ int zbx_send_response_ext(zbx_socket_t *sock, int result, const char *info, int #define zbx_send_response(sock, result, info, timeout) \ zbx_send_response_ext(sock, result, info, ZBX_TCP_PROTOCOL, timeout) +#define zbx_send_proxy_response(sock, result, info, timeout) \ + zbx_send_response_ext(sock, result, info, ZBX_TCP_PROTOCOL | ZBX_TCP_COMPONENT_VERSION , timeout) + #define zbx_send_response_raw(sock, result, info, timeout) \ zbx_send_response_ext(sock, result, info, 0, timeout) |