Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

config.h

Go to the documentation of this file.
00001 /* $Id$ */
00002 
00003 #ifndef __CONFIG_H__
00004 #define __CONFIG_H__
00005 
00006 /* config.h.  Generated automatically by configure.  */
00007 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
00008 
00009 /* Define if on AIX 3.
00010    System headers sometimes define this.
00011    We just want to avoid a redefinition error message.  */
00012 #ifndef _ALL_SOURCE
00013 /* #undef _ALL_SOURCE */
00014 #endif
00015 
00016 /* Define if you have the ANSI C header files.  */
00017 /* #undef STDC_HEADERS */
00018 
00019 /* Define if your processor stores words with the most significant
00020    byte first (like Motorola and SPARC, unlike Intel and VAX).  */
00021 #define WORDS_LITTLEENDIAN 1
00022 
00023 #define WIN32 1
00024 
00025 #define ERRLIST_PREDEFINED 1
00026 
00027 /* Define if you have the snprintf function.  */
00028 #define HAVE_SNPRINTF 1
00029 
00030 /* Define if you have the strerror function.  */
00031 #define HAVE_STRERROR 1
00032 
00033 /* Define if you have the <stdlib.h> header file.  */
00034 #define HAVE_STDLIB_H 1
00035 
00036 /* Define if you have the <stdint.h> header file.  */
00037 #define HAVE_STDINT_H 1
00038 
00039 /* Define if you have the <string.h> header file.  */
00040 #define HAVE_STRING_H 1
00041 
00042 /* Define if you have the <unistd.h> header file.  */
00043 #define HAVE_UNISTD_H 1
00044 
00045 /* Define if you have the pcap library (-lpcap).  */
00046 #define HAVE_LIBPCAP 1
00047 
00048 /* Version number of package */
00049 #ifdef ENABLE_ODBC
00050     #define VERSION_ENABLE_ODBC "-ODBC"
00051 #else
00052     #define VERSION_ENABLE_ODBC
00053 #endif
00054 
00055 #ifdef ENABLE_MYSQL
00056     #define VERSION_ENABLE_MYSQL "-MySQL"
00057 #else
00058     #define VERSION_ENABLE_MYSQL
00059 #endif
00060 
00061 #ifdef ENABLE_MSSQL
00062     #define VERSION_ENABLE_MSSQL "-MSSQL"
00063 #else
00064     #define VERSION_ENABLE_MSSQL
00065 #endif
00066 
00067 #ifdef ENABLE_ORACLE
00068     #define VERSION_ENABLE_ORACLE "-ORACLE"
00069 #else
00070     #define VERSION_ENABLE_ORACLE
00071 #endif
00072 
00073 #ifdef ENABLE_RESPONSE
00074     #define VERSION_ENABLE_RESPONSE "-FlexRESP"
00075 #else
00076     #define VERSION_ENABLE_RESPONSE
00077 #endif
00078  
00079 #ifdef DEBUG
00080     #define VERSION_DEBUG " [DEBUG] "
00081 #else
00082     #define VERSION_DEBUG
00083 #endif
00084 
00085 /*
00086  * This version number here, and package name below,
00087  * should both match the ones specified in the
00088  * AM_INIT_AUTOMAKE() macro of configure.in
00089  */
00090 #define VERSION "2.4.4"VERSION_ENABLE_ODBC""VERSION_ENABLE_MYSQL""VERSION_ENABLE_MSSQL""VERSION_ENABLE_ORACLE""VERSION_ENABLE_RESPONSE"-WIN32"VERSION_DEBUG
00091 #define PACKAGE "snort"
00092 
00093 
00094 
00095 #define IFNAMSIZ   255
00096 
00097 
00098 #include <winsock2.h>
00099 #include <windows.h>
00100 #ifdef _MSC_VER
00101 #pragma warning( disable : 4028 )
00102 #endif
00103 #include <io.h>
00104 #include <process.h>
00105 #ifdef _MSC_VER
00106 #pragma warning( default : 4028 )
00107 #endif
00108 #include <sys/timeb.h>
00109 #include <direct.h>
00110 #include <getopt.h>
00111 #ifndef __MINGW32__
00112 typedef int            pid_t;
00113 #endif
00114 #ifndef _SSIZE_T_      /* MingW */
00115 typedef SSIZE_T        ssize_t;
00116 #endif
00117 #include "win32/WIN32-Includes/rpc/types.h"
00118 
00119 #undef interface
00120 
00121 /* Declare standard integer datatypes */
00122 #ifdef u_int8_t
00123 #undef u_int8_t
00124 #endif
00125 #ifdef u_int16_t
00126 #undef u_int16_t
00127 #endif
00128 #ifdef u_int32_t
00129 #undef u_int32_t
00130 #endif
00131 #include <stdint.h>
00132 
00133 
00134 #if defined(WIN32) && !defined(inline)
00135 #define inline __inline
00136 #endif
00137 
00138 /* required for some calls to open(),
00139  * but it isn't defined under Win32.
00140  * Using 0x0080 to match <fcntl.h>
00141  * from OpenBSD.
00142  */
00143 #ifndef O_SYNC
00144 #define O_SYNC 0x0080
00145 #endif
00146 
00147 
00148 #ifndef CDECL 
00149 #define CDECL __cdecl
00150 #endif
00151 
00152 
00153 // #define SIGKILL                  9       /* kill (cannot be caught or ignored) */
00154 #define SIGQUIT                  3       /* quit */
00155 #define SIGHUP                   1       /* hangup */
00156 #define SIGUSR1 30               /* user defined signal 1 */
00157 #define SIGUSR2 31               /* user defined signal 2 */
00158 #define SIGPIPE 13               /* write on a pipe with no one to read it */
00159 // #define EEXIST                   17              /* File exists */
00160 #ifndef W_OK
00161 #define W_OK                     0x02    /* test for write permission */
00162 #endif
00163 #ifndef R_OK
00164 #define R_OK                     0x04    /* test for read permission */
00165 #endif
00166 #define S_ISDIR(x)               (((x) & 0170000) == 0040000)    /* directory */
00167 #define S_IRWXU                  0000700                 /* RWX mask for owner */
00168 #define S_IRWXG                  0000070                 /* RWX mask for group */
00169 #define S_IROTH                  0000004                 /* R for other */
00170 #define S_IXOTH                  0000001                 /* X for other */
00171 
00172 #define bcopy(src, dst, count)   memcpy((void *)dst, (const void *)src, (size_t) count)
00173 #define bzero(addr, count)       memset((addr), 0, (count))
00174 #define index                    strchr
00175 #define mkdir(x, y)              _mkdir(x)
00176 #define snprintf                 _snprintf
00177 #define strncasecmp              strnicmp
00178 #define strcasecmp               stricmp
00179 #define vsnprintf                _vsnprintf
00180 #define IXDR_GET_LONG(buf)       ((long)ntohl((u_long)*(buf)++))
00181 #define IXDR_GET_ENUM(buf, t)    ((t)IXDR_GET_LONG(buf))
00182 #define RPC_MSG_VERSION          ((u_long) 2)
00183 
00184 char * strtok_r(char *s1, const char *s2, char **lasts);
00185 int    inet_aton(const char *cp, struct in_addr *addr);
00186 
00187 
00188 enum msg_type {
00189     CALL=0,
00190     REPLY=1
00191 };
00192 
00193 
00194 
00195 struct timezone {
00196         int     tz_minuteswest; /* minutes west of Greenwich */
00197         int     tz_dsttime;     /* type of dst correction */
00198 };
00199 
00200 /*
00201  * Interface request structure used for socket
00202  * ioctl's.  All interface ioctl's must have parameter
00203  * definitions which begin with ifr_name.  The
00204  * remainder may be interface specific.
00205  */
00206 struct  ifreq {
00207         char    ifr_name[128];             /* if name, e.g. "en0" */
00208         union {
00209                 struct  sockaddr ifru_addr;
00210                 struct  sockaddr ifru_dstaddr;
00211                 struct  sockaddr ifru_broadaddr;
00212                 short   ifru_flags;
00213                 int     ifru_metric;
00214                 caddr_t ifru_data;
00215         } ifr_ifru;
00216 #define ifr_addr        ifr_ifru.ifru_addr      /* address */
00217 #define ifr_dstaddr     ifr_ifru.ifru_dstaddr   /* other end of p-to-p link */
00218 #define ifr_broadaddr   ifr_ifru.ifru_broadaddr /* broadcast address */
00219 #define ifr_flags       ifr_ifru.ifru_flags     /* flags */
00220 #define ifr_metric      ifr_ifru.ifru_metric    /* metric */
00221 #define ifr_mtu         ifr_ifru.ifru_metric    /* mtu (overload) */
00222 #define ifr_media       ifr_ifru.ifru_metric    /* media options (overload) */
00223 #define ifr_data        ifr_ifru.ifru_data      /* for use by interface */
00224 };
00225 
00226 
00227 #define RUSAGE_SELF       0     /* calling process */
00228 #define RUSAGE_CHILDREN  -1     /* terminated child processes */
00229 struct rusage
00230 {
00231     struct  timeval ru_utime;/* user time used */
00232     struct  timeval ru_stime;/* system time used */
00233     long    ru_maxrss;
00234     long    ru_ixrss;     /* integral shared memory size */
00235     long    ru_idrss;     /* integral unshared data " */
00236     long    ru_isrss;     /* integral unshared stack " */
00237     long    ru_minflt;    /* page reclaims */
00238     long    ru_majflt;    /* page faults */
00239     long    ru_nswap;     /* swaps */
00240     long    ru_inblock;   /* block input operations */
00241     long    ru_oublock;   /* block output operations */
00242     long    ru_msgsnd;    /* messages sent */
00243     long    ru_msgrcv;    /* messages received */
00244     long    ru_nsignals;  /* signals received */
00245     long    ru_nvcsw;     /* voluntary context switches */
00246     long    ru_nivcsw;    /* involuntary " */
00247 };
00248 
00249 int   gettimeofday(struct timeval *,struct timezone *);
00250 void *GetAdapterFromList(void *, int);
00251 char *print_interface(char *);
00252 void  PrintDeviceList(const char *);
00253 int   init_winsock(void);
00254 
00255 
00256 #if defined(ENABLE_WIN32_SERVICE)
00257     #define SERVICE_CMDLINE_PARAM            "/SERVICE"
00258     #define SERVICE_INSTALL_CMDLINE_PARAM    "/INSTALL"
00259     #define SERVICE_UNINSTALL_CMDLINE_PARAM  "/UNINSTALL"
00260     #define SERVICE_SHOW_CMDLINE_PARAM       "/SHOW"
00261 
00262     int   SnortServiceMain(int argc, char* argv[]);
00263 #endif  /* ENABLE_WIN32_SERVICE */
00264 
00265 
00266 #endif /* __CONFIG_H__ */
00267 

Generated on Sun May 14 14:51:10 2006 by  doxygen 1.4.2