]> The Tcpdump Group git mirrors - libpcap/commit
If iface_bind() fails, that's a hard error.
authorGuy Harris <[email protected]>
Sun, 2 Dec 2018 02:32:02 +0000 (18:32 -0800)
committerGuy Harris <[email protected]>
Sun, 2 Dec 2018 02:32:02 +0000 (18:32 -0800)
commitc3b7d60fc75835dd58f8410a458782aba8e7a360
treefffe1747297e6a5199220fbef63d2c0fc8a8615c
parent181dc0a480e77f772d3bf319867f1e86c09af130
If iface_bind() fails, that's a hard error.

If you can open a PF_PACKET socket, you don't need to fall back on
PF_INET/SOCK_PACKET sockets, and we've already opened that socket by the
time we call iface_bind().

Have iface_bind() return 0 on success and a PCAP_ERROR_ value on
failure.  If the bind() call fails with ENODEV, return
PCAP_ERROR_NO_SUCH_DEVICE, otherwise return PCAP_ERROR.

If getsockopt(SO_ERROR) fails, that's an error; if it succeeds, and
supplies a pending error code, that's an error, too.
pcap-linux.c