Lines Matching refs:request

94     struct ifreq request = createRequest();  in setMtu()  local
96 strncpy(request.ifr_name, mInterfaceName.c_str(), sizeof(request.ifr_name)); in setMtu()
97 request.ifr_mtu = mtu; in setMtu()
98 int status = ::ioctl(mSocketFd, SIOCSIFMTU, &request); in setMtu()
114 } request; in setAddress() local
116 memset(&request, 0, sizeof(request)); in setAddress()
118 request.hdr.nlmsg_len = NLMSG_LENGTH(sizeof(request.msg)); in setAddress()
119 request.hdr.nlmsg_type = RTM_NEWADDR; in setAddress()
120 request.hdr.nlmsg_flags = NLM_F_REQUEST | in setAddress()
125 request.msg.ifa_family = AF_INET; in setAddress()
127 request.msg.ifa_prefixlen = __builtin_popcount(subnetMask); in setAddress()
128 request.msg.ifa_index = mIndex; in setAddress()
130 addRouterAttribute(request, IFA_ADDRESS, &address, sizeof(address)); in setAddress()
131 addRouterAttribute(request, IFA_LOCAL, &address, sizeof(address)); in setAddress()
133 addRouterAttribute(request, IFA_BROADCAST, &broadcast, sizeof(broadcast)); in setAddress()
139 int status = ::sendto(mSocketFd, &request, request.hdr.nlmsg_len, 0, in setAddress()
172 struct ifreq request; in createRequest() local
173 memset(&request, 0, sizeof(request)); in createRequest()
174 strncpy(request.ifr_name, mInterfaceName.c_str(), sizeof(request.ifr_name)); in createRequest()
175 request.ifr_name[sizeof(request.ifr_name) - 1] = '\0'; in createRequest()
177 return request; in createRequest()
181 struct ifreq request = createRequest(); in populateIndex() local
183 int status = ::ioctl(mSocketFd, SIOCGIFINDEX, &request); in populateIndex()
188 mIndex = request.ifr_ifindex; in populateIndex()
193 struct ifreq request = createRequest(); in populateMacAddress() local
195 int status = ::ioctl(mSocketFd, SIOCGIFHWADDR, &request); in populateMacAddress()
200 memcpy(mMacAddress, &request.ifr_hwaddr.sa_data, ETH_ALEN); in populateMacAddress()
205 struct ifreq request = createRequest(); in setInterfaceUp() local
207 int status = ::ioctl(mSocketFd, SIOCGIFFLAGS, &request); in setInterfaceUp()
213 bool isUp = (request.ifr_flags & IFF_UP) != 0; in setInterfaceUp()
216 request.ifr_flags ^= IFF_UP; in setInterfaceUp()
222 status = ::ioctl(mSocketFd, SIOCSIFFLAGS, &request); in setInterfaceUp()