added -lpthread so we can get to errno in gdb
snaplen fixes - not 100% as getopt does not support neg values
crib snaplen parsing from tcpdump