root/fwknop/tags/fwknop-1.8.4-pre1/fwknop.h

Revision 629, 2.5 kB (checked in by mbr, 2 years ago)

first cut at recursive variable resolution

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 /*
2 ********************************************************************************
3 *
4 *  File: fwknop.h
5 *
6 *  Author: Michael Rash (mbr@cipherdyne.org)
7 *
8 *  Purpose: fwknop.h include appropriate system header files, and defines file
9 *           paths, function prototypes, and constants that are needed by
10 *           the C versions of fwknop.
11 *
12 *  Version: 1.8
13 *
14 *  Copyright (C) 2004-2007 Michael Rash (mbr@cipherdyne.org)
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 *
30 *  $Id$
31 */
32
33 #ifndef __FWKNOP_H__
34 #define __FWKNOP_H__
35
36 /* INCLUDES *******************************************************************/
37 #include <stdio.h>
38 #include <stdlib.h>
39 #include <string.h>
40 #include <unistd.h>    /* read(), write(), and close() */
41 #include <fcntl.h>     /* open() */
42 #include <sys/stat.h>  /* umask */
43 #include <sys/wait.h>
44 #include <sys/types.h>
45 #include <signal.h>
46 #include <syslog.h>
47 #include <ctype.h>
48
49 /* DEFINES ********************************************************************/
50 #define MAX_LINE_BUF 1024
51 #define MAX_PID_SIZE 6
52 #define MAX_PATH_LEN 100
53 #define MAX_MSG_LEN 120
54 #define MAX_GEN_LEN 80
55 #define MAX_ARG_LEN 30
56 #define MAX_NUM_LEN 6
57
58 /* PROTOTYPES *****************************************************************/
59 void slogr(const char *, const char *);
60 void check_unique_pid(const char *, const char *);
61 void write_pid(const char *, pid_t);
62 void daemonize_process(const char *);
63 void send_alert_email(const char *, const char *, const char *);
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);
68 int find_char_var(char *, char *, char *);
69 int check_import_config(time_t *config_mtime, char *config_file);
70 void *safe_malloc(const unsigned int len);
71
72 /* From OpenBSD */
73 size_t strlcpy(char *, const char *, size_t);
74 size_t strlcat(char *, const char *, size_t);
75
76 #endif  /* __FWKNOP_H__ */
Note: See TracBrowser for help on using the browser.