]> The Tcpdump Group git mirrors - libpcap/commit
Put some ioctls into helper routines and make them handle long names.
authorGuy Harris <[email protected]>
Tue, 12 May 2020 08:54:00 +0000 (01:54 -0700)
committerGuy Harris <[email protected]>
Tue, 12 May 2020 08:54:00 +0000 (01:54 -0700)
commit8c263fda3f8f274359ea47ecf667094443c704c9
tree8c78a42df7cfb4aaf9e12b8cadae7ce165c62257
parent1e50a91d583d0ae9780974e05b536b167e37de8e
Put some ioctls into helper routines and make them handle long names.

Put the code that binds an interface to a BPF device, and that attempts
to find out whether an interface exists by fetch its flags, into common
routines.  Have the code that attempts to find out whether an interface
exists check for ioctl errors expected if the device doesn't exist, and
treat them differently from unexpected errors.

If LIFNAMSIZ is defined - meaning "newer version of Solaris with new
ioctls to handle longer interface names" - have both of those routines
use the newer ioctls.

Don't use the ioctl names in the error messages, as the ioctl names may
differ between platforms.
pcap-bpf.c