Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef ENFORCER_DAEMON_H
00030 #define ENFORCER_DAEMON_H
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include "config.h"
00043 #include <inttypes.h>
00044
00045 #ifdef HAVE_STDBOOL_H
00046 # include <stdbool.h>
00047 #else
00048 # ifndef HAVE__BOOL
00049 # ifdef __cplusplus
00050 typedef bool _Bool;
00051 # else
00052 # define _Bool signed char
00053 # endif
00054 # endif
00055 # define bool _Bool
00056 # define false 0
00057 # define true 1
00058 # define __bool_true_false_are_defined 1
00059 #endif
00060
00061 #include <stdint.h>
00062 #include <unistd.h>
00063 #include <syslog.h>
00064
00065
00066
00067
00068 #define MAX_PROG_NAME_LENGTH 255
00069 #define MAX_USER_LENGTH 255
00070 #define MAX_HOST_LENGTH 255
00071 #define MAX_PASSWORD_LENGTH 255
00072 #define MAX_SCHEMA_LENGTH 255
00073 #define MAX_PORT_LENGTH 16
00074 #define MAX_PID_LENGTH 255
00075 #define MAX_LOG_USER_LENGTH 32
00076
00077 #ifdef LOG_DAEMON
00078 #define DEFAULT_LOG_FACILITY LOG_DAEMON
00079 #define DEFAULT_LOG_FACILITY_STRING "LOG_DAEMON"
00080 #else
00081 #define DEFAULT_LOG_FACILITY LOG_USER
00082 #define DEFAULT_LOG_FACILITY_STRING "LOG_USER"
00083 #endif
00084
00085
00086 typedef struct
00087 {
00088
00089 const char *program;
00090 bool debug;
00091 bool once;
00092 pid_t pid;
00093 char *pidfile;
00094 uid_t uid;
00095 gid_t gid;
00096 char *username;
00097 char *groupname;
00098 #if 0
00099 char *chrootdir;
00100 #endif
00101
00102 int term;
00103
00104
00105 char *configfile;
00106 unsigned char* user;
00107 unsigned char* host;
00108 unsigned char* password;
00109 unsigned char* schema;
00110 unsigned char* port;
00111 uint16_t interval;
00112 uint16_t keygeninterval;
00113 int keycreate;
00114 int manualKeyGeneration;
00115 int rolloverNotify;
00116 char* DSSubmitCmd;
00117
00118 int log_user;
00119
00120 } DAEMONCONFIG;
00121
00122
00123 #define AUTHOR_NAME "John Dickinson"
00124 #define COPYRIGHT_STR "Copyright (C) 2008 2009 Nominet UK"
00125
00126 #endif