Searched refs:ifre (Results 1 – 2 of 2) sorted by relevance
/external/toybox/toys/net/ |
D | ifconfig.c | 103 struct ifreq ifre; in display_ifconfig() local 104 struct sockaddr_in *si = (void *)&ifre.ifr_addr; in display_ifconfig() 118 xstrncpy(ifre.ifr_name, name, IFNAMSIZ); in display_ifconfig() 119 if (ioctl(TT.sockfd, SIOCGIFFLAGS, &ifre)<0) perror_exit_raw(name); in display_ifconfig() 120 flags = ifre.ifr_flags; in display_ifconfig() 127 ioctl(TT.sockfd, SIOCGIFADDR, &ifre); in display_ifconfig() 129 if (!ioctl(TT.sockfd, SIOCGIFNETMASK, &ifre)) in display_ifconfig() 138 ioctl(TT.sockfd, SIOCGIFHWADDR, &ifre); in display_ifconfig() 141 for (i=0; i<6; i++) printf(":%02x"+!i, ifre.ifr_hwaddr.sa_data[i]); in display_ifconfig() 144 if (ifre.ifr_hwaddr.sa_family == types[i].type) break; in display_ifconfig() [all …]
|
/external/toybox/toys/pending/ |
D | arp.c | 161 struct ifreq ifre; in set_entry() local 163 xstrncpy(ifre.ifr_name, toys.optargs[1], IFNAMSIZ); in set_entry() 164 xioctl(TT.sockfd, SIOCGIFHWADDR, &ifre); in set_entry() 165 if ((toys.optflags & FLAG_H) && (ifre.ifr_hwaddr.sa_family != ARPHRD_ETHER)) in set_entry() 167 memcpy(&req.arp_ha, &(ifre.ifr_hwaddr), sizeof(req.arp_ha)); in set_entry()
|