Home
last modified time | relevance | path

Searched refs:rta (Results 1 – 3 of 3) sorted by relevance

/system/core/libsysutils/src/
DNetlinkEvent.cpp137 struct rtattr *rta; in parseIfInfoMessage() local
138 for (rta = IFLA_RTA(ifi); RTA_OK(rta, len); rta = RTA_NEXT(rta, len)) { in parseIfInfoMessage()
139 switch(rta->rta_type) { in parseIfInfoMessage()
141 asprintf(&mParams[0], "INTERFACE=%s", (char *) RTA_DATA(rta)); in parseIfInfoMessage()
174 struct rtattr *rta; in parseIfAddrMessage() local
176 for (rta = IFA_RTA(ifaddr); RTA_OK(rta, len); rta = RTA_NEXT(rta, len)) { in parseIfAddrMessage()
177 if (rta->rta_type == IFA_ADDRESS) { in parseIfAddrMessage()
185 struct in_addr *addr4 = (struct in_addr *) RTA_DATA(rta); in parseIfAddrMessage()
186 if (RTA_PAYLOAD(rta) < sizeof(*addr4)) { in parseIfAddrMessage()
188 RTA_PAYLOAD(rta), msgtype); in parseIfAddrMessage()
[all …]
/system/netd/server/
DNetlinkCommands.cpp206 rtattr *rta = reinterpret_cast<rtattr *> RTM_RTA(msg); in getRtmU32Attribute() local
207 for (; RTA_OK(rta, rta_len); rta = RTA_NEXT(rta, rta_len)) { in getRtmU32Attribute()
208 if (rta->rta_type == attribute) { in getRtmU32Attribute()
209 return *(static_cast<uint32_t *>(RTA_DATA(rta))); in getRtmU32Attribute()
/system/core/libnetutils/
Difc_utils.c273 struct rtattr *rta; in ifc_act_on_address() local
320 rta = (struct rtattr *) (((char *) &req) + NLMSG_ALIGN(req.n.nlmsg_len)); in ifc_act_on_address()
321 rta->rta_type = IFA_LOCAL; in ifc_act_on_address()
322 rta->rta_len = RTA_LENGTH(addrlen); in ifc_act_on_address()
324 memcpy(RTA_DATA(rta), addr, addrlen); in ifc_act_on_address()
328 rta = (struct rtattr *) (((char *) &req) + NLMSG_ALIGN(req.n.nlmsg_len)); in ifc_act_on_address()
329 rta->rta_type = IFA_BROADCAST; in ifc_act_on_address()
330 rta->rta_len = RTA_LENGTH(addrlen); in ifc_act_on_address()
333 memcpy(RTA_DATA(rta), addr, addrlen); in ifc_act_on_address()