Further (broken) argus-2.0.0 patches

Peter Van Epp vanepp at sfu.ca
Sat Sep 2 20:02:32 EDT 2000


> 
> Try this tar file.  It seems to work when
> I remove bison from my system, causing ./configure
> to revert to yacc/lex.  The first 2.0.0 code
> also gave me lots of problems when I did this so
> it may solve your problems.
> 
> Hmmm, I'm not following what I need to do for the
> pthread library.  Should I remove it, or is there
> a different library to link in?
> 
> 
> Carter
> 

	Success has plauged my efforts! I have argus compiling and running.
It seems to be buffering output internally (I didn't get output until I 
control Ced) and locked up once (control C didn't return, had to kill -9) and
it has date issues on the man records, but it does give output:

test1# ./ra -r argus.log
31 Dec 69 16:00:00  man  pkts      0  bytes        0  drops     0  STA

02 Sep 00 16:56:25 unkn  0:6:29:d:42:f4        -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:25 unkn  0:60:8:92:44:b1       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:26 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:27 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:28 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:29 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:29 unkn  0:6:29:75:9a:35       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:30 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:31 unkn  0:6:29:75:9a:ec       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:31 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:49 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:50 unkn  0:60:8:92:44:b1       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:50  udp testnt1.ucs.sfu.138    ->    142.58.1.255.138   INT
02 Sep 00 16:56:50 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:32 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:32 unkn  0:6:29:75:9a:ec       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:32 unkn  0:6:29:75:9a:ec       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:32  udp wizeup.ucs.sfu..138    ->    142.58.1.255.138   INT
02 Sep 00 16:56:33 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:34 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:35 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:47 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:48 unkn  0:60:8:92:44:b1       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:48 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:36 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:37 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:37 unkn  0:30:c1:2e:8e:9c      -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:38 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:38 unkn  0:60:b0:c7:e4:1a      -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:45 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:46 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:38 unkn  0:60:b0:c7:e4:1a      -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:39 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:40 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:43 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:44 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:41 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:42 unkn  8:0:2b:b0:13:ab       ->      9:0:7:0:0:11     INT
02 Sep 00 16:56:42 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:42  tcp test1.ucs.sfu.c.22    <-> vanepp1.isdn.sf.533   EST
02 Sep 00 16:55:42 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:43 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:43 unkn  0:0:1d:95:3d:18       ->     1:80:c2:0:0:0     INT
02 Sep 00 16:55:44 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:45 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:45 unkn  0:6:29:f5:2:7f        -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:46 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:46 unkn  0:0:1d:d4:97:ee       ->      1:0:1d:0:0:0     INT
02 Sep 00 16:55:47 unkn  8:0:9:77:62:86        -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:47 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:48 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:48 unkn  0:10:4b:24:52:1a      -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:48 unkn  0:a0:c9:5a:2:45       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:49 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:50  arp test1.ucs.sfu.c     who-has gate1-bby.sfu.c     ACC
02 Sep 00 16:55:50  tcp vanepp1.isdn.sf.642   <-> test1.ucs.sfu.c.22    EST
02 Sep 00 16:55:50 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:50 unkn  0:a0:c9:5a:2:45       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:50 unkn  0:a0:c9:5a:2:45       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:50  udp pcfrances.ucs.s.138    ->    142.58.1.255.138   INT
02 Sep 00 16:55:51 exp   8:0:2b:b0:13:ab       ->    9:0:7:ff:ff:ff     INT
02 Sep 00 16:55:51 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:51 unkn  0:6:29:75:9a:ec       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:52 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:53 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:54 exp   0:e0:63:2:d2:4d       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:54 exp   0:e0:63:2:d2:4d       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:54 unkn  0:e0:63:2:d2:4d       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:54 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:55 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:55 unkn  0:6:29:75:8e:69       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:56 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:56 unkn  0:60:8:92:44:8b       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:55:57 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:58 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:55:59 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:00 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:01 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:02 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:02 unkn  0:e0:63:2:d2:4d       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:02 unkn  0:a0:c9:5a:2:45       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:03 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:04  arp dodo.ucs.sfu.ca     who-has albatross.ucs.s     INT
02 Sep 00 16:56:04 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:05 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:05 unkn  8:0:2b:b0:13:ab       ->    9:0:7:ff:ff:ff     INT
02 Sep 00 16:56:06 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:07 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:08 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:09 unkn  8:0:9:98:99:2c        -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:09 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:09  arp gate1-bby.sfu.c     who-has litespeed.ucs.s     INT
02 Sep 00 16:56:10 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:11 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:12 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:13 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:14 unkn  0:6:29:d3:17:eb       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:14 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:15 unkn  8:0:9:74:fa:83        -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:15 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:15 unkn  0:6:29:d3:17:eb       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:16 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:17 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:18 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:19 unkn  0:6:29:75:9e:56       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:19 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:20 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:21 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:22 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:23 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:24 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:25 unkn  0:60:b0:b9:8d:a3      -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:25 unkn  0:6:29:d3:17:eb       -> ff:ff:ff:ff:ff:ff     INT
02 Sep 00 16:56:25 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
02 Sep 00 16:56:51 icmp   fraser.sfu.ca        -> test1.ucs.sfu.c       ECO
31 Dec 69 16:00:00  man  pkts    696  bytes        0  drops 52042  STP

	Applying this patch from the as distributed tar file argus-2.0.0 
directory using patch -p <../patch recreates this running code (I expect Carter
will need to make it portable again, I just hacked the Makefile.in files to 
do what I needed):


*** server/ArgusModeler.h.orig	Fri Sep  1 20:48:44 2000
--- server/ArgusModeler.h	Fri Sep  1 20:51:05 2000
***************
*** 84,90 ****
  #define TCHECK(var) TCHECK2(var, sizeof(var))
  
  
! #if defined(linux)
  #include <pthread.h>
  #else
  #include <thread.h>
--- 84,90 ----
  #define TCHECK(var) TCHECK2(var, sizeof(var))
  
  
! #if defined(linux) || defined(__FreeBSD__)
  #include <pthread.h>
  #else
  #include <thread.h>
***************
*** 93,99 ****
  #include <sys/types.h>
  #include <sys/time.h>
  
! #if defined(HAVE_SOLARIS)
  #include <sys/socket.h>
  #endif
  
--- 93,99 ----
  #include <sys/types.h>
  #include <sys/time.h>
  
! #if defined(HAVE_SOLARIS) || defined(__FreeBSD__)
  #include <sys/socket.h>
  #endif
  
*** server/ArgusOutput.h.orig	Fri Sep  1 20:49:04 2000
--- server/ArgusOutput.h	Fri Sep  1 20:49:22 2000
***************
*** 58,64 ****
  #define ARGUS_MONITORPORT	561
  #define ARGUS_MAXLISTEN		5
  
! #if defined(linux)
  #include <pthread.h>
  #else
  #include <thread.h>
--- 58,64 ----
  #define ARGUS_MONITORPORT	561
  #define ARGUS_MAXLISTEN		5
  
! #if defined(linux) || defined(__FreeBSD__)
  #include <pthread.h>
  #else
  #include <thread.h>
*** server/ArgusSource.h.orig	Fri Sep  1 20:43:59 2000
--- server/ArgusSource.h	Fri Sep  1 20:44:33 2000
***************
*** 49,55 ****
  
  #include <stdio.h>
  
! #if defined(linux)
  #include <pthread.h>
  #else
  #include <thread.h>
--- 49,55 ----
  
  #include <stdio.h>
  
! #if defined(linux) || defined(__FreeBSD__)
  #include <pthread.h>
  #else
  #include <thread.h>
*** include/argus_out.h.orig	Fri Sep  1 20:02:51 2000
--- include/argus_out.h	Fri Sep  1 20:05:34 2000
***************
*** 46,52 ****
  #ifndef Argus_out_h
  #define Argus_out_h
  
! #if defined(HAVE_SOLARIS)
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <net/if.h>
--- 46,52 ----
  #ifndef Argus_out_h
  #define Argus_out_h
  
! #if defined(HAVE_SOLARIS) || defined(__FreeBSD__)
  #include <sys/types.h>
  #include <sys/socket.h>
  #include <net/if.h>
*** common/Makefile.in.orig	Sat Sep  2 16:18:36 2000
--- common/Makefile.in	Sat Sep  2 16:19:56 2000
***************
*** 127,144 ****
  
  scanner.c: scanner.l
  	@rm -f $@
! 	$(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@
  
  scanner.o: scanner.c tokdefs.h
  tokdefs.h: grammar.c
  grammar.c: grammar.y
  	@rm -f grammar.c tokdefs.h
! 	$(YACC) -d $<
  	mv y.tab.c grammar.c
  	mv y.tab.h tokdefs.h
  
  grammar.o: grammar.c
! 	$(CC) $(CFLAGS) -Dyylval=argus_lval -c grammar.c
  
  clean:
  	rm -f $(CLEANFILES)
--- 127,144 ----
  
  scanner.c: scanner.l
  	@rm -f $@
! 	$(LEX) -Pargus_ -t $< > $$$$.$@; mv $$$$.$@ $@
  
  scanner.o: scanner.c tokdefs.h
  tokdefs.h: grammar.c
  grammar.c: grammar.y
  	@rm -f grammar.c tokdefs.h
! 	$(YACC) -p argus_ -d $<
  	mv y.tab.c grammar.c
  	mv y.tab.h tokdefs.h
  
  grammar.o: grammar.c
! 	$(CC) $(CFLAGS) -c grammar.c
  
  clean:
  	rm -f $(CLEANFILES)
*** common/gencode.c.orig	Fri Sep  1 20:15:29 2000
--- common/gencode.c	Fri Sep  1 20:16:35 2000
***************
*** 43,49 ****
   */
  
  
! #if defined(HAVE_SOLARIS)
  #include <sys/types.h>
  #include <sys/socket.h>
  #endif
--- 43,49 ----
   */
  
  
! #if defined(HAVE_SOLARIS) || defined(__FreeBSD__)
  #include <sys/types.h>
  #include <sys/socket.h>
  #endif
*** common/grammar.y.orig	Fri Sep  1 20:17:57 2000
--- common/grammar.y	Sat Sep  2 15:39:34 2000
***************
*** 45,51 ****
   *
   */
  
! #if defined(HAVE_SOLARIS)
  #include <sys/types.h>
  #include <sys/socket.h>
  #endif
--- 45,51 ----
   *
   */
  
! #if defined(HAVE_SOLARIS) || defined(__FreeBSD__)
  #include <sys/types.h>
  #include <sys/socket.h>
  #endif
***************
*** 75,87 ****
  	Argus_error(msg);
  	/* NOTREACHED */
  }
- 
- #ifndef YYBISON
- argus_parse()
- {
- 	return (yyparse());
- }
- #endif
  
  %}
  
