Subject: | Consider SIOCGIFINDEX et.al. ioctl constants |
Given there's already a few sockopt structures (e.g. ipv6_mreq) that want an ifindex, it seems prudent to provide the SIOC* constants necessary for ifname <-> ifindex conversions at least.
While SIOCGIFINDEX and SIOCGIFNAME should be quite safe, taking or returning either platform integers or null-terminated strings, there's potential for a large and sprawling slippery slop here. Adding other options may require an ever-growing set of struct pack/unpack function pairs.
Some care is required when selecting which other ioctls to add...
--
Paul Evans