You are not logged in.

#1 2005-01-11 16:44:39

BlueRaven
Member
Registered: 2004-10-28
Posts: 14

[NEW] flow-tools

Are you working with NetFlow? Yes?
So you'll find this one useful... it's a great set of tools to work with NetFlow data (collect, process, store etc.).
Here is the PKGBUILD:

pkgname=flow-tools
pkgver=0.67
pkgrel=1
pkgdesc="A set of tools for collecting and processing NetFlow data"
depends=('tcp_wrappers' 'zlib')
#makedepends=()
#backup=()
source=(ftp://ftp.eng.oar.net/pub/$pkgname/$pkgname-$pkgver.tar.gz
        flow-tools-gcc34.patch)
url="http://www.splintered.net/sw/flow-tools"
md5sums=('0ee0a2830effa554d1925236aad6b4fe' 'd08defd613f3016a3df83dfe9281870b')

build() {
  cd $startdir/src/$pkgname-$pkgver

  # Apply patch to make software compile with GCC 3.4
  patch -Np1 -i ../flow-tools-gcc34.patch || return 1

  # OK, now do stuff!
  ./configure --prefix=/usr --localstatedir=/usr/share/flow-tools
  make || return 1
  make DESTDIR=$startdir/pkg install
}

And this is a patch to make it compile with GCC 3.4 (name it flow-tools-gcc34.patch):

diff -uNr flow-tools-0.67.orig/src/flow-cat.c flow-tools-0.67/src/flow-cat.c
--- flow-tools-0.67.orig/src/flow-cat.c 2003-04-02 20:03:01.000000000 +0200
+++ flow-tools-0.67/src/flow-cat.c      2005-01-11 16:34:28.000000000 +0100
@@ -552,6 +552,8 @@
 
 next_file:
 
+    do {} while (0);
+
     }  /* FOREACH filename in dir */
 
   } /* foreach dir bundle */
diff -uNr flow-tools-0.67.orig/src/flow-dscan.c flow-tools-0.67/src/flow-dscan.c
--- flow-tools-0.67.orig/src/flow-dscan.c       2003-11-25 11:14:27.000000000 +0100
+++ flow-tools-0.67/src/flow-dscan.c    2005-01-11 16:34:01.000000000 +0100
@@ -561,6 +561,7 @@
 
 skip2:
 
+  do {} while (0);
 
   } /* while rec */
 
@@ -807,6 +808,8 @@
 
 skip3:
 
+do {} while (0);
+
 } /* ager */
 
 int load_suppress(struct dscan_state *ds, int sd)
diff -uNr flow-tools-0.67.orig/src/flow-fanout.c flow-tools-0.67/src/flow-fanout.c
--- flow-tools-0.67.orig/src/flow-fanout.c      2003-12-01 00:38:37.000000000 +0100
+++ flow-tools-0.67/src/flow-fanout.c   2005-01-11 16:33:33.000000000 +0100
@@ -841,6 +841,8 @@
     
 skip1:
 
+    do {} while (0);
+
     } /* if FD_ISSET */
 
     if (sig_quit_flag) {
diff -uNr flow-tools-0.67.orig/src/flow-receive.c flow-tools-0.67/src/flow-receive.c
--- flow-tools-0.67.orig/src/flow-receive.c     2003-11-25 06:37:04.000000000 +0100
+++ flow-tools-0.67/src/flow-receive.c  2005-01-11 16:32:58.000000000 +0100
@@ -734,6 +734,8 @@
 
 skip1:
 
+  do {} while (0);
+
     } /* if FD_ISSET */
 
   } /* while 1 */

Any feedback welcome! :-)

Offline

Board footer

Powered by FluxBB