/external/wpa_supplicant_8/src/drivers/ |
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/chromium_org/third_party/libjingle/source/talk/base/ |
ifaddrs-android.cc | 187 rtattr* rta = IFA_RTA(address_msg); local 189 while (RTA_OK(rta, payload_len)) { 190 if (rta->rta_type == IFA_ADDRESS) { 200 if (populate_ifaddrs(newest, address_msg, RTA_DATA(rta), 201 RTA_PAYLOAD(rta)) != 0) { 209 rta = RTA_NEXT(rta, payload_len);
|
/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...] |
/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/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/ip/ |
xfrm_policy.c | 467 struct rtattr * rta; local 503 rta = XFRMPID_RTA(xpid); 505 rta = XFRMPEXP_RTA(xpexp); 507 rta = XFRMP_RTA(xpinfo); 509 parse_rtattr(tb, XFRMA_MAX, rta, len); 907 struct rtattr * rta; local 917 rta = XFRMSAPD_RTA(f); 918 parse_rtattr(tb, XFRMA_SPD_MAX, rta, len);
|
ipxfrm.c | 698 struct rtattr *rta = tb[XFRMA_MARK]; local 699 struct xfrm_mark *m = (struct xfrm_mark *) RTA_DATA(rta); 704 struct rtattr *rta = tb[XFRMA_ALG_AUTH]; local 705 xfrm_algo_print((struct xfrm_algo *) RTA_DATA(rta), 706 XFRMA_ALG_AUTH, RTA_PAYLOAD(rta), fp, prefix); 710 struct rtattr *rta = tb[XFRMA_ALG_AUTH_TRUNC]; local 711 xfrm_auth_trunc_print((struct xfrm_algo_auth *) RTA_DATA(rta), 712 RTA_PAYLOAD(rta), fp, prefix); 716 struct rtattr *rta = tb[XFRMA_ALG_AEAD]; local 717 xfrm_aead_print((struct xfrm_algo_aead *)RTA_DATA(rta), 722 struct rtattr *rta = tb[XFRMA_ALG_CRYPT]; local 728 struct rtattr *rta = tb[XFRMA_ALG_COMP]; local 771 struct rtattr *rta = tb[XFRMA_TMPL]; local [all...] |
xfrm_state.c | 734 struct rtattr * rta; local 779 rta = XFRMSID_RTA(xsid); 781 rta = XFRMEXP_RTA(xexp); 783 rta = XFRMS_RTA(xsinfo); 785 parse_rtattr(tb, XFRMA_MAX, rta, len); 1065 struct rtattr *rta; local 1076 rta = XFRMSAPD_RTA(f); 1077 parse_rtattr(tb, XFRMA_SAD_MAX, rta, len);
|
iproute.c | 628 int parse_one_nh(struct rtattr *rta, struct rtnexthop *rtnh, int *argcp, char ***argvp) 636 rta_addattr32(rta, 4096, RTA_GATEWAY, get_addr32(*argv)); 657 rta_addattr32(rta, 4096, RTA_FLOW, realm); 670 struct rtattr *rta = (void*)buf; local 673 rta->rta_type = RTA_MULTIPATH; 674 rta->rta_len = RTA_LENGTH(0); 675 rtnh = RTA_DATA(rta); 688 rta->rta_len += rtnh->rtnh_len; 689 parse_one_nh(rta, rtnh, &argc, &argv); 693 if (rta->rta_len > RTA_LENGTH(0) [all...] |
/external/iproute2/lib/ |
libnetlink.c | 557 struct rtattr *rta; local 563 rta = NLMSG_TAIL(n); 564 rta->rta_type = type; 565 rta->rta_len = len; 566 memcpy(RTA_DATA(rta), data, alen); 617 int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data) 622 if (RTA_ALIGN(rta->rta_len) + len > maxlen) { 626 subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len)); 630 rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len [all...] |
/system/core/libsysutils/src/ |
NetlinkEvent.cpp | 83 struct rtattr *rta; local 96 for (rta = IFA_RTA(ifaddr); RTA_OK(rta, rtasize); 97 rta = RTA_NEXT(rta, rtasize)) { 98 if (rta->rta_type == IFA_ADDRESS) { 108 struct in_addr *addr4 = (struct in_addr *) RTA_DATA(rta); 109 if (RTA_PAYLOAD(rta) < sizeof(*addr4)) { 111 RTA_PAYLOAD(rta), msgtype); 116 struct in6_addr *addr6 = (struct in6_addr *) RTA_DATA(rta); 198 struct rtattr *rta = (struct rtattr *) local [all...] |
/external/iputils/ninfod/ |
ni_ifaddrs.c | 387 struct rtattr *rta; local 433 for (rta = (struct rtattr *) (((char *) NLMSG_DATA(nlh)) + 435 RTA_OK(rta, rtasize); 436 rta = RTA_NEXT(rta, rtasize)) { 437 void *rtadata = RTA_DATA(rta); 438 size_t rtapayload = RTA_PAYLOAD(rta); 444 switch (rta->rta_type) {
|
/system/core/libnetutils/ |
ifc_utils.c | 261 struct rtattr *rta; local 308 rta = (struct rtattr *) (((char *) &req) + NLMSG_ALIGN(req.n.nlmsg_len)); 309 rta->rta_type = IFA_LOCAL; 310 rta->rta_len = RTA_LENGTH(addrlen); 312 memcpy(RTA_DATA(rta), addr, addrlen);
|
/hardware/ti/wlan/mac80211/wpa_supplicant_lib/ |
driver_mac80211.c | 66 struct rtattr *rta; local 85 rta = aliasing_hide_typecast( 88 rta->rta_type = IFLA_LINKMODE; 89 rta->rta_len = RTA_LENGTH(sizeof(char)); 90 *((char *) RTA_DATA(rta)) = linkmode; 95 rta = (struct rtattr *) 97 rta->rta_type = IFLA_OPERSTATE; 98 rta->rta_len = RTA_LENGTH(sizeof(char)); 99 *((char *) RTA_DATA(rta)) = operstate; [all...] |
/external/iproute2/misc/ |
ss.c | 1500 struct rtattr rta; local [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...] |