new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / headers / agent_op.h
1 /* Copyright (C) 2009 Trend Micro Inc.
2  * All rights reserved.
3  *
4  * This program is a free software; you can redistribute it
5  * and/or modify it under the terms of the GNU General Public
6  * License (version 2) as published by the FSF - Free Software
7  * Foundation
8  */
9
10 #ifndef __AGENT_OP_H
11 #define __AGENT_OP_H
12
13 /* Check if syscheck is to be executed/restarted
14  * Returns 1 on success or 0 on failure (shouldn't be executed now)
15  */
16 int os_check_restart_syscheck(void);
17
18 /* Set syscheck to be restarted
19  * Returns 1 on success or 0 on failure
20  */
21 int os_set_restart_syscheck(void);
22
23 /* Read the agent name for the current agent
24  * Returns NULL on error
25  */
26 char *os_read_agent_name(void);
27
28 /* Read the agent IP for the current agent
29  * Returns NULL on error
30  */
31 char *os_read_agent_ip(void);
32
33 /* Read the agent ID for the current agent
34  * Returns NULL on error
35  */
36 char *os_read_agent_id(void);
37
38 /* Read the agent profile name for the current agent
39  * Returns NULL on error
40  */
41 char *os_read_agent_profile(void);
42
43 /* Write the agent info inside the queue, for the other processes to read
44  * Returns 1 on success or <= 0 on failure
45  */
46 int os_write_agent_info(const char *agent_name, const char *agent_ip, const char *agent_id,
47                         const char *cfg_profile_name) __attribute__((nonnull(1, 3)));
48
49 #endif /* __AGENT_OP_H */
50