1 /* @(#) $Id: read-agents.h,v 1.12 2009/06/24 17:06:26 dcid Exp $ */
3 /* Copyright (C) 2009 Trend Micro Inc.
6 * This program is a free software; you can redistribute it
7 * and/or modify it under the terms of the GNU General Public
8 * License (version 3) as published by the FSF - Free Software
18 /* Unique key for each agent. */
19 typedef struct _agent_info
23 char *syscheck_endtime;
25 char *rootcheck_endtime;
31 /* Print syscheck db (of modified files). */
32 int print_syscheck(char *sk_name, char *sk_ip, char *fname, int print_registry,
33 int all_files, int csv_output, int update_counter);
35 /* Print rootcheck db. */
36 int print_rootcheck(char *sk_name, char *sk_ip, char *fname, int resolved,
37 int csv_output, int show_last);
39 /* Delete syscheck db */
40 int delete_syscheck(char *sk_name, char *sk_ip, int full_delete);
42 /* Delete rootcheck db. */
43 int delete_rootcheck(char *sk_name, char *sk_ip, int full_delete);
45 /* Delete agent information */
46 int delete_agentinfo(char *name);
48 /* Get all available agents */
49 char **get_agents(int flag);
51 /* Free the agent list */
52 void free_agents(char **agent_list);
54 /** char *print_agent_status(int status)
55 * Prints the text representation of the agent status.
57 char *print_agent_status(int status);
59 /** int get_agent_status(char *agent_name, char *agent_ip)
60 * Gets the status of an agent, based on the name/ip.
62 int get_agent_status(char *agent_name, char *agent_ip);
64 /** agent_info *get_agent_info(char *agent_name, char *agent_ip)
65 * Get information from an agent.
67 agent_info *get_agent_info(char *agent_name, char *agent_ip);
70 /** int connect_to_remoted()
71 * Connects to remoted to be able to send messages to the agents.
72 * Returns the socket on success or -1 on failure.
74 int connect_to_remoted();
76 /** int send_msg_to_agent(int socket, char *msg)
77 * Sends a message to an agent.
78 * returns -1 on error.
80 int send_msg_to_agent(int msocket, char *msg, char *agt_id, char *exec);
85 #define GA_NOTACTIVE 2
88 #define GA_ALL_WSTATUS 7
91 #define GA_STATUS_ACTIVE 12
92 #define GA_STATUS_NACTIVE 13
93 #define GA_STATUS_INV 14