zbx_tm_remote_command_t *zbx_tm_remote_command_create(int command_type, const char *command, int execute_on, int port,
#ifndef ZABBIX_ZBXTASKS_H
#define ZABBIX_ZBXTASKS_H
#include "zbxalgo.h"
#include "zbxjson.h"
#define ZBX_TASK_UPDATE_FREQUENCY 1
#define ZBX_REMOTE_COMMAND_TTL (SEC_PER_MIN * 10)
#define ZBX_DATA_TTL 30
#define ZBX_TM_TASK_UNDEFINED 0
#define ZBX_TM_TASK_CLOSE_PROBLEM 1
#define ZBX_TM_TASK_REMOTE_COMMAND 2
#define ZBX_TM_TASK_REMOTE_COMMAND_RESULT 3
#define ZBX_TM_TASK_ACKNOWLEDGE 4
#define ZBX_TM_TASK_UPDATE_EVENTNAMES 5
#define ZBX_TM_TASK_CHECK_NOW 6
#define ZBX_TM_TASK_DATA 7
#define ZBX_TM_TASK_DATA_RESULT 8
#define ZBX_TM_STATUS_NEW 1
#define ZBX_TM_STATUS_INPROGRESS 2
#define ZBX_TM_STATUS_DONE 3
#define ZBX_TM_STATUS_EXPIRED 4
#define ZBX_TM_DATA_TYPE_TEST_ITEM 0
#define ZBX_TM_DATA_TYPE_DIAGINFO 1
#define ZBX_TM_CLEANUP_TASK_AGE SEC_PER_DAY
typedef struct
{
int command_type;
char *command;
int execute_on;
int port;
int authtype;
char *username;
char *password;
char *publickey;
char *privatekey;
zbx_uint64_t parent_taskid;
zbx_uint64_t hostid;
zbx_uint64_t alertid;
}
zbx_tm_remote_command_t;
typedef struct
{
int status;
char *info;
zbx_uint64_t parent_taskid;
}
zbx_tm_remote_command_result_t;
typedef struct
{
zbx_uint64_t itemid;
}
zbx_tm_check_now_t;
typedef struct
{
zbx_uint64_t parent_taskid;
char *data;
int type;
}