#!/bin/sh
# rustic tcpdump
# Suggested by Jochen Cichon <jc@versainter.net>
# M. Andreoli for muLinux

. /etc/color
. /etc/utils

cleanup()
{
echo "cleanup"
kill -9 $(pidof sniffit)
}

# Main


INTERFACE=eth0
case Z$1 in
-h)	echo "tcpdump [-i interface"; exit ;;
-i)	shift; INTERFACE=$1;;
*)
esac

echo -e "${BRIGHT}press -ENTER- to stop${NORMAL}"

IP=$(get_ip $INTERFACE)
sniffit -a -F $INTERFACE -s $IP &
sniffit -a -F $INTERFACE -t $IP &

read enter
cleanup
# End


