+ ifr = (struct ifreq *)ptr;
+#ifdef HAVE_SOCKADDR_LEN
+ if (ifr->ifr_addr.sa_len > sizeof(struct sockaddr)) {
+ ptr += sizeof(ifr->ifr_name) + ifr->ifr_addr.sa_len;
+ } else {
+ ptr += sizeof(ifr->ifr_name) + sizeof(struct sockaddr);
+ }
+#else
+ ptr += sizeof(struct ifreq);
+#endif
+
+ if (ifr->ifr_addr.sa_family != AF_INET) {