Your error was that you did not save the
return value from pcap_open_live. It's not
related to the ! operator. You can keep on
using ! if you want.
Change your original errornous
> if (!(pcap_open_live(iface, snaplen, 0, -1,
errbuf)))
to
if (! (pfd = pcap_open_live(iface, snaplen, 0, -1,
errbuf))
it may seem odd that I used !(function), I come to C as a perl coder and to me
this is the logical way to do it, if (!(open_door)) { die "door locked?" }
would seem to me (in a linguistical aspect) correct, basicly "if not open door,
tell is locked and exit", whereas != NULL is just plain techni