argus-3.0.0.rc.9

Peter Van Epp vanepp at sfu.ca
Fri Jun 16 00:56:29 EDT 2006


On Thu, Jun 15, 2006 at 06:05:06PM -0400, Carter Bullard wrote:
> Fresh clean new code on the server.    I believe that it addresses
> all the outstanding issues, and fixes a bunch of unreported problems.
> Especially regarding 2.0 -> 3.0 record upconversion on little-endian
> machines.
> 
> I added a change to ./include/compat.h to solve this problem Peter
> reported.  I think I've got all the patches in, but I'm sure I missed
> something. Hopefully we're much closer.
> 
> Carter
> 
	We are indeed (despite what it seems :-)) much closer. This worked out
of the box on everything but NetBSD, MacOS 10.3 and FreeBSD 4.10. With the
following patches against argus-3.0.0.rc.9 it works on all of them:

*** argus/ArgusModeler.c.orig	Thu Jun 15 20:03:21 2006
--- argus/ArgusModeler.c	Thu Jun 15 20:08:14 2006
***************
*** 1661,1666 ****
--- 1661,1667 ----
  {
     struct ArgusFlowStruct *retn = flow;
     struct ArgusMetricStruct *metric = NULL;
+    struct ArgusFragObject *ofrag;
  
     ArgusUpdateBasicFlow (model, flow, state);
  
***************
*** 1752,1758 ****
                 } else {
                    struct ArgusNetworkStruct *net = (struct ArgusNetworkStruct *)frag->dsrs[ARGUS_FRAG_INDEX];
                    net->hdr.argus_dsrvl8.qual |= ARGUS_FRAG_OUT_OF_ORDER;
!                   struct ArgusFragObject *ofrag = &net->net_union.frag;
                    if (ofrag->parent == NULL) {
                       ofrag->parent = flow;
                       if (frag->qhdr.queue != &flow->frag)
--- 1753,1759 ----
                 } else {
                    struct ArgusNetworkStruct *net = (struct ArgusNetworkStruct *)frag->dsrs[ARGUS_FRAG_INDEX];
                    net->hdr.argus_dsrvl8.qual |= ARGUS_FRAG_OUT_OF_ORDER;
!                   ofrag = &net->net_union.frag;
                    if (ofrag->parent == NULL) {
                       ofrag->parent = flow;
                       if (frag->qhdr.queue != &flow->frag)


*** argus/ArgusSource.c.orig	Thu Jun  8 11:20:12 2006
--- argus/ArgusSource.c	Thu Jun 15 21:47:40 2006
***************
*** 958,969 ****
     struct ArgusSourceStruct *src = (struct ArgusSourceStruct *) user;
     struct timeval *tvp = (struct timeval *) &h->ts;
     struct ether_header *ep;
     unsigned int length = h->len;
     unsigned int caplen = h->caplen;
     int ind = src->ArgusThisIndex;
  
     ep = (struct ether_header *) src->ArgusInterface[ind].ArgusPacketBuffer;
!    const struct fddi_header *fp = (struct fddi_header *)p;
  
     src->ArgusModel->ArgusGlobalTime  = *tvp;
     src->ArgusModel->ArgusThisLength  = length;
--- 958,970 ----
     struct ArgusSourceStruct *src = (struct ArgusSourceStruct *) user;
     struct timeval *tvp = (struct timeval *) &h->ts;
     struct ether_header *ep;
+    const struct fddi_header *fp;
     unsigned int length = h->len;
     unsigned int caplen = h->caplen;
     int ind = src->ArgusThisIndex;
  
     ep = (struct ether_header *) src->ArgusInterface[ind].ArgusPacketBuffer;
!    fp = (struct fddi_header *)p;
  
     src->ArgusModel->ArgusGlobalTime  = *tvp;
     src->ArgusModel->ArgusThisLength  = length;
***************
*** 1109,1116 ****
  #endif
  }
  
! #if defined(__NetBSD__)
! #include <machine/param.h>
  #include <sys/mbuf.h>
  #endif
  
--- 1110,1117 ----
  #endif
  }
  
! #if defined(__NetBSD__) || defined(__FreeBSD__)
! #include <sys/param.h>
  #include <sys/mbuf.h>
  #endif
 
 
*** include/argus_os.h.orig	Thu Jun 15 19:59:52 2006
--- include/argus_os.h	Thu Jun 15 20:02:07 2006
***************
*** 92,99 ****
--- 92,104 ----
  #define ESRC(ep) ((ep)->ether_shost)
  #endif
  
+ #if defined(__FreeBSD__)
+ #include <sys/types.h>
+ #include <netinet/in.h>
+ #else
  #include <netinet/in.h>
  #include <sys/types.h>
+ #endif
  #include <netinet/icmp6.h>
  
  #if !defined(ICMP6_MEMBERSHIP_QUERY)    


*** common/argus_util.c.orig	Thu Jun 15 20:36:03 2006
--- common/argus_util.c	Thu Jun 15 20:46:04 2006
***************
*** 1889,1895 ****
--- 1889,1897 ----
          unsigned char ether_addr_octet[6];
  };
  #endif
+ #if !defined(__APPLE_CC__) && !defined(__APPLE__)
  extern int ether_hostton(const char *, struct ether_addr *);
+ #endif
  #endif
  
  u_char *


*** include/compat.h.orig	Thu Jun 15 19:50:04 2006
--- include/compat.h	Thu Jun 15 19:55:39 2006
***************
*** 143,148 ****
--- 143,153 ----
  #define arg_int32   long
  #endif
  
+ #if defined (__FreeBSD__)
+ #include <sys/socket.h>
+ #include <netinet/if_ether.h>
+ #endif
+ 
  #ifndef ICMP_ROUTERADVERT
  #define	ICMP_ROUTERADVERT	9	/* router advertisement */
  #endif



More information about the argus mailing list