Imported Upstream version 2.7
[ossec-hids.git] / src / headers / agent_op.h
1 /* @(#) $Id: ./src/headers/agent_op.h, 2011/09/08 dcid Exp $
2  */
3
4 /* Copyright (C) 2009 Trend Micro Inc.
5  * All rights reserved.
6  *
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
10  * Foundation
11  */
12
13
14 #ifndef __AGENT_OP_H
15 #define __AGENT_OP_H
16
17
18
19 /** Checks if syscheck is to be executed/restarted.
20  *  Returns 1 on success or 0 on failure (shouldn't be executed now).
21  */
22 int os_check_restart_syscheck() ;
23
24
25 /** Sets syscheck to be restarted.
26  *  Returns 1 on success or 0 on failure.
27  */
28 int os_set_restart_syscheck();
29
30
31 /** char *os_read_agent_name()
32  *  Reads the agent name for the current agent.
33  *  Returns NULL on error.
34  */
35 char *os_read_agent_name();
36
37
38 /** char *os_read_agent_ip()
39  *  Reads the agent ip for the current agent.
40  *  Returns NULL on error.
41  */
42 char *os_read_agent_ip();
43
44
45 /** char *os_read_agent_id()
46  *  Reads the agent id for the current agent.
47  *  Returns NULL on error.
48  */
49 char *os_read_agent_id();
50
51 /* cmoraes: added */
52
53 /** char *os_read_agent_profile()
54  *  Reads the agent profile name for the current agent.
55  *  Returns NULL on error.
56  */
57 char *os_read_agent_profile();
58
59
60 /** int os_write_agent_info(char *agent_name, char *agent_ip, char *agent_id)
61  *  Writes the agent info inside the queue, for the other processes to read.
62  *  Returns 1 on success or <= 0 on failure.
63  */
64 int os_write_agent_info(char *agent_name, char *agent_ip, char *agent_id,
65                         char *cfg_profile_name);               /*cmoraes*/
66
67
68 int os_agent_config_changed();
69
70
71 #endif
72 /* EOF */