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

Details

Provenance
emasteAuthored on Sep 28 2020, 4:54 PM
Parents
rGab3f5b6ef2ea: For mulitcons boot, report it and which console is primary
Branches
Unknown
Tags
Unknown