diff options
author | Ed Maste <emaste@FreeBSD.org> | 2020-09-28 16:54:39 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2020-09-28 16:54:39 +0000 |
commit | c1aedfcbd9896401f637bc815ba4e51dca107f6f (patch) | |
tree | 89180bf4e34a12c87daa0f08f2821aac6c21bef1 /share | |
parent | ab3f5b6ef2ea7545ccc75786e3bde38a03f0232d (diff) | |
download | src-c1aedfcbd9896401f637bc815ba4e51dca107f6f.tar.gz src-c1aedfcbd9896401f637bc815ba4e51dca107f6f.zip |
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
Notes
Notes:
svn path=/head/; revision=366230
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/ifnet.9 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/share/man/man9/ifnet.9 b/share/man/man9/ifnet.9 index f387ab5a3960..126fcb9bc671 100644 --- a/share/man/man9/ifnet.9 +++ b/share/man/man9/ifnet.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 14, 2018 +.Dd September 28, 2020 .Dt IFNET 9 .Os .Sh NAME @@ -1310,12 +1310,13 @@ list. Caller must have appropriate privilege. (No call-down to driver.) .It Dv SIOCGIFCAP +.It Dv SIOCGIFDATA .It Dv SIOCGIFFIB .It Dv SIOCGIFFLAGS .It Dv SIOCGIFMETRIC .It Dv SIOCGIFMTU .It Dv SIOCGIFPHYS -Get interface capabilities, FIB, flags, metric, MTU, medium selection. +Get interface capabilities, data, FIB, flags, metric, MTU, medium selection. (No call-down to driver.) .Pp .It Dv SIOCSIFCAP |