--- 75,80 ----
*** server/Makefile.in.orig	Sat Sep  2 16:50:09 2000
--- server/Makefile.in	Sat Sep  2 16:53:20 2000
***************
*** 103,109 ****
  
  PCAPLIB = @PCAPLIBDIR@
  WRAPLIB = @WRAPLIBDIR@
! COMPATLIB = @COMPAT_LIB@ ../lib/argus_common.a -lpthread -lm
  
  LIB = $(PCAPLIB) $(WRAPLIB) $(COMPATLIB)
  
--- 103,109 ----
  
  PCAPLIB = @PCAPLIBDIR@
  WRAPLIB = @WRAPLIBDIR@
! COMPATLIB = @COMPAT_LIB@ ../lib/argus_common.a -lm
  
  LIB = $(PCAPLIB) $(WRAPLIB) $(COMPATLIB)
  
***************
*** 121,127 ****
  all: $(PROG)
  
  @INSTALL_BIN@/argus_ at V_PCAP@: $(OBJ) ../lib/argus_common.a
! 	$(CC) -o $@ $(OBJ) $(LIB)
  
  install: force
  	$(INSTALL) -m 444 -o bin -g bin libpcap.a $(DESTDIR)$(LIBDEST)/libpcap.a
--- 121,127 ----
  all: $(PROG)
  
  @INSTALL_BIN@/argus_ at V_PCAP@: $(OBJ) ../lib/argus_common.a
! 	$(CC) -pthread -o $@ $(OBJ) $(LIB)
  
  install: force
  	$(INSTALL) -m 444 -o bin -g bin libpcap.a $(DESTDIR)$(LIBDEST)/libpcap.a

--- cut here  ---

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



More information about the argus mailing list