Imported Upstream version 2.7
[ossec-hids.git] / src / os_execd / execd.h
1 /* @(#) $Id: ./src/os_execd/execd.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  * More details at the LICENSE file included with OSSEC or
13  * online at http://www.ossec.net/en/licensing.html .
14  */
15
16
17 #ifndef _EXECD_H
18 #define _EXECD_H
19
20 #ifndef ARGV0
21 #define ARGV0 "ossec-execd"
22 #endif
23
24
25 /* Add/delete arguments for the commands */
26 #define ADD_ENTRY       "add"
27 #define DELETE_ENTRY    "delete"
28
29
30 /* Maximum number of active responses active */
31 #define MAX_AR      64
32
33
34 /* Maximum number of command arguments */
35 #define MAX_ARGS    32
36
37
38 /* Execd select timeout -- in seconds */
39 #define EXECD_TIMEOUT   90
40
41
42
43 /** Function prototypes **/
44
45 void ExecdStart(int queue);
46
47 void WinExecdRun(char *exec_msg);
48
49 int ReadExecConfig();
50
51 char *GetCommandbyName(char *name, int *timeout);
52
53 void ExecCmd(char **cmd);
54
55 void ExecCmd_Win32(char *cmd);
56
57 int ExecdConfig(char * cfgfile);
58
59 int WinExecd_Start();
60
61 void WinTimeoutRun(int timeout);
62
63 void FreeTimeoutEntry(void *timeout_entry);
64
65
66
67
68 #define _EXECD_H
69
70 #endif