for the log part i hacked mysel a perl script that i tail the syslog to:

#!/usr/bin/perl
$~ = LINE;
while (<>) {
  $line = $_;
  if ($line =~ /fp=/) {
    @fields = split(" ", $line);
    $t = $fields[2];
    foreach $f (@fields) {
        if ($f =~ /SRC=(.*)/) {$s = $1;}
        if ($f =~ /DST=(.*)/) {$d = $1;}
        if ($f =~ /SPT=(.*)/) {$sp = $1;}
        if ($f =~ /DPT=(.*)/) {$dp = $1;}
        if ($f =~ /PROTO=(.*)/) {$p = $1;}
    }
    write;
  }
}
format LINE =
@<<<<<<< @<<<<<<<<<<<<<<<<:@<<<< -> @<<<<<<<<<<<<<<<<:@<<<< @<<<
$t,$s,$sp,$d,$dp,$p

Reply via email to