Imported Upstream version 2.7
[ossec-hids.git] / src / remoted / remoted.h
1 /* @(#) $Id: ./src/remoted/remoted.h, 2011/09/08 dcid Exp $
2  */
3
4 /* Copyright (C) 2009 Trend Micro Inc.
5  * All right 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 __LOGREMOTE_H
15
16 #define __LOGREMOTE_H
17
18 #ifndef ARGV0
19 #define ARGV0 "ossec-remoted"
20 #endif
21
22 #include "config/remote-config.h"
23 #include "sec.h"
24
25
26 /*** Function prototypes ***/
27
28 /* Read remoted config */
29 int RemotedConfig(char *cfgfile, remoted *logr);
30
31 /* Handle Remote connections */
32 void HandleRemote(int position, int uid);
33
34 /* Handle Syslog */
35 void HandleSyslog();
36
37 /* Handle Syslog TCP */
38 void HandleSyslogTCP();
39
40 /* Handle Secure connections */
41 void HandleSecure();
42
43 /* Forward active response events */
44 void *AR_Forward(void *arg);
45
46 /* Initialize the manager */
47 void manager_init(int isUpdate);
48
49 /* Wait for messages from the agent to analyze */
50 void *wait_for_msgs(void *none);
51
52 /* Save control messages */
53 void save_controlmsg(int agentid, char *msg);
54
55 /* Send message to agent */
56 int send_msg(int agentid, char *msg);
57
58 /* Initializing send_msg */
59 void send_msg_init();
60
61 int check_keyupdate();
62
63 void key_lock();
64
65 void key_unlock();
66
67 void keyupdate_init();
68
69
70 /*** Global variables ***/
71
72 keystore keys;
73 remoted logr;
74
75 #endif