diff options
author | Ed Maste <emaste@FreeBSD.org> | 2020-09-28 16:54:39 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-07-11 11:52:46 +0200 |
commit | 9dd91a8330a968aaf970d32dd3a72f1e5dd72b43 (patch) | |
tree | bff77ff8764789e3da75a90e9ea34ebf8103cbd2 | |
parent | 7b30b9f648a25f3b615730864ddc86a433a93333 (diff) | |
download | newlib-9dd91a8330a968aaf970d32dd3a72f1e5dd72b43.zip newlib-9dd91a8330a968aaf970d32dd3a72f1e5dd72b43.tar.gz newlib-9dd91a8330a968aaf970d32dd3a72f1e5dd72b43.tar.bz2 |
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
-rw-r--r-- | newlib/libc/sys/rtems/include/sys/sockio.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/newlib/libc/sys/rtems/include/sys/sockio.h b/newlib/libc/sys/rtems/include/sys/sockio.h index 447e2c8..03502d7 100644 --- a/newlib/libc/sys/rtems/include/sys/sockio.h +++ b/newlib/libc/sys/rtems/include/sys/sockio.h @@ -83,6 +83,7 @@ #define SIOCSIFDESCR _IOW('i', 41, struct ifreq) /* set ifnet descr */ #define SIOCGIFDESCR _IOWR('i', 42, struct ifreq) /* get ifnet descr */ #define SIOCAIFADDR _IOW('i', 43, struct ifaliasreq)/* add/chg IF alias */ +#define SIOCGIFDATA _IOW('i', 44, struct ifreq) /* get if_data */ #define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */ #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */ |