Lines Matching defs:lifreq
46 #define LIFREQ lifreq
435 struct lifreq lifreq;
526 memset(&lifreq, 0, sizeof(lifreq));
527 memmove(lifreq.lifr_name, iter->current.name, sizeof(lifreq.lifr_name));
528 memmove(&lifreq.lifr_addr, &iter->current.address.type.in6,
531 if (ioctl(iter->socket, SIOCGLIFADDR, &lifreq) < 0) {
538 prefixlen = lifreq.lifr_addrlen;
627 struct LIFREQ lifreq;
639 memset(&lifreq, 0, sizeof(lifreq));
640 memmove(&lifreq, ifrp, sizeof(lifreq));
642 family = lifreq.lifr_addr.ss_family;
653 INSIST(sizeof(lifreq.lifr_name) <= sizeof(iter->current.name));
655 memmove(iter->current.name, lifreq.lifr_name, sizeof(lifreq.lifr_name));
658 (struct sockaddr *)&lifreq.lifr_addr, lifreq.lifr_name);
691 if (ioctl(fd, SIOCGLIFFLAGS, (char *) &lifreq) < 0) {
695 lifreq.lifr_name, strbuf);
699 if ((lifreq.lifr_flags & IFF_UP) != 0)
703 if ((lifreq.lifr_flags & IFF_POINTOPOINT) != 0)
707 if ((lifreq.lifr_flags & IFF_LOOPBACK) != 0)
720 if (ioctl(fd, SIOCGLIFDSTADDR, (char *)&lifreq)
729 lifreq.lifr_name, strbuf);
733 (struct sockaddr *)&lifreq.lifr_dstaddr,
734 lifreq.lifr_name);
741 memset(&lifreq, 0, sizeof(lifreq));
742 memmove(&lifreq, ifrp, sizeof(lifreq));
754 for (i = 0; i < lifreq.lifr_addrlen; i += 8) {
755 bits = lifreq.lifr_addrlen - i;
770 if (ioctl(fd, SIOCGLIFNETMASK, (char *)&lifreq) < 0) {
777 lifreq.lifr_name, strbuf);
781 (struct sockaddr *)&lifreq.lifr_addr, lifreq.lifr_name);