2.0.2 release candidate redux (I hope!)

Peter Van Epp vanepp at sfu.ca
Wed Sep 12 22:53:43 EDT 2001


	The difficulty with OpenBSD turned out to be a missing "defined(__OpenBSD__)" in argus_util.c (probably been there a while without me noticing in fact).
With this patch (again against the /dev/argus-2.0.2.tar.gz file)  both OpenBSD 
and FreeBSD (and I expect NetBSD which I tested earlier but before this patch) 
all compile, create plausible looking (but so far unverified) output records 
and plausable closing man records (with the numbers at least in the right 
fields). Hopefully this will give us a release candidate (especially if I stop 
looking for bad things :-)).

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];
*** common/argus_util.c.orig	Tue Sep 11 13:55:07 2001
--- common/argus_util.c	Wed Sep 12 19:32:32 2001
***************
*** 224,231 ****
  #include <cons_def.h>
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IP_ICMP_H_)
- #define _NETINET_IP_ICMP_H_
  #include <netinet/ip_icmp.h>
  #endif
  
  extern int ArgusTotalBytes;
--- 224,231 ----
  #include <cons_def.h>
  
  #if !defined(__OpenBSD__) || !defined(_NETINET_IP_ICMP_H_)
  #include <netinet/ip_icmp.h>
+ #define _NETINET_IP_ICMP_H_
  #endif
  
  extern int ArgusTotalBytes;
***************
*** 1036,1042 ****
  
     } else {
        if (Iflag)
! #if defined(HAVE_SOLARIS) || defined(__FreeBSD__) || defined(__NetBSD__)
           strcpy (fmtstr, "%s%s%4s  pkts %9lld  bytes %12lld  drops %5d  ");
        else
           strcpy (fmtstr, "%s  %4s  pkts %9lld  bytes %12lld  drops %5d  ");
--- 1036,1042 ----
  
     } else {
        if (Iflag)
! #if defined(HAVE_SOLARIS) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
           strcpy (fmtstr, "%s%s%4s  pkts %9lld  bytes %12lld  drops %5d  ");
        else
           strcpy (fmtstr, "%s  %4s  pkts %9lld  bytes %12lld  drops %5d  ");
*** 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