
/*-------------------------------------------------------------*/
#ifdef WIN32
 /* Visual C++ warnings to disable */
 /* conditional expression is constant */
 #pragma warning(disable : 4127)
#endif

/*-------------------------------------------------------------*/
#include "lcrzo.h"

/*-------------------------------------------------------------*/
#ifdef LCRZODEF_SYSTEM_Linux
 #if ! defined _GNU_SOURCE
  #define _GNU_SOURCE 1
 #endif
 #if ! defined _POSIX_SOURCE
  /* should not be necessary, but SuSE 5.1 need it */
  #define _POSIX_SOURCE 1
 #endif
 #if ! defined _BSD_SOURCE
  /* should not be necessary, but SuSE 5.1 need it */
  #define _BSD_SOURCE 1
 #endif
#elif defined LCRZODEF_SYSTEM_FreeBSD
#elif defined LCRZODEF_SYSTEM_OpenBSD
#elif defined LCRZODEF_SYSTEM_Solaris
 #if ! defined __EXTENSIONS__
  #define __EXTENSIONS__ 1
 #endif
#elif defined LCRZODEF_SYSTEM_Windows
 /* nothing to include for the moment */
#else
 #error "Unknown value for LCRZODEF_SYSTEM"
#endif

/*-------------------------------------------------------------*/
#if defined LCRZODEF_SYSTEM_Unix
 #include <stdlib.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
 #include <ctype.h>
 #include <signal.h>
 #include <errno.h>
 #include <regex.h>
 #include <dirent.h>
 #include <netdb.h>
 #include <termios.h>
 #include <fcntl.h>
 #include <time.h>
 #include <grp.h>
 #include <limits.h>
#elif defined LCRZODEF_SYSTEM_Windows
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdarg.h>
 #include <windows.h>
 #include <limits.h>
 #include <io.h>
 #include <memory.h>
 #include <ctype.h>
 #include <conio.h>
 #include <signal.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <time.h>
 #include <process.h>
 #include <direct.h>
 #include <winsock.h>
 #include <snmp.h>
 #include "port/Windows/regex/regex.h"
 #include <iphlpapi.h>
 #include <winioctl.h>
 #include "port/Windows/winpcap/include/ntddndis.h"
#else
 #error "Unknown value for LCRZODEF_SYSTEM"
#endif

/*-------------------------------------------------------------*/
#if defined LCRZODEF_SYSTEM_Unix
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
 #include <sys/resource.h>
 #include <sys/time.h>
 #if LCRZODEF_HAVEFONC_POLL==1
  #include <sys/poll.h>
 #endif
#elif defined LCRZODEF_SYSTEM_Windows
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/timeb.h>
#else
 #error "Unknown value for LCRZODEF_SYSTEM"
#endif

/*-------------------------------------------------------------*/
#if defined LCRZODEF_SYSTEM_Unix
 #include <net/if.h>
 #include <net/route.h>
 #include <netinet/in.h>
#elif defined LCRZODEF_SYSTEM_Windows
#else
 #error "Unknown value for LCRZODEF_SYSTEM"
#endif

/*-------------------------------------------------------------*/
#ifdef LCRZODEF_SYSTEM_Linux
 #include <sys/ioctl.h>
 #if LCRZODEF_HAVEFONC_ETHER_NTOHOST==1 || LCRZODEF_HAVEFONC_ETHER_HOSTTON==1
  #include <net/ethernet.h>
  #include <netinet/ether.h>
 #endif
 #include <net/if_arp.h>
 #if LCRZODEF_HAVEINCL_NETPACKET_PACKET==1
  #include <netpacket/packet.h>
 #endif
#elif defined LCRZODEF_SYSTEM_FreeBSD
 #include <sys/sysctl.h>
 #include <sys/ioctl.h>
 #include <net/ethernet.h>
 #include <net/if_arp.h>
 #include <net/if_types.h>
 #include <net/if_dl.h>
 #include <net/bpf.h>
 #include <netinet/if_ether.h>
#elif defined LCRZODEF_SYSTEM_OpenBSD
 #include <sys/sysctl.h>
 #include <sys/ioctl.h>
 #include <net/if_types.h> 
 #include <net/if_dl.h>
 #include <net/bpf.h>
 #include <netinet/if_ether.h>
#elif defined LCRZODEF_SYSTEM_Solaris
 #include <stropts.h>
 #include <sys/sockio.h>
 #include <sys/dlpi.h>
 #if LCRZODEF_HAVEINCL_SYS_BUFMOD==1
  #include <sys/bufmod.h>
 #endif
 #include <net/if_arp.h>
 #if defined LCRZODEF_SYSVER_Solaris_27
  #include <net/if_dl.h>
 #endif
 #include <netinet/if_ether.h>
 #if defined LCRZODEF_SYSVER_Solaris_25
  void usleep(unsigned long usec);
  int getpriority(int which, int who);
  int setpriority(int which, int who, int prio);
 #endif
#elif defined LCRZODEF_SYSTEM_Windows
 #include <pcap.h>
 #include <packet32.h>
#else
 #error "Unknown value for LCRZODEF_SYSTEM"
#endif

/*-------------------------------------------------------------*/
#include "lcrzo_priv.h"
#include "lcrzo_priv2.h"
#include "lcrzo_sysdep.h"
#include "lcrzo_sysdep2.h"

