Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 79 lines (72 sloc) 2.674 kb
157c747 Michael Rash minor comment fixes
authored
1 /*
2 ********************************************************************************
3 *
4 * File: psad.h
5 *
88e1e10 Michael Rash changed all cipherdyne.com references to cipherdyne.org
authored
6 * Author: Michael Rash (mbr@cipherdyne.org)
157c747 Michael Rash minor comment fixes
authored
7 *
8 * Purpose: psad.h include appropriate system header files, and defines file
9 * paths, function prototypes, and constants that are needed by
10 * the C versions of psad.
11 *
12 * Credits: (see the CREDITS file)
13 *
39c84b6 Michael Rash minor copyright date updates
authored
14 * Copyright (C) 1999-2006 Michael Rash (mbr@cipherdyne.org)
157c747 Michael Rash minor comment fixes
authored
15 *
16 * License (GNU Public License):
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 * USA
27 *
28 ********************************************************************************
29 */
dd11008 Michael Rash moved original kmsgsd to kmsgsd_perl, and added kmsgsd.c along with some...
authored
30
31 #ifndef __PSAD_H__
32 #define __PSAD_H__
33
157c747 Michael Rash minor comment fixes
authored
34 /* INCLUDES *******************************************************************/
dd11008 Michael Rash moved original kmsgsd to kmsgsd_perl, and added kmsgsd.c along with some...
authored
35 #include <stdio.h>
36 #include <stdlib.h>
37 #include <string.h>
38 #include <unistd.h> /* read(), write(), and close() */
39 #include <fcntl.h> /* open() */
40 #include <sys/stat.h> /* umask */
317513c Michael Rash added send_alert_email()
authored
41 #include <sys/wait.h>
dd11008 Michael Rash moved original kmsgsd to kmsgsd_perl, and added kmsgsd.c along with some...
authored
42 #include <sys/types.h>
43 #include <signal.h>
2289e79 Michael Rash include syslog.h, added slogr() prototype
authored
44 #include <syslog.h>
59040ac Michael Rash - Added has_sub_var() and expand_sub_var_value() to expand embedded vari...
authored
45 #include <ctype.h>
dd11008 Michael Rash moved original kmsgsd to kmsgsd_perl, and added kmsgsd.c along with some...
authored
46
157c747 Michael Rash minor comment fixes
authored
47 /* DEFINES ********************************************************************/
636252d Michael Rash - (Franck Joncourt) Added --Override-config feature so that alternate
authored
48 #define PSAD_VERSION "2.1.6-pre1"
dd11008 Michael Rash moved original kmsgsd to kmsgsd_perl, and added kmsgsd.c along with some...
authored
49 #define MAX_LINE_BUF 1024
7edcdb7 Michael Rash -Extended constants to remove need for +1 in the code.
authored
50 #define MAX_PID_SIZE 6
51 #define MAX_PATH_LEN 100
6b93d6a Michael Rash interim commit... sending emails from psadwatchd works now
authored
52 #define MAX_MSG_LEN 120
53 #define MAX_GEN_LEN 80
842607a Michael Rash updated maximum string for EMAIL_ADDRESSES to be 300 chars
authored
54 #define MAX_EMAIL_LEN 300
317513c Michael Rash added send_alert_email()
authored
55 #define MAX_ARG_LEN 30
7edcdb7 Michael Rash -Extended constants to remove need for +1 in the code.
authored
56 #define MAX_NUM_LEN 6
dd11008 Michael Rash moved original kmsgsd to kmsgsd_perl, and added kmsgsd.c along with some...
authored
57
157c747 Michael Rash minor comment fixes
authored
58 /* PROTOTYPES *****************************************************************/
2289e79 Michael Rash include syslog.h, added slogr() prototype
authored
59 void slogr(const char *, const char *);
dd11008 Michael Rash moved original kmsgsd to kmsgsd_perl, and added kmsgsd.c along with some...
authored
60 void check_unique_pid(const char *, const char *);
61 void write_pid(const char *, pid_t);
62 void daemonize_process(const char *);
317513c Michael Rash added send_alert_email()
authored
63 void send_alert_email(const char *, const char *, const char *);
59040ac Michael Rash - Added has_sub_var() and expand_sub_var_value() to expand embedded vari...
authored
64 int has_sub_var(char *var_name, char *value, char *sub_var,
65 char *pre_str, char *post_str);
66 void expand_sub_var_value(char *value, const char *sub_var,
67 const char *pre_str, const char *post_str);
eba529c Michael Rash added safe_malloc() to always perform NULL check on pointer returned by ...
authored
68 int find_char_var(const char *, char *, char *);
4566dc1 Michael Rash added check_import_config()
authored
69 int check_import_config(time_t *config_mtime, char *config_file);
eba529c Michael Rash added safe_malloc() to always perform NULL check on pointer returned by ...
authored
70 void *safe_malloc(const unsigned int len);
636252d Michael Rash - (Franck Joncourt) Added --Override-config feature so that alternate
authored
71 void list_to_array(char *ptList, const char sep, char **array,
72 unsigned char max_arg);
dd11008 Michael Rash moved original kmsgsd to kmsgsd_perl, and added kmsgsd.c along with some...
authored
73
7edcdb7 Michael Rash -Extended constants to remove need for +1 in the code.
authored
74 /* From OpenBSD */
75 size_t strlcpy(char *, const char *, size_t);
76 size_t strlcat(char *, const char *, size_t);
77
dd11008 Michael Rash moved original kmsgsd to kmsgsd_perl, and added kmsgsd.c along with some...
authored
78 #endif /* __PSAD_H__ */
Something went wrong with that request. Please try again.