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