Searched defs:ifr (Results 1 - 4 of 4) sorted by relevance

/system/core/toolbox/
H A Difconfig.c22 static void setflags(int s, struct ifreq *ifr, int set, int clr) argument
24 if(ioctl(s, SIOCGIFFLAGS, ifr) < 0) die("SIOCGIFFLAGS");
25 ifr->ifr_flags = (ifr->ifr_flags & (~clr)) | set;
26 if(ioctl(s, SIOCSIFFLAGS, ifr) < 0) die("SIOCSIFFLAGS");
36 static void setmtu(int s, struct ifreq *ifr, const char *mtu) argument
39 ifr->ifr_mtu = m;
40 if(ioctl(s, SIOCSIFMTU, ifr) < 0) die("SIOCSIFMTU");
42 static void setdstaddr(int s, struct ifreq *ifr, const char *addr) argument
44 init_sockaddr_in((struct sockaddr_in *) &ifr
48 setnetmask(int s, struct ifreq *ifr, const char *addr) argument
54 setaddr(int s, struct ifreq *ifr, const char *addr) argument
62 struct ifreq ifr; local
[all...]
H A Diftop.c72 struct ifreq ifr; local
81 memset(&ifr, 0, sizeof(struct ifreq));
82 ifr.ifr_addr.sa_family = AF_INET;
83 strcpy(ifr.ifr_name, if_name);
85 ret = ioctl(s, SIOCGIFMTU, &ifr);
97 return ifr.ifr_mtu;
/system/core/init/
H A Dbuiltins.c168 struct ifreq ifr; local
171 strlcpy(ifr.ifr_name, interface, IFNAMSIZ);
177 ret = ioctl(s, SIOCGIFFLAGS, &ifr);
183 ifr.ifr_flags |= IFF_UP;
185 ifr.ifr_flags &= ~IFF_UP;
187 ret = ioctl(s, SIOCSIFFLAGS, &ifr);
/system/core/libnetutils/
H A Difc_utils.c165 static void ifc_init_ifr(const char *name, struct ifreq *ifr) argument
167 memset(ifr, 0, sizeof(struct ifreq));
168 strncpy(ifr->ifr_name, name, IFNAMSIZ);
169 ifr->ifr_name[IFNAMSIZ - 1] = 0;
175 struct ifreq ifr; local
176 ifc_init_ifr(name, &ifr);
178 r = ioctl(ifc_ctl_sock, SIOCGIFHWADDR, &ifr);
181 memcpy(ptr, &ifr.ifr_hwaddr.sa_data, ETH_ALEN);
188 struct ifreq ifr; local
189 ifc_init_ifr(name, &ifr);
200 struct ifreq ifr; local
232 struct ifreq ifr; local
425 struct ifreq ifr; local
435 struct ifreq ifr; local
448 struct ifreq ifr; local
461 struct ifreq ifr; local
478 struct ifreq ifr; local
603 struct ifreq ifr; local
[all...]

Completed in 57 milliseconds