Lines Matching refs:rta
137 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()
193 struct in6_addr *addr6 = (struct in6_addr *) RTA_DATA(rta); in parseIfAddrMessage()
194 if (RTA_PAYLOAD(rta) < sizeof(*addr6)) { in parseIfAddrMessage()
196 RTA_PAYLOAD(rta), msgtype); in parseIfAddrMessage()
210 } else if (rta->rta_type == IFA_CACHEINFO) { in parseIfAddrMessage()
215 if (RTA_PAYLOAD(rta) < sizeof(*cacheinfo)) { in parseIfAddrMessage()
217 RTA_PAYLOAD(rta), sizeof(cacheinfo), msgtype); in parseIfAddrMessage()
221 cacheinfo = (struct ifa_cacheinfo *) RTA_DATA(rta); in parseIfAddrMessage()
340 struct rtattr *rta; in parseRtMessage() local
341 for (rta = RTM_RTA(rtm); RTA_OK(rta, len); rta = RTA_NEXT(rta, len)) { in parseRtMessage()
342 switch (rta->rta_type) { in parseRtMessage()
346 if (!inet_ntop(family, RTA_DATA(rta), dst, sizeof(dst))) in parseRtMessage()
352 if (!inet_ntop(family, RTA_DATA(rta), gw, sizeof(gw))) in parseRtMessage()
358 if (!if_indextoname(* (int *) RTA_DATA(rta), dev)) in parseRtMessage()