Searched refs:rta (Results 1 – 3 of 3) sorted by relevance
/bionic/libc/bionic/ |
D | ifaddrs.cpp | 174 rtattr* rta = IFLA_RTA(ifi); in __getifaddrs_callback() local 176 while (RTA_OK(rta, rta_len)) { in __getifaddrs_callback() 177 if (rta->rta_type == IFLA_ADDRESS) { in __getifaddrs_callback() 178 if (RTA_PAYLOAD(rta) < sizeof(new_addr->addr)) { in __getifaddrs_callback() 179 new_addr->SetAddress(AF_PACKET, RTA_DATA(rta), RTA_PAYLOAD(rta)); in __getifaddrs_callback() 180 new_addr->SetPacketAttributes(ifi->ifi_index, ifi->ifi_type, RTA_PAYLOAD(rta)); in __getifaddrs_callback() 182 } else if (rta->rta_type == IFLA_BROADCAST) { in __getifaddrs_callback() 183 if (RTA_PAYLOAD(rta) < sizeof(new_addr->ifa_ifu)) { in __getifaddrs_callback() 184 new_addr->SetBroadcastAddress(AF_PACKET, RTA_DATA(rta), RTA_PAYLOAD(rta)); in __getifaddrs_callback() 185 new_addr->SetPacketAttributes(ifi->ifi_index, ifi->ifi_type, RTA_PAYLOAD(rta)); in __getifaddrs_callback() [all …]
|
D | net_if.cpp | 96 rtattr* rta = IFLA_RTA(ifi); in __if_nameindex_callback() local 98 while (RTA_OK(rta, rta_len)) { in __if_nameindex_callback() 99 if (rta->rta_type == IFLA_IFNAME) { in __if_nameindex_callback() 100 new_link->data.if_name = strndup(reinterpret_cast<char*>(RTA_DATA(rta)), RTA_PAYLOAD(rta)); in __if_nameindex_callback() 102 rta = RTA_NEXT(rta, rta_len); in __if_nameindex_callback()
|
/bionic/libc/kernel/uapi/linux/ |
D | rtnetlink.h | 174 #define RTA_OK(rta,len) ((len) >= (int) sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rt… argument 175 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr *) (((char *)… argument 178 #define RTA_DATA(rta) ((void *) (((char *) (rta)) + RTA_LENGTH(0))) argument 179 #define RTA_PAYLOAD(rta) ((int) ((rta)->rta_len) - RTA_LENGTH(0)) argument
|