diff options
Diffstat (limited to 'include/ifreq.h')
-rw-r--r-- | include/ifreq.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/ifreq.h b/include/ifreq.h new file mode 100644 index 0000000000..94e984c73c --- /dev/null +++ b/include/ifreq.h @@ -0,0 +1,14 @@ +#include_next <ifreq.h> + +static inline struct ifreq * +__if_nextreq (struct ifreq *ifr) +{ +#ifdef _HAVE_SA_LEN + if (ifr->ifr_addr.sa_len > sizeof ifr->ifr_addr) + return (struct ifreq *) ((char *) &ifr->ifr_addr + ifr->ifr_addr.sa_len); +#endif + return ifr + 1; +} + +extern void __ifreq (struct ifreq **ifreqs, int *num_ifs, int sockfd) + attribute_hidden; |