Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2020-09-28 19:54:39 +0300
committerSebastian Huber <sebastian.huber@embedded-brains.de>2022-07-11 12:52:46 +0300
commit9dd91a8330a968aaf970d32dd3a72f1e5dd72b43 (patch)
treebff77ff8764789e3da75a90e9ea34ebf8103cbd2 /newlib/libc/sys/rtems
parent7b30b9f648a25f3b615730864ddc86a433a93333 (diff)
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
Diffstat (limited to 'newlib/libc/sys/rtems')
-rw-r--r--newlib/libc/sys/rtems/include/sys/sockio.h1
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 447e2c884..03502d770 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 */