HomeFreeBSD

add SIOCGIFDATA ioctl

Description

add SIOCGIFDATA ioctl

For interfaces that do not support SIOCGIFMEDIA (for which there are
quite a few) the only fallback is to query the interface for
if_data->ifi_link_state. While it's possible to get at if_data for an
interface via getifaddrs(3) or sysctl, both are heavy weight mechanisms.

SIOCGIFDATA is a simple ioctl to retrieve this fast with very little
resource use in comparison. This implementation mirrors that of other
similar ioctls in FreeBSD.

Submitted by: Roy Marples <roy@marples.name>
Reviewed by: markj
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D26538

(cherry picked from commit c1aedfcbd9896401f637bc815ba4e51dca107f6f)

Details

Provenance
emasteAuthored on Sep 28 2020, 4:54 PM
Reviewer
markj
Differential Revision
D26538: Add SIOCGIFDATA
Parents
rGafcad366c43a: Revert "Add workaround for a QoS-related bug in VMWare Workstation."
Branches
Unknown
Tags
Unknown