fixes for 2.0.2 release candidate

Peter Van Epp vanepp at sfu.ca
Wed Sep 12 11:05:55 EDT 2001


	OK, the following patch applied to the argus-2.0.2.tar.gz release 
candidate from /dev compiles on FreeBSD 4.3 Release, OpenBSD 2.8 and 
NetBSD 1.5 correctly. Most of the changes (as mentioned earlier) are to 
move the "I'm already included" flag after the include statement so that 
we don't fool FreeBSD and NetBSD in to thinking we have included the file 
when we haven't. As well there is a patch to configure to make tcpwrappers
work correctly and one extra include file for netbsd (which might not be 
needed since there was yet another missed case of an "included flag" but
it doesn't seem to hurt so I left it in).

Peter Van Epp / Operations and Technical Support 
Simon Fraser University, Burnaby, B.C. Canada



*** server/ArgusModeler.h.orig	Tue Sep 11 14:03:58 2001
--- server/ArgusModeler.h	Tue Sep 11 14:05:21 2001
***************
*** 108,123 ****
  #include <sys/socket.h>
  
  #if !defined(__OpenBSD__) || (defined(__OpenBSD__) && !defined(_NET_IF_H_))
- #define _NET_IF_H_
  #include <net/if.h>
  #endif
  #endif
  
  #include <netinet/in.h>
  
  #if !defined(__OpenBSD__) || (defined(__OpenBSD__) && !defined(_NETINET_IF_SYSTEM_H_))
- #define _NETINET_IF_SYSTEM_H_
  #include <netinet/in_systm.h>
  #endif
  
  #if !defined(__OpenBSD__)
--- 108,123 ----
  #include <sys/socket.h>
  
  #if !defined(__OpenBSD__) || (defined(__OpenBSD__) && !defined(_NET_IF_H_))
  #include <net/if.h>
+ #define _NET_IF_H_
  #endif
  #endif
  
  #include <netinet/in.h>
  
  #if !defined(__OpenBSD__) || (defined(__OpenBSD__) && !defined(_NETINET_IF_SYSTEM_H_))
  #include <netinet/in_systm.h>
+ #define _NETINET_IF_SYSTEM_H_
  #endif
  
  #if !defined(__OpenBSD__)
***************
*** 126,143 ****
  
  #include <compat.h>
  
- #if defined(__OpenBSD__)
  #ifndef _NETINET_IP_H_
- #define _NETINET_IP_H_
  #include <netinet/ip.h>
  #endif
  #ifndef _NETINET_UDP_H_
- #define _NETINET_UDP_H_
- #include <netinet/udp.h>
- #endif
- #else
- #include <netinet/ip.h>
  #include <netinet/udp.h>
  #endif
  
  #include <netinet/tcp.h>
--- 126,138 ----
  
  #include <compat.h>
  
  #ifndef _NETINET_IP_H_
  #include <netinet/ip.h>
+ #define _NETINET_IP_H_
  #endif
  #ifndef _NETINET_UDP_H_
  #include <netinet/udp.h>
+ #define _NETINET_UDP_H_
  #endif
  
  #include <netinet/tcp.h>
*** server/ArgusSource.h.orig	Tue Sep 11 14:00:24 2001
--- server/ArgusSource.h	Tue Sep 11 14:03:09 2001
***************
*** 78,99 ****
  #include <netinet/in.h>
  
  #if !defined(__OpenBSD__) || (defined(__OpenBSD__) && !defined(_NETINET_IF_SYSTEM_H_))
- #define _NETINET_IF_SYSTEM_H_
  #include <netinet/in_systm.h>
  #endif
  
- #if defined(__OpenBSD__)
  #ifndef _NETINET_IP_H_
- #define _NETINET_IP_H_
  #include <netinet/ip.h>
  #endif
  #ifndef _NETINET_UDP_H_
- #define _NETINET_UDP_H_
- #include <netinet/udp.h>
- #endif
- #else
- #include <netinet/ip.h>
  #include <netinet/udp.h>
  #endif
  
  #include <netinet/tcp.h>
--- 78,94 ----
  #include <netinet/in.h>
  
  #if !defined(__OpenBSD__) || (defined(__OpenBSD__) && !defined(_NETINET_IF_SYSTEM_H_))
  #include <netinet/in_systm.h>
+ #define _NETINET_IF_SYSTEM_H_
  #endif
  
  #ifndef _NETINET_IP_H_
  #include <netinet/ip.h>
+ #define _NETINET_IP_H_
  #endif
  #ifndef _NETINET_UDP_H_
  #include <netinet/udp.h>
+ #define _NETINET_UDP_H_
  #endif
  
  #include <netinet/tcp.h>
*** include/argus_out.h.orig	Tue Sep 11 12:56:43 2001
--- include/argus_out.h	Tue Sep 11 20:54:27 2001
***************
*** 46,69 ****
  #ifndef Argus_out_h
  #define Argus_out_h
  
  #if defined(HAVE_SOLARIS) || (__FreeBSD__) || (__NetBSD__) || (__OpenBSD__)
  #include <sys/types.h>
  #include <sys/socket.h>
  #if !defined(_NET_IF_H_)
- #define _NET_IF_H_
  #include <net/if.h>
  #endif
  #endif
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IF_ETHER_H_)
- #define _NETINET_IF_ETHER_H_
  #include <netinet/if_ether.h>
  #endif 
  
  #include <netinet/rtp.h>
  #include <llc.h>
