Source
xxxxxxxxxx
zbx_uint32_t zbx_alerter_serialize_result(unsigned char **data, const char *value, int errcode, const char *error,
/*
** Zabbix
** Copyright (C) 2001-2023 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
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/* media type data */
typedef struct
{
zbx_uint64_t mediatypeid;
int location;
/* the number of currently processing alerts */
int alerts_num;
/* the number of alert objects for this media type */
int refcount;
/* alert pool queue */
zbx_binary_heap_t queue;
/* media type data */
int type;
char *smtp_server;
char *smtp_helo;
char *smtp_email;
char *exec_path;
char *gsm_modem;
char *username;
char *passwd;
char *script;
char *script_bin;
char *error;
unsigned short smtp_port;
unsigned char smtp_security;
unsigned char smtp_verify_peer;
unsigned char smtp_verify_host;
unsigned char smtp_authentication;
int maxsessions;
int maxattempts;
int attempt_interval;
int timeout;
int script_bin_sz;
unsigned char content_type;
unsigned char flags;
}
zbx_am_mediatype_t;
typedef struct
{
zbx_uint64_t mediaid;
zbx_uint64_t mediatypeid;
char *sendto;
}
zbx_am_media_t;
/* media type data */
typedef struct
{
zbx_uint64_t mediatypeid;
/* media type data */
unsigned char type;
char *smtp_server;