dfd220cf7f483696bf581ad587fc8b071ceb30ae
[ossec-hids.git] / src / client-agent / agentd.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 /* Part of the OSSEC HIDS
13  * Available at http://www.ossec.net/hids/
14  */
15
16
17 #ifndef __AGENTD_H
18
19 #define __AGENTD_H
20
21 #include "config/config.h"
22 #include "config/client-config.h"
23
24
25 /*** Function Prototypes ***/
26
27 /* Client configuration */
28 int ClientConf(char *cfgfile);
29
30 /* Agentd init function */
31 void AgentdStart(char *dir, int uid, int gid, char *user, char *group);
32
33 /* Event Forwarder */
34 void *EventForward();
35
36 /* Receiver messages */
37 void *receive_msg();
38
39 /* Receiver messages for Windows */
40 void *receiver_thread(void *none);
41
42 /* intcheck_file: 
43  * Sends integrity checking information about a file to the server.
44  */
45 int intcheck_file(char *file_name, char *dir);
46
47 /* Sends message to server */
48 int send_msg(int agentid, char *msg);
49
50 /* Extract the shared files */
51 char *getsharedfiles();
52
53 /* Initializes handshake to server */
54 void start_agent(int is_startup);
55
56 /* Connects to the server. */
57 int connect_server(int initial_id);
58
59 /* notify server */
60 void run_notify();
61
62
63 /*** Global variables ***/
64
65 /* Global variables. Only modified
66  * during startup. 
67  */
68
69 #include "shared.h"
70 #include "sec.h"
71
72 int available_server;
73 keystore keys;
74 agent *logr;
75
76
77 #endif
78 /* EOF */