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