- 
- 
  
  struct ArgusETHERObject {
     unsigned char ethersrc[6];
--- 46,71 ----
  #ifndef Argus_out_h
  #define Argus_out_h
  
+ #if defined(__NetBSD__)
+ #include <sys/queue.h>
+ #endif
+ 
  #if defined(HAVE_SOLARIS) || (__FreeBSD__) || (__NetBSD__) || (__OpenBSD__)
  #include <sys/types.h>
  #include <sys/socket.h>
  #if !defined(_NET_IF_H_)
  #include <net/if.h>
+ #define _NET_IF_H_
  #endif
  #endif
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IF_ETHER_H_)
  #include <netinet/if_ether.h>
+ #define _NETINET_IF_ETHER_H_
  #endif 
  
  #include <netinet/rtp.h>
  #include <llc.h>
  
  struct ArgusETHERObject {
     unsigned char ethersrc[6];
*** include/argus_util.h.orig	Tue Sep 11 13:41:13 2001
--- include/argus_util.h	Tue Sep 11 13:44:27 2001
***************
*** 47,66 ****
  #define ArgusUtil_h
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IF_SYSTEM_H_)
- #define _NETINET_IF_SYSTEM_H_
  #include <netinet/in_systm.h>
  #endif
  
! #if defined(__OpenBSD__)
! #ifndef _NETINET_IP_H_
! #define _NETINET_IP_H_
! #include <netinet/ip.h>
! #endif
! #else
  #include <netinet/ip.h>
  #endif
  
- 
  #include <argus_out.h>
  #include <cons_out.h>
  
--- 47,61 ----
  #define ArgusUtil_h
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IF_SYSTEM_H_)
  #include <netinet/in_systm.h>
+ #define _NETINET_IF_SYSTEM_H_
  #endif
  
! #if !defined(__OpenBSD__) || !defined(_NETINET_IP_H_)
  #include <netinet/ip.h>
+ #define _NETINET_IP_H_
  #endif
  
  #include <argus_out.h>
  #include <cons_out.h>
  
***************
*** 175,182 ****
  
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IP_ICMP_H_)
- #define _NETINET_IP_ICMP_H_
  #include <netinet/ip_icmp.h>
  #endif
  
  char *icmptypestr[ICMP_MAXTYPE + 1] = {
--- 170,177 ----
  
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IP_ICMP_H_)
  #include <netinet/ip_icmp.h>
+ #define _NETINET_IP_ICMP_H_
  #endif
  
  char *icmptypestr[ICMP_MAXTYPE + 1] = {
*** configure.orig	Mon Sep 10 00:37:37 2001
--- configure	Mon Sep 10 00:37:42 2001
***************
*** 1978,1984 ****
  else
     libpcapdirs=$pdir/`ls .. | egrep '^libpcap-[0-9]*\.[0-9ab]*'`
     otherdirs="/usr/local/lib /usr/lib $pdir/libpcap $pdir"
!    dirs="$libpcapdirs $otherdirs"
  
  echo "Searching directories "$dirs
     for this_dir in $dirs; do if test -r $this_dir/libpcap.a ; then
--- 1978,1984 ----
  else
     libpcapdirs=$pdir/`ls .. | egrep '^libpcap-[0-9]*\.[0-9ab]*'`
     otherdirs="/usr/local/lib /usr/lib $pdir/libpcap $pdir"
!    dirs="$libpcapdirs $otherdirs /usr/include"
  
  echo "Searching directories "$dirs
     for this_dir in $dirs; do if test -r $this_dir/libpcap.a ; then
***************
*** 2012,2018 ****
  else
     libwrapdirs=$pdir/`ls .. | egrep '^wrapper|^tcp_wrappers' | sort -ru `
     otherdirs="/usr/local/lib /usr/lib $pdir/libwrap $pdir"
!    dirs="$libwrapdirs $otherdirs"
  
  echo "Searching directories "$dirs
     for this_dir in $dirs; do if test -r $this_dir/libwrap.a ; then
--- 2012,2018 ----
  else
     libwrapdirs=$pdir/`ls .. | egrep '^wrapper|^tcp_wrappers' | sort -ru `
     otherdirs="/usr/local/lib /usr/lib $pdir/libwrap $pdir"
!    dirs="$libwrapdirs $otherdirs /usr/include"
  
  echo "Searching directories "$dirs
     for this_dir in $dirs; do if test -r $this_dir/libwrap.a ; then
*** include/cons_out.h.orig	Tue Sep 11 13:27:30 2001
--- include/cons_out.h	Tue Sep 11 13:35:36 2001
***************
*** 43,57 ****
   */
  
  #if !defined(__OpenBSD__) || !defined(_NET_IF_H_)
- #define _NET_IF_H_
  #include <net/if.h>
  #endif
  
  #include <netinet/in.h>
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IF_ETHER_H_)
- #define _NETINET_IP_ETHER_H_
  #include <netinet/if_ether.h>
  #endif
  
  struct THA_OBJECT {
--- 43,57 ----
   */
  
  #if !defined(__OpenBSD__) || !defined(_NET_IF_H_)
  #include <net/if.h>
+ #define _NET_IF_H_
  #endif
  
  #include <netinet/in.h>
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IF_ETHER_H_)
  #include <netinet/if_ether.h>
+ #define _NETINET_IP_ETHER_H_
  #endif
  
  struct THA_OBJECT {
*** common/gencode.c.orig	Tue Sep 11 13:56:00 2001
--- common/gencode.c	Tue Sep 11 13:56:22 2001
***************
*** 52,59 ****
  #include <netinet/in.h>
  
  #if !defined(__OpenBSD__) || !defined(_NET_IF_H_)
- #define _NET_IF_H_
  #include <net/if.h>
  #endif
  
  #include <setjmp.h>
--- 52,59 ----
  #include <netinet/in.h>
  
  #if !defined(__OpenBSD__) || !defined(_NET_IF_H_)
  #include <net/if.h>
+ #define _NET_IF_H_
  #endif
  
  #include <setjmp.h>
*** clients/ragator.c.orig	Tue Sep 11 13:58:41 2001
--- clients/ragator.c	Tue Sep 11 13:59:03 2001
***************
*** 904,911 ****
  }
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IP_ICMP_H_)
- #define _NETINET_IP_ICMP_H_
  #include <netinet/ip_icmp.h>
  #endif
  
  void
--- 904,911 ----
  }
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IP_ICMP_H_)
  #include <netinet/ip_icmp.h>
+ #define _NETINET_IP_ICMP_H_
  #endif
  
  void
*** clients/ramon.c.orig	Tue Sep 11 14:17:19 2001
--- clients/ramon.c	Tue Sep 11 14:17:37 2001
***************
*** 807,814 ****
  }
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IP_ICMP_H_)
- #define _NETINET_IP_ICMP_H_
  #include <netinet/ip_icmp.h>
  #endif
  
  void
--- 807,814 ----
  }
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IP_ICMP_H_)
  #include <netinet/ip_icmp.h>
+ #define _NETINET_IP_ICMP_H_
  #endif
  
  void
*** clients/raxml.c.orig	Tue Sep 11 13:59:24 2001
--- clients/raxml.c	Tue Sep 11 13:59:39 2001
***************
*** 378,385 ****
  
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IP_ICMP_H_)
- #define _NETINET_IP_ICMP_H_
  #include <netinet/ip_icmp.h>
  #endif
  
  extern char *icmptypestr[];
--- 378,385 ----
  
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IP_ICMP_H_)
  #include <netinet/ip_icmp.h>
+ #define _NETINET_IP_ICMP_H_
  #endif
  
  extern char *icmptypestr[];



More information about the argus mailing list