pcap/sock fixes for preparation for BSD