Friday, May 7, 2010

Python + Flow-Tools

Getting Flow-Tools 0.68 working on a 64-bit platform was a bit of work. Then I actually wanted to develop a report so I wanted to install

http://www.splintered.net/sw/flow-tools/
http://www.icir.org/robin/flowtools/

I have a penchant for unmaintained software as I'm replacing ipaudit with something else.

Short Summary:

In flow-tools 0.68:

ftlib.h/ftlib.c -> s/u_int32_t/time_t in FlowTools
edit lib/Makefile -> AM_CFLAGS to include -fPIC
make clean
make

In pyflowtools:

python setup.py build_ext -I ~/src/flow-tools-0.68/lib -L ~/src/flow-tools-0.68/lib

Update: 5/7/2010:

Now looking at http://code.google.com/p/flow-tools/ for a maintained 64-bit clean version.

ftlib.h killed the unsigned int defs so I'm here's a working/lightly test patch:

--- pyflowtools-0.3/flowtools.c 2002-05-21 16:54:41.000000000 -0500
+++ pyflowtools-0.3.cmg/flowtools.c 2010-05-07 14:02:53.000000000 -0500
@@ -10,6 +10,11 @@

#define offset( x ) offsetof( struct fts3rec_offsets, x )

+typedef unsigned long long u_int64;
+typedef unsigned int u_int32;
+typedef unsigned short u_int16;
+typedef unsigned char u_int8;
+
/* Define flow attributes */

enum RecordAttrType {

No comments:

Post a Comment