new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / remoted / remoted.h
1 /* Copyright (C) 2009 Trend Micro Inc.
2  * All right 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 __LOGREMOTE_H
11 #define __LOGREMOTE_H
12
13 #ifndef ARGV0
14 #define ARGV0 "ossec-remoted"
15 #endif
16
17 #include "config/remote-config.h"
18 #include "sec.h"
19
20 /** Function prototypes **/
21
22 /* Read remoted config */
23 int RemotedConfig(const char *cfgfile, remoted *cfg);
24
25 /* Handle Remote connections */
26 void HandleRemote(int position, int uid) __attribute__((noreturn));
27
28 /* Handle Syslog */
29 void HandleSyslog(void) __attribute__((noreturn));
30
31 /* Handle Syslog TCP */
32 void HandleSyslogTCP(void) __attribute__((noreturn));
33
34 /* Handle Secure connections */
35 void HandleSecure(void) __attribute__((noreturn));
36
37 /* Forward active response events */
38 void *AR_Forward(void *arg) __attribute__((noreturn));
39
40 /* Initialize the manager */
41 void manager_init(int isUpdate);
42
43 /* Wait for messages from the agent to analyze */
44 void *wait_for_msgs(void *none);
45
46 /* Save control messages */
47 void save_controlmsg(unsigned int agentid, char *msg);
48
49 /* Send message to agent */
50 int send_msg(unsigned int agentid, const char *msg);
51
52 /* Initializing send_msg */
53 void send_msg_init(void);
54
55 int check_keyupdate(void);
56
57 void key_lock(void);
58
59 void key_unlock(void);
60
61 void keyupdate_init(void);
62
63 /** Global variables **/
64
65 extern keystore keys;
66 extern remoted logr;
67
68 #endif /* __LOGREMOTE_H */