• Home
  • Raw
  • Download

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()
1507 struct lifreq lifr; local
1523 memset(&lifr, 0, sizeof(lifr));
1524 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1525 lifr.lifr_mtu = link_mtu;
1526 if (ioctl(fd, SIOCSLIFMTU, &lifr) < 0) {
1835 struct lifreq lifr; local
1843 memset(&lifr, 0, sizeof(lifr));
1844 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1845 if (ioctl(fd, SIOCGLIFFLAGS, &lifr) < 0) {
1850 lifr.lifr_flags |= IFF_UP;
1851 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1852 if (ioctl(fd, SIOCSLIFFLAGS, &lifr) < 0) {
1869 struct lifreq lifr; local
1876 memset(&lifr, 0, sizeof(lifr));
1877 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1878 if (ioctl(fd, SIOCGLIFFLAGS, &lifr) < 0) {
1883 lifr.lifr_flags &= ~IFF_UP;
1884 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1885 if (ioctl(fd, SIOCGLIFFLAGS, &lifr) < 0) {
1903 struct lifreq lifr; local
1912 memset(&lifr, 0, sizeof(lifr));
1913 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1920 IN6_LLTOKEN_FROM_EUI64(lifr, sin6, o);
1921 if (ioctl(fd, SIOCSLIFTOKEN, &lifr) < 0) {
1929 IN6_LLADDR_FROM_EUI64(lifr, sin6, o);
1930 if (ioctl(fd, SIOCSLIFADDR, &lifr) < 0) {
1935 memset(&lifr, 0, sizeof(lifr));
1936 strlcpy(lifr.lifr_name, ifname, sizeof(lifr.lifr_name));
1937 IN6_LLADDR_FROM_EUI64(lifr, sin6, h);
1938 if (ioctl(fd, SIOCSLIFDSTADDR, &lifr) < 0) {