/external/wpa_supplicant_8/src/drivers/ |
priv_netlink.h | 64 #define RTA_OK(rta,len) \ 65 ((len) > 0 && (rta)->rta_len >= sizeof(struct rtattr) && \ 66 (rta)->rta_len <= (len)) 67 #define RTA_NEXT(rta,attrlen) \ 68 ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ 69 (struct rtattr *) (((char *)(rta)) + RTA_ALIGN((rta)->rta_len))) 71 #define RTA_DATA(rta) ((void *) (((char *) (rta)) + RTA_LENGTH(0)))
|
netlink.c | 148 struct rtattr *rta; local 167 rta = aliasing_hide_typecast( 170 rta->rta_type = IFLA_LINKMODE; 171 rta->rta_len = RTA_LENGTH(sizeof(char)); 172 *((char *) RTA_DATA(rta)) = linkmode; 177 rta = aliasing_hide_typecast( 180 rta->rta_type = IFLA_OPERSTATE; 181 rta->rta_len = RTA_LENGTH(sizeof(char)); 182 *((char *) RTA_DATA(rta)) = operstate;
|
/external/iproute2/include/ |
libnetlink.h | 60 extern int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data); 61 extern int rta_addattr_l(struct rtattr *rta, int maxlen, int type, const void *data, int alen); 63 extern int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len); 64 extern int parse_rtattr_byindex(struct rtattr *tb[], int max, struct rtattr *rta, int len); 65 extern int __parse_rtattr_nested_compat(struct rtattr *tb[], int max, struct rtattr *rta, int len); 67 #define parse_rtattr_nested(tb, max, rta) \ 68 (parse_rtattr((tb), (max), RTA_DATA(rta), RTA_PAYLOAD(rta))) 70 #define parse_rtattr_nested_compat(tb, max, rta, data, len) \ 71 ({ data = RTA_PAYLOAD(rta) >= len ? RTA_DATA(rta) : NULL; [all...] |
/external/iproute2/lib/ |
libnetlink.c | 531 struct rtattr *rta; local 536 rta = NLMSG_TAIL(n); 537 rta->rta_type = type; 538 rta->rta_len = len; 539 memcpy(RTA_DATA(rta), &data, 4); 548 struct rtattr *rta; local 554 rta = NLMSG_TAIL(n); 555 rta->rta_type = type; 556 rta->rta_len = len; 557 memcpy(RTA_DATA(rta), data, alen) [all...] |
/external/kernel-headers/original/linux/ |
rtnetlink.h | 146 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ 147 (rta)->rta_len >= sizeof(struct rtattr) && \ 148 (rta)->rta_len <= (len)) 149 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ 150 (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 153 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 154 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) 726 struct rtattr *rta; local [all...] |
/external/dhcpcd/ |
if-linux.c | 232 struct rtattr *rta; local 251 rta = (struct rtattr *) ((char *)rtm + NLMSG_ALIGN(sizeof(*rtm))); 259 while (RTA_OK(rta, len)) { 260 switch (rta->rta_type) { 262 memcpy(&rt.dest.s_addr, RTA_DATA(rta), 266 memcpy(&rt.gate.s_addr, RTA_DATA(rta), 270 idx = *(int *)RTA_DATA(rta); 275 metric = *(int *)RTA_DATA(rta); 278 rta = RTA_NEXT(rta, len) 293 struct rtattr *rta; local 343 struct rtattr *rta; local 442 struct rtattr *rta; local 462 struct rtattr *rta; local [all...] |
/external/dnsmasq/src/ |
netlink.c | 189 struct rtattr *rta = IFA_RTA(ifa); local 200 while (RTA_OK(rta, len1)) 202 if (rta->rta_type == IFA_LOCAL) 203 addr = *((struct in_addr *)(rta+1)); 204 else if (rta->rta_type == IFA_BROADCAST) 205 broadcast = *((struct in_addr *)(rta+1)); 207 rta = RTA_NEXT(rta, len1); 218 while (RTA_OK(rta, len1)) 220 if (rta->rta_type == IFA_ADDRESS [all...] |
/bionic/libc/kernel/common/linux/ |
rtnetlink.h | 150 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) 151 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 155 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 156 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/external/iproute2/include/linux/ |
rtnetlink.h | 146 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ 147 (rta)->rta_len >= sizeof(struct rtattr) && \ 148 (rta)->rta_len <= (len)) 149 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ 150 (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 153 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 154 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.4.3/sysroot/usr/include/linux/ |
rtnetlink.h | 127 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ 128 (rta)->rta_len >= sizeof(struct rtattr) && \ 129 (rta)->rta_len <= (len)) 130 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ 131 (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 134 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 135 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/linux/ |
rtnetlink.h | 127 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ 128 (rta)->rta_len >= sizeof(struct rtattr) && \ 129 (rta)->rta_len <= (len)) 130 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ 131 (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 134 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 135 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6/sysroot/usr/include/linux/ |
rtnetlink.h | 127 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ 128 (rta)->rta_len >= sizeof(struct rtattr) && \ 129 (rta)->rta_len <= (len)) 130 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ 131 (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 134 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 135 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/external/dnsmasq/contrib/wrt/ |
dhcp_release.c | 225 struct rtattr *rta; local 235 for (rta = IFA_RTA(ifa); RTA_OK(rta, len1); rta = RTA_NEXT(rta, len1)) 236 if (rta->rta_type == IFA_LOCAL) 237 addr = *((struct in_addr *)(rta+1));
|
/external/iproute2/tc/ |
tc_common.h | 14 extern void print_size_table(FILE *fp, const char *prefix, struct rtattr *rta);
|
em_meta.c | 437 static inline int print_value(FILE *fd, int type, struct rtattr *rta) 439 if (rta == NULL) { 446 if (RTA_PAYLOAD(rta) < sizeof(__u32)) { 451 fprintf(fd, "%d", *(__u32 *) RTA_DATA(rta)); 455 print_binary(fd, RTA_DATA(rta), RTA_PAYLOAD(rta)); 462 static int print_object(FILE *fd, struct tcf_meta_val *obj, struct rtattr *rta) 469 return print_value(fd, type, rta); 483 if (rta) { 484 if (RTA_PAYLOAD(rta) < sizeof(__u32) [all...] |
/development/ndk/platforms/android-3/include/linux/ |
rtnetlink.h | 120 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) 121 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 124 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 125 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/ndk/4/platforms/android-3/arch-arm/usr/include/linux/ |
rtnetlink.h | 120 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) 121 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 124 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 125 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/ndk/4/platforms/android-4/arch-arm/usr/include/linux/ |
rtnetlink.h | 120 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) 121 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 124 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 125 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/ndk/4/platforms/android-5/arch-arm/usr/include/linux/ |
rtnetlink.h | 120 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) 121 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 124 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 125 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/ndk/4/platforms/android-5/arch-x86/usr/include/linux/ |
rtnetlink.h | 120 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) 121 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 124 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 125 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/ndk/4/platforms/android-8/arch-arm/usr/include/linux/ |
rtnetlink.h | 120 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) 121 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 124 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 125 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/ndk/4/platforms/android-8/arch-x86/usr/include/linux/ |
rtnetlink.h | 120 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) 121 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 124 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 125 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/ndk/5/platforms/android-3/arch-arm/usr/include/linux/ |
rtnetlink.h | 120 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) 121 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 124 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 125 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/ndk/6/platforms/android-3/arch-arm/usr/include/linux/ |
rtnetlink.h | 120 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) 121 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 124 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 125 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |
/prebuilts/ndk/6/platforms/android-3/arch-x86/usr/include/linux/ |
rtnetlink.h | 120 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && (rta)->rta_len >= sizeof(struct rtattr) && (rta)->rta_len <= (len)) 121 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 124 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) 125 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0) [all...] |