Ensure netprot_send_capture() sends all the data, and return an error on disconnect.
Big cleanup of main, move a lot of network code into functions in netprot.h

Also add "bcast" prefix to functions in bcast.c for consistency.
Move all hardware code into "drivers" folder.