Lines Matching refs:ifreq
135 * BSD 4.4 defines the size of an ifreq to be
136 * max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len
138 * just sizeof(struct ifreq).
144 #define ifreq_size(i) max(sizeof(struct ifreq), \
147 #define ifreq_size(i) sizeof(struct ifreq)
852 #define SLOP (sizeof (struct ifreq) + 128)
869 /* At least on NetBSD, an ifreq can hold an IPv4 address, but
872 est_ifreq_size = sizeof (struct ifreq) + 8;
898 /* Test that the buffer was big enough that another ifreq could've
902 bigger than the size of an ifreq. */
944 struct ifreq *ifr, ifreq, *ifr2;
973 for (i = 0; i + sizeof(struct ifreq) <= n; i+= ifreq_size(*ifr) ) {
974 ifr = (struct ifreq *)((caddr_t) buf+i);
979 strncpy(ifreq.ifr_name, ifr->ifr_name, sizeof (ifreq.ifr_name));
980 Tprintf (("interface %s\n", ifreq.ifr_name));
982 if (ioctl (s, SIOCGIFFLAGS, (char *)&ifreq) < 0) {
991 if (is_loopback_address(&ifreq.ifr_addr)) {
996 if ((ifreq.ifr_flags & IFF_UP) == 0) {
1003 ifr2 = (struct ifreq *)((caddr_t) buf+j);
1014 - offsetof (struct ifreq, ifr_addr.sa_data)))) {
1038 for (i = 0; i + sizeof(struct ifreq) <= n; i+= ifreq_size(*ifr) ) {
1039 ifr = (struct ifreq *)((caddr_t) buf+i);