Searched refs:rta (Results 1 – 4 of 4) sorted by relevance
/system/core/libsysutils/src/ |
D | NetlinkEvent.cpp | 287 struct rtattr *rta; in parseIfInfoMessage() local 288 for (rta = IFLA_RTA(ifi); RTA_OK(rta, len); rta = RTA_NEXT(rta, len)) { in parseIfInfoMessage() 289 switch(rta->rta_type) { in parseIfInfoMessage() 291 asprintf(&mParams[0], "INTERFACE=%s", (char *) RTA_DATA(rta)); in parseIfInfoMessage() 333 struct rtattr *rta; in parseIfAddrMessage() local 335 for (rta = IFA_RTA(ifaddr); RTA_OK(rta, len); rta = RTA_NEXT(rta, len)) { in parseIfAddrMessage() 336 if (rta->rta_type == IFA_ADDRESS) { in parseIfAddrMessage() 344 struct in_addr *addr4 = (struct in_addr *) RTA_DATA(rta); in parseIfAddrMessage() 345 if (RTA_PAYLOAD(rta) < sizeof(*addr4)) { in parseIfAddrMessage() 347 RTA_PAYLOAD(rta), msgtype); in parseIfAddrMessage() [all …]
|
/system/netd/tests/ |
D | tun_interface.cpp | 178 for (rtattr* rta = IFA_RTA(ifaddr); RTA_OK(rta, ifalen); rta = RTA_NEXT(rta, ifalen)) { in addAddress() local 179 if (rta->rta_type != IFA_LOCAL && rta->rta_type != IFA_ADDRESS) continue; in addAddress() 180 if (RTA_PAYLOAD(rta) != addrlen) continue; in addAddress() 181 if (!memcmp(RTA_DATA(rta), &ip, addrlen)) { in addAddress()
|
/system/netd/server/ |
D | NetlinkCommands.cpp | 217 rtattr *rta = reinterpret_cast<rtattr *> RTM_RTA(msg); in getRtmU32Attribute() local 218 for (; RTA_OK(rta, rta_len); rta = RTA_NEXT(rta, rta_len)) { in getRtmU32Attribute() 219 if (rta->rta_type == attribute) { in getRtmU32Attribute() 220 return *(static_cast<uint32_t *>(RTA_DATA(rta))); in getRtmU32Attribute()
|
/system/core/libnetutils/ |
D | ifc_utils.c | 274 struct rtattr *rta; in ifc_act_on_address() local 319 rta = (struct rtattr *) (((char *) &req) + NLMSG_ALIGN(req.n.nlmsg_len)); in ifc_act_on_address() 320 rta->rta_type = IFA_LOCAL; in ifc_act_on_address() 321 rta->rta_len = RTA_LENGTH(addrlen); in ifc_act_on_address() 323 memcpy(RTA_DATA(rta), addr, addrlen); in ifc_act_on_address() 327 rta = (struct rtattr *) (((char *) &req) + NLMSG_ALIGN(req.n.nlmsg_len)); in ifc_act_on_address() 328 rta->rta_type = IFA_BROADCAST; in ifc_act_on_address() 329 rta->rta_len = RTA_LENGTH(addrlen); in ifc_act_on_address() 332 memcpy(RTA_DATA(rta), addr, addrlen); in ifc_act_on_address()
|