1 /* @(#) $Id: ./src/headers/read-agents.h, 2011/09/08 dcid Exp $
4 /* Copyright (C) 2009 Trend Micro Inc.
7 * This program is a free software; you can redistribute it
8 * and/or modify it under the terms of the GNU General Public
9 * License (version 2) as published by the FSF - Free Software
19 /* Unique key for each agent. */
20 typedef struct _agent_info
24 char *syscheck_endtime;
26 char *rootcheck_endtime;
32 /* Print syscheck db (of modified files). */
33 int print_syscheck(char *sk_name, char *sk_ip, char *fname, int print_registry,
34 int all_files, int csv_output, int update_counter);
36 /* Print rootcheck db. */
37 int print_rootcheck(char *sk_name, char *sk_ip, char *fname, int resolved,
38 int csv_output, int show_last);
40 /* Delete syscheck db */
41 int delete_syscheck(char *sk_name, char *sk_ip, int full_delete);
43 /* Delete rootcheck db. */
44 int delete_rootcheck(char *sk_name, char *sk_ip, int full_delete);
46 /* Delete agent information */
47 int delete_agentinfo(char *name);
49 /* Get all available agents */
50 char **get_agents(int flag);
52 /* Free the agent list */
53 void free_agents(char **agent_list);
55 /** char *print_agent_status(int status)
56 * Prints the text representation of the agent status.
58 char *print_agent_status(int status);
60 /** int get_agent_status(char *agent_name, char *agent_ip)
61 * Gets the status of an agent, based on the name/ip.
63 int get_agent_status(char *agent_name, char *agent_ip);
65 /** agent_info *get_agent_info(char *agent_name, char *agent_ip)
66 * Get information from an agent.
68 agent_info *get_agent_info(char *agent_name, char *agent_ip);
71 /** int connect_to_remoted()
72 * Connects to remoted to be able to send messages to the agents.
73 * Returns the socket on success or -1 on failure.
75 int connect_to_remoted();
77 /** int send_msg_to_agent(int socket, char *msg)
78 * Sends a message to an agent.
79 * returns -1 on error.
81 int send_msg_to_agent(int msocket, char *msg, char *agt_id, char *exec);
86 #define GA_NOTACTIVE 2
89 #define GA_ALL_WSTATUS 7
92 #define GA_STATUS_ACTIVE 12
93 #define GA_STATUS_NACTIVE 13
94 #define GA_STATUS_INV 14