Lines Matching defs:lifreq
520 #define LIFREQ lifreq
526 struct LIFREQ lifreq;
569 if (lifc.lifc_len + 2 * sizeof(lifreq) < bufsiz)
589 memmove(&lifreq, cp, sizeof(lifreq));
592 if (lifreq.lifr_addr.sa_len == 0)
593 lifreq.lifr_addr.sa_len = 16;
596 cpsize = sizeof(lifreq);
597 if (lifreq.lifr_addr.sa_len > sizeof(struct sockaddr))
598 cpsize += (int)lifreq.lifr_addr.sa_len -
601 cpsize = sizeof(lifreq.lifr_name) + lifreq.lifr_addr.sa_len;
604 cpsize = sizeof(lifreq);
606 cpsize = sizeof(lifreq.lifr_name);
608 if (ioctl(s, SIOCGLIFADDR, (char *)&lifreq) < 0)
611 switch (lifreq.lifr_addr.ss_family) {
616 &lifreq.lifr_addr)->sin_addr,
620 n = ioctl(s, SIOCGLIFFLAGS, (char *)&lifreq);
623 if ((lifreq.lifr_flags & IFF_UP) == 0)
632 &lifreq.lifr_addr)->sin6_addr,
637 n = ioctl(s, SIOCGLIFFLAGS, (char *)&lifreq);
640 if ((lifreq.lifr_flags & IFF_UP) == 0)