new upstream release (3.3.0); modify package compatibility for Stretch
[ossec-hids.git] / src / client-agent / agentd.h
1 /* Copyright (C) 2009 Trend Micro Inc.
2  * All rights 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 __AGENTD_H
11 #define __AGENTD_H
12
13 #include "config/config.h"
14 #include "config/client-config.h"
15
16 /*** Function Prototypes ***/
17
18 /* Client configuration */
19 int ClientConf(const char *cfgfile);
20
21 /* Agentd init function */
22 void AgentdStart(const char *dir, int uid, int gid, const char *user, const char *group) __attribute__((noreturn));
23
24 /* Event Forwarder */
25 void *EventForward(void);
26
27 /* Receiver messages */
28 void *receive_msg(void);
29
30 /* Receiver messages for Windows */
31 void *receiver_thread(void *none);
32
33 /* Send integrity checking information about a file to the server */
34 int intcheck_file(const char *file_name, const char *dir);
35
36 /* Send message to server */
37 int send_msg(int agentid, const char *msg);
38
39 /* Extract the shared files */
40 char *getsharedfiles(void);
41
42 /* Initialize handshake to server */
43 void start_agent(int is_startup);
44
45 /* Connect to the server */
46 int connect_server(int initial_id);
47
48 /* Notify server */
49 void run_notify(void);
50
51 /*** Global variables ***/
52
53 /* Global variables. Only modified during startup. */
54
55 #include "shared.h"
56 #include "sec.h"
57
58 extern time_t available_server;
59 extern int run_foreground;
60 extern keystore keys;
61 extern agent *agt;
62
63 #endif /* __AGENTD_H */
64