Lines Matching refs:lifr
295 struct lifreq lifr; in get_first_ethernet() local
350 memset(&lifr, 0, sizeof(lifr)); in get_first_ethernet()
351 strncpy(lifr.lifr_name, plifreq->lifr_name, sizeof(lifr.lifr_name)); in get_first_ethernet()
352 if (ioctl(fd, SIOCGLIFFLAGS, &lifr) < 0) { in get_first_ethernet()
358 fl = lifr.lifr_flags; in get_first_ethernet()
371 strncpy(first_ether_name, lifr.lifr_name, sizeof(first_ether_name)); in get_first_ethernet()
503 struct lifreq lifr; local
506 memset(&lifr, 0, sizeof(lifr));
507 ret = ioctl(fd, SIOCGLIFFLAGS, &lifr);
511 lifr.lifr_flags |= IFF_IPV6;
512 lifr.lifr_flags &= ~(IFF_BROADCAST | IFF_IPV4);
513 lifr.lifr_ppa = ppa;
514 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
516 ret = ioctl(fd, SIOCSLIFNAME, &lifr);
579 struct lifreq lifr; in sys_init() local
742 memset(&lifr, 0, sizeof(lifr)); in sys_init()
743 sprintf(lifr.lifr_name, "%s", ifname); in sys_init()
744 lifr.lifr_ip_muxid = ip6muxid; in sys_init()
749 if (ioctl(ip6fd, SIOCSLIFMUXID, &lifr) < 0) { in sys_init()
778 struct lifreq lifr; in sys_cleanup() local
820 memset(&lifr, 0, sizeof(lifr)); in sys_cleanup()
821 sprintf(lifr.lifr_name, "%s", ifname); in sys_cleanup()
822 if (ioctl(ip6fd, SIOCGLIFFLAGS, &lifr) < 0) { in sys_cleanup()
827 if (ioctl(ip6fd, SIOCGLIFMUXID, &lifr) < 0) { in sys_cleanup()
832 ip6muxid = lifr.lifr_ip_muxid; in sys_cleanup()
1510 struct lifreq lifr; local
1526 memset(&lifr, 0, sizeof(lifr));
1527 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1528 lifr.lifr_mtu = link_mtu;
1529 if (ioctl(fd, SIOCSLIFMTU, &lifr) < 0) {
1838 struct lifreq lifr; local
1846 memset(&lifr, 0, sizeof(lifr));
1847 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1848 if (ioctl(fd, SIOCGLIFFLAGS, &lifr) < 0) {
1853 lifr.lifr_flags |= IFF_UP;
1854 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1855 if (ioctl(fd, SIOCSLIFFLAGS, &lifr) < 0) {
1872 struct lifreq lifr; local
1879 memset(&lifr, 0, sizeof(lifr));
1880 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1881 if (ioctl(fd, SIOCGLIFFLAGS, &lifr) < 0) {
1886 lifr.lifr_flags &= ~IFF_UP;
1887 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1888 if (ioctl(fd, SIOCGLIFFLAGS, &lifr) < 0) {
1906 struct lifreq lifr; local
1915 memset(&lifr, 0, sizeof(lifr));
1916 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1923 IN6_LLTOKEN_FROM_EUI64(lifr, sin6, o);
1924 if (ioctl(fd, SIOCSLIFTOKEN, &lifr) < 0) {
1932 IN6_LLADDR_FROM_EUI64(lifr, sin6, o);
1933 if (ioctl(fd, SIOCSLIFADDR, &lifr) < 0) {
1938 memset(&lifr, 0, sizeof(lifr));
1939 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1940 IN6_LLADDR_FROM_EUI64(lifr, sin6, h);
1941 if (ioctl(fd, SIOCSLIFDSTADDR, &lifr) < 0) {