1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143
|
#ifndef GLOBAL_H
#define GLOBAL_H
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <signal.h>
#include <stdarg.h>
#include <ctype.h>
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#include <sys/types.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#include <netinet/in.h>
#include <netdb.h>
#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
#endif
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#ifdef MEMWATCH
#include "memwatch.h"
#endif
#define BOOL int
#define TRUE 1
#define FALSE 0
#define NB_PARAMS 27 /* number of parameters */
#define LINE_SIZE 1024 /* in the config file */
#define MAXLOGRECSIZE 2048 /* maximum log record size */
#define HOSTIGNORE_NONE "NONE"
/*
* we use some GCC magic so that structures doesn't align...
*/
#ifdef HAVE_ATTRIB_PACKED
#define attpack __attribute__((packed))
#else
#define attpack
#endif
typedef unsigned char byte;
/*
* Configuration parameters and their default values.
*
*/
extern char boporttolisten[10];
extern char bomessage[512];
extern char nbmessage[512];
extern char logfile[255];
extern char machinename[20];
extern char bofakever[10];
extern char customrepliespath[255];
extern char executescript[255];
extern int logconnection;
extern int logreceivedpackets;
extern int logsendingpackets;
extern int logtosyslog;
extern int lognotbopackets;
extern int sendfakereply;
extern int logtimeanddate;
extern int silentmode;
extern int bufferedlogging;
extern int usecustomreplies;
extern int toexecutescript;
extern char nbfakever[10];
extern int nbport;
extern char executescriptshell[255];
extern int startasdaemon;
extern int tocrackpackets;
extern int verboselog;
extern int userealfakebo;
extern int toignorehost;
extern char ignorehost[512];
extern char ignorehostip[36];
extern char user[20];
/*
* This is for parsing the config file and printing debug information.
*
*/
extern char *keywords[NB_PARAMS];
extern void *addresses[NB_PARAMS];
extern char *in_formats[NB_PARAMS];
#endif
|