]> The Tcpdump Group git mirrors - libpcap/commit
Support setting non-blocking mode before activating.
authorGuy Harris <[email protected]>
Sun, 26 Feb 2017 01:10:42 +0000 (17:10 -0800)
committerGuy Harris <[email protected]>
Sun, 26 Feb 2017 01:10:42 +0000 (17:10 -0800)
commita6a4e428ddcfd7010d9ed04346190a6ef70a2aed
treedf72110b06a520c58e66da45e5fe999910eb10d4
parent1bd5003a2966cd520e661b881e95b6317d56d5a2
Support setting non-blocking mode before activating.

We just set a flag and attempt to set non-blocking mode after
activating.

If a module can't support non-blocking mode, it should set the set
non-blocking operator in the create routine, so a pre-activation call
will fail the same way a post-activation call fails.

While we're at it:

Have the get non-blocking and set non-blocking modes not take an error
buffer as an argument; they have the error buffer in the pcap_t to set.
pcap_getnonblock() and pcap_setnonblock() just copy the error from there
to the argument passed in.

Make sure we set the cleanup op pointer when appropriate.
12 files changed:
pcap-bpf.c
pcap-dag.c
pcap-dbus.c
pcap-dos.c
pcap-int.h
pcap-linux.c
pcap-septel.c
pcap-snf.c
pcap-tc.c
pcap-win32.c
pcap.c
savefile.c