Searched refs:ifre (Results 1 – 3 of 3) sorted by relevance
/external/toybox/toys/net/ |
D | ifconfig.c | 98 struct ifreq ifre; in display_ifconfig() local 112 xstrncpy(ifre.ifr_name, name, IFNAMSIZ); in display_ifconfig() 113 if (ioctl(TT.sockfd, SIOCGIFFLAGS, &ifre)<0) perror_exit_raw(name); in display_ifconfig() 114 flags = ifre.ifr_flags; in display_ifconfig() 118 i = ioctl(TT.sockfd, SIOCGIFHWADDR, &ifre); in display_ifconfig() 121 if (ifre.ifr_hwaddr.sa_family == types[i].type) break; in display_ifconfig() 124 if(i >= 0 && ifre.ifr_hwaddr.sa_family == ARPHRD_ETHER) { in display_ifconfig() 126 for (i=0; i<6; i++) xprintf(":%02x"+!i, ifre.ifr_hwaddr.sa_data[i]); in display_ifconfig() 135 ifre.ifr_addr.sa_family = AF_INET; in display_ifconfig() 136 memset(&ifre.ifr_addr, 0, sizeof(ifre.ifr_addr)); in display_ifconfig() [all …]
|
/external/toybox/toys/pending/ |
D | arp.c | 166 struct ifreq ifre; in set_entry() local 168 xstrncpy(ifre.ifr_name, toys.optargs[1], IFNAMSIZ); in set_entry() 169 xioctl(TT.sockfd, SIOCGIFHWADDR, &ifre); in set_entry() 170 if ((toys.optflags & FLAG_H) && (ifre.ifr_hwaddr.sa_family != ARPHRD_ETHER)) in set_entry() 172 memcpy(&req.arp_ha, &(ifre.ifr_hwaddr), sizeof(req.arp_ha)); in set_entry()
|
D | route.c | 375 struct ifreq *ifre = (struct ifreq*)ifre_buf; in setroute_inet6() local 376 xstrncpy(ifre->ifr_name, dev_name, IFNAMSIZ); in setroute_inet6() 377 xioctl(sockfd, SIOGIFINDEX, ifre); in setroute_inet6() 378 rt.rtmsg_ifindex = ifre->ifr_ifindex; in setroute_inet6()
|