root/fwknop/tags/fwknop-0.9.7-pre2/fwknop.h
| Revision 58, 2.2 kB (checked in by mbr, 5 years ago) | |
|---|---|
| |
| 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: 0.1 |
| 13 | * |
| 14 | * Copyright (C) 1999-2002 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 | |
| 48 | /* DEFINES ********************************************************************/ |
| 49 | #define MAX_LINE_BUF 1024 |
| 50 | #define MAX_PID_SIZE 6 |
| 51 | #define MAX_PATH_LEN 100 |
| 52 | #define MAX_MSG_LEN 120 |
| 53 | #define MAX_GEN_LEN 80 |
| 54 | #define MAX_ARG_LEN 30 |
| 55 | #define MAX_NUM_LEN 6 |
| 56 | |
| 57 | /* PROTOTYPES *****************************************************************/ |
| 58 | void slogr(const char *, const char *); |
| 59 | void check_unique_pid(const char *, const char *); |
| 60 | void write_pid(const char *, pid_t); |
| 61 | void daemonize_process(const char *); |
| 62 | void send_alert_email(const char *, const char *, const char *); |
| 63 | int find_char_var(char *, char *, char *); |
| 64 | int check_import_config(time_t *config_mtime, char *config_file); |
| 65 | |
| 66 | /* From OpenBSD */ |
| 67 | size_t strlcpy(char *, const char *, size_t); |
| 68 | size_t strlcat(char *, const char *, size_t); |
| 69 | |
| 70 | #endif /* __FWKNOP_H__ */ |
Note: See TracBrowser for help on using the browser.
