Lines Matching defs:rta
137 struct rtattr *rta;
138 for (rta = IFLA_RTA(ifi); RTA_OK(rta, len); rta = RTA_NEXT(rta, len)) {
139 switch(rta->rta_type) {
141 asprintf(&mParams[0], "INTERFACE=%s", (char *) RTA_DATA(rta));
174 struct rtattr *rta;
176 for (rta = IFA_RTA(ifaddr); RTA_OK(rta, len); rta = RTA_NEXT(rta, len)) {
177 if (rta->rta_type == IFA_ADDRESS) {
185 struct in_addr *addr4 = (struct in_addr *) RTA_DATA(rta);
186 if (RTA_PAYLOAD(rta) < sizeof(*addr4)) {
188 RTA_PAYLOAD(rta), msgtype);
193 struct in6_addr *addr6 = (struct in6_addr *) RTA_DATA(rta);
194 if (RTA_PAYLOAD(rta) < sizeof(*addr6)) {
196 RTA_PAYLOAD(rta), msgtype);
210 } else if (rta->rta_type == IFA_CACHEINFO) {
215 if (RTA_PAYLOAD(rta) < sizeof(*cacheinfo)) {
217 RTA_PAYLOAD(rta), sizeof(cacheinfo), msgtype);
221 cacheinfo = (struct ifa_cacheinfo *) RTA_DATA(rta);
340 struct rtattr *rta;
341 for (rta = RTM_RTA(rtm); RTA_OK(rta, len); rta = RTA_NEXT(rta, len)) {
342 switch (rta->rta_type) {
346 if (!inet_ntop(family, RTA_DATA(rta), dst, sizeof(dst)))
352 if (!inet_ntop(family, RTA_DATA(rta), gw, sizeof(gw)))
358 if (!if_indextoname(* (int *) RTA_DATA(rta), dev))