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