/external/iproute2/include/ |
D | libnetlink.h | 96 int rta_addattr8(struct rtattr *rta, int maxlen, int type, __u8 data); 97 int rta_addattr16(struct rtattr *rta, int maxlen, int type, __u16 data); 98 int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data); 99 int rta_addattr64(struct rtattr *rta, int maxlen, int type, __u64 data); 100 int rta_addattr_l(struct rtattr *rta, int maxlen, int type, 103 int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len); 104 int parse_rtattr_flags(struct rtattr *tb[], int max, struct rtattr *rta, 107 struct rtattr *rta, int len); 108 struct rtattr *parse_rtattr_one(int type, struct rtattr *rta, int len); 109 int __parse_rtattr_nested_compat(struct rtattr *tb[], int max, struct rtattr *rta, int len); [all …]
|
/external/iproute2/lib/ |
D | libnetlink.c | 654 struct rtattr *rta; in addattr_l() local 660 rta = NLMSG_TAIL(n); in addattr_l() 661 rta->rta_type = type; in addattr_l() 662 rta->rta_len = len; in addattr_l() 663 memcpy(RTA_DATA(rta), data, alen); in addattr_l() 714 int rta_addattr32(struct rtattr *rta, int maxlen, int type, __u32 data) in rta_addattr32() argument 719 if (RTA_ALIGN(rta->rta_len) + len > maxlen) { in rta_addattr32() 723 subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len)); in rta_addattr32() 727 rta->rta_len = NLMSG_ALIGN(rta->rta_len) + len; in rta_addattr32() 731 int rta_addattr_l(struct rtattr *rta, int maxlen, int type, in rta_addattr_l() argument [all …]
|
/external/wpa_supplicant_8/src/drivers/ |
D | priv_netlink.h | 64 #define RTA_OK(rta,len) \ argument 65 ((len) > 0 && (rta)->rta_len >= sizeof(struct rtattr) && \ 66 (rta)->rta_len <= (len)) 67 #define RTA_NEXT(rta,attrlen) \ argument 68 ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ 69 (struct rtattr *) (((char *)(rta)) + RTA_ALIGN((rta)->rta_len))) 72 #define RTA_DATA(rta) ((void *) (((char *) (rta)) + RTA_LENGTH(0))) argument 73 #define RTA_PAYLOAD(rta) ((int) ((rta)->rta_len) - RTA_LENGTH(0)) argument
|
D | netlink.c | 177 struct rtattr *rta; in netlink_send_oper_ifla() local 196 rta = aliasing_hide_typecast( in netlink_send_oper_ifla() 199 rta->rta_type = IFLA_LINKMODE; in netlink_send_oper_ifla() 200 rta->rta_len = RTA_LENGTH(sizeof(char)); in netlink_send_oper_ifla() 201 *((char *) RTA_DATA(rta)) = linkmode; in netlink_send_oper_ifla() 205 rta = aliasing_hide_typecast( in netlink_send_oper_ifla() 208 rta->rta_type = IFLA_OPERSTATE; in netlink_send_oper_ifla() 209 rta->rta_len = RTA_LENGTH(sizeof(char)); in netlink_send_oper_ifla() 210 *((char *) RTA_DATA(rta)) = operstate; in netlink_send_oper_ifla()
|
/external/iproute2/ip/ |
D | iproute_lwtunnel.c | 177 static int parse_encap_mpls(struct rtattr *rta, size_t len, int *argcp, char ***argvp) in parse_encap_mpls() argument 188 rta_addattr_l(rta, len, MPLS_IPTUNNEL_DST, &addr.data, in parse_encap_mpls() 197 static int parse_encap_ip(struct rtattr *rta, size_t len, int *argcp, char ***argvp) in parse_encap_ip() argument 211 rta_addattr64(rta, len, LWTUNNEL_IP_ID, htonll(id)); in parse_encap_ip() 218 rta_addattr_l(rta, len, LWTUNNEL_IP_DST, &addr.data, addr.bytelen); in parse_encap_ip() 226 rta_addattr8(rta, len, LWTUNNEL_IP_TOS, tos); in parse_encap_ip() 234 rta_addattr8(rta, len, LWTUNNEL_IP_TTL, ttl); in parse_encap_ip() 250 static int parse_encap_ila(struct rtattr *rta, size_t len, in parse_encap_ila() argument 262 rta_addattr64(rta, 1024, ILA_ATTR_LOCATOR, locator); in parse_encap_ila() 270 static int parse_encap_ip6(struct rtattr *rta, size_t len, int *argcp, char ***argvp) in parse_encap_ip6() argument [all …]
|
D | ipxfrm.c | 693 struct rtattr *rta = tb[XFRMA_MARK]; in xfrm_xfrma_print() local 694 struct xfrm_mark *m = (struct xfrm_mark *) RTA_DATA(rta); in xfrm_xfrma_print() 700 struct rtattr *rta = tb[XFRMA_ALG_AUTH]; in xfrm_xfrma_print() local 701 xfrm_algo_print((struct xfrm_algo *) RTA_DATA(rta), in xfrm_xfrma_print() 702 XFRMA_ALG_AUTH, RTA_PAYLOAD(rta), fp, prefix); in xfrm_xfrma_print() 706 struct rtattr *rta = tb[XFRMA_ALG_AUTH_TRUNC]; in xfrm_xfrma_print() local 707 xfrm_auth_trunc_print((struct xfrm_algo_auth *) RTA_DATA(rta), in xfrm_xfrma_print() 708 RTA_PAYLOAD(rta), fp, prefix); in xfrm_xfrma_print() 712 struct rtattr *rta = tb[XFRMA_ALG_AEAD]; in xfrm_xfrma_print() local 713 xfrm_aead_print((struct xfrm_algo_aead *)RTA_DATA(rta), in xfrm_xfrma_print() [all …]
|
D | iproute.c | 725 struct rtattr *rta, struct rtnexthop *rtnh, in parse_one_nh() argument 745 rta_addattr_l(rta, 4096, RTA_GATEWAY, &addr.data, addr.bytelen); in parse_one_nh() 748 rta_addattr_l(rta, 4096, RTA_VIA, &addr.family, addr.bytelen+2); in parse_one_nh() 770 rta_addattr32(rta, 4096, RTA_FLOW, realm); in parse_one_nh() 773 int len = rta->rta_len; in parse_one_nh() 775 lwt_parse_encap(rta, 4096, &argc, &argv); in parse_one_nh() 776 rtnh->rtnh_len += rta->rta_len - len; in parse_one_nh() 789 struct rtattr *rta = (void*)buf; in parse_nexthops() local 792 rta->rta_type = RTA_MULTIPATH; in parse_nexthops() 793 rta->rta_len = RTA_LENGTH(0); in parse_nexthops() [all …]
|
D | iproute_lwtunnel.h | 4 int lwt_parse_encap(struct rtattr *rta, size_t len, int *argcp, char ***argvp);
|
D | xfrm_policy.c | 463 struct rtattr * rta; in xfrm_policy_print() local 499 rta = XFRMPID_RTA(xpid); in xfrm_policy_print() 501 rta = XFRMPEXP_RTA(xpexp); in xfrm_policy_print() 503 rta = XFRMP_RTA(xpinfo); in xfrm_policy_print() 505 parse_rtattr(tb, XFRMA_MAX, rta, len); in xfrm_policy_print() 923 struct rtattr * rta; in print_spdinfo() local 933 rta = XFRMSAPD_RTA(f); in print_spdinfo() 934 parse_rtattr(tb, XFRMA_SPD_MAX, rta, len); in print_spdinfo()
|
D | xfrm_state.c | 873 struct rtattr * rta; in xfrm_state_print() local 918 rta = XFRMSID_RTA(xsid); in xfrm_state_print() 920 rta = XFRMEXP_RTA(xexp); in xfrm_state_print() 922 rta = XFRMS_RTA(xsinfo); in xfrm_state_print() 924 parse_rtattr(tb, XFRMA_MAX, rta, len); in xfrm_state_print() 1237 struct rtattr *rta; in print_sadinfo() local 1248 rta = XFRMSAPD_RTA(f); in print_sadinfo() 1249 parse_rtattr(tb, XFRMA_SAD_MAX, rta, len); in print_sadinfo()
|
/external/dhcpcd-6.8.2/ |
D | if-linux.c | 399 struct rtattr *rta; in if_copyrt() local 418 rta = (struct rtattr *)RTM_RTA(rtm); in if_copyrt() 420 while (RTA_OK(rta, len)) { in if_copyrt() 421 switch (rta->rta_type) { in if_copyrt() 423 memcpy(&rt->dest.s_addr, RTA_DATA(rta), in if_copyrt() 427 memcpy(&rt->gate.s_addr, RTA_DATA(rta), in if_copyrt() 431 memcpy(&prefsrc.s_addr, RTA_DATA(rta), in if_copyrt() 436 *(unsigned int *)RTA_DATA(rta)); in if_copyrt() 439 rt->metric = *(unsigned int *)RTA_DATA(rta); in if_copyrt() 442 rta = RTA_NEXT(rta, len); in if_copyrt() [all …]
|
/external/dnsmasq/src/ |
D | netlink.c | 189 struct rtattr *rta = IFA_RTA(ifa); in iface_enumerate() local 200 while (RTA_OK(rta, len1)) in iface_enumerate() 202 if (rta->rta_type == IFA_LOCAL) in iface_enumerate() 203 addr = *((struct in_addr *)(rta+1)); in iface_enumerate() 204 else if (rta->rta_type == IFA_BROADCAST) in iface_enumerate() 205 broadcast = *((struct in_addr *)(rta+1)); in iface_enumerate() 207 rta = RTA_NEXT(rta, len1); in iface_enumerate() 218 while (RTA_OK(rta, len1)) in iface_enumerate() 220 if (rta->rta_type == IFA_ADDRESS) in iface_enumerate() 221 addrp = ((struct in6_addr *)(rta+1)); in iface_enumerate() [all …]
|
/external/libnl/include/linux/ |
D | rtnetlink.h | 134 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ argument 135 (rta)->rta_len >= sizeof(struct rtattr) && \ 136 (rta)->rta_len <= (len)) 137 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ argument 138 (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 141 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) argument 142 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0)) argument
|
/external/kernel-headers/original/uapi/linux/ |
D | rtnetlink.h | 165 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ argument 166 (rta)->rta_len >= sizeof(struct rtattr) && \ 167 (rta)->rta_len <= (len)) 168 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ argument 169 (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 172 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) argument 173 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0)) argument
|
/external/iproute2/include/linux/ |
D | rtnetlink.h | 165 #define RTA_OK(rta,len) ((len) >= (int)sizeof(struct rtattr) && \ argument 166 (rta)->rta_len >= sizeof(struct rtattr) && \ 167 (rta)->rta_len <= (len)) 168 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ argument 169 (struct rtattr*)(((char*)(rta)) + RTA_ALIGN((rta)->rta_len))) 172 #define RTA_DATA(rta) ((void*)(((char*)(rta)) + RTA_LENGTH(0))) argument 173 #define RTA_PAYLOAD(rta) ((int)((rta)->rta_len) - RTA_LENGTH(0)) argument
|
/external/webrtc/webrtc/base/ |
D | ifaddrs-android.cc | 174 rtattr* rta = IFA_RTA(address_msg); in getifaddrs() local 176 while (RTA_OK(rta, payload_len)) { in getifaddrs() 177 if (rta->rta_type == IFA_ADDRESS) { in getifaddrs() 187 if (populate_ifaddrs(newest, address_msg, RTA_DATA(rta), in getifaddrs() 188 RTA_PAYLOAD(rta)) != 0) { in getifaddrs() 196 rta = RTA_NEXT(rta, payload_len); in getifaddrs()
|
/external/iproute2/tc/ |
D | em_meta.c | 437 static inline int print_value(FILE *fd, int type, struct rtattr *rta) in print_value() argument 439 if (rta == NULL) { in print_value() 446 if (RTA_PAYLOAD(rta) < sizeof(__u32)) { in print_value() 451 fprintf(fd, "%d", rta_getattr_u32(rta)); in print_value() 455 print_binary(fd, RTA_DATA(rta), RTA_PAYLOAD(rta)); in print_value() 462 static int print_object(FILE *fd, struct tcf_meta_val *obj, struct rtattr *rta) in print_object() argument 469 return print_value(fd, type, rta); in print_object() 483 if (rta) { in print_object() 484 if (RTA_PAYLOAD(rta) < sizeof(__u32)) in print_object() 488 rta_getattr_u32(rta)); in print_object()
|
D | tc_stab.c | 110 void print_size_table(FILE *fp, const char *prefix, struct rtattr *rta) in print_size_table() argument 115 parse_rtattr_nested(tb, TCA_STAB_MAX, rta); in print_size_table()
|
D | m_ematch.c | 443 struct rtattr *rta) in print_ematch_list() argument 453 if (parse_rtattr_nested(tb, hdr->nmatches, rta) < 0) in print_ematch_list() 467 int print_ematch(FILE *fd, const struct rtattr *rta) in print_ematch() argument 472 if (parse_rtattr_nested(tb, TCA_EMATCH_TREE_MAX, rta) < 0) in print_ematch()
|
D | tc_common.h | 17 extern void print_size_table(FILE *fp, const char *prefix, struct rtattr *rta);
|
/external/dnsmasq/contrib/wrt/ |
D | dhcp_release.c | 225 struct rtattr *rta; in find_interface() local 235 for (rta = IFA_RTA(ifa); RTA_OK(rta, len1); rta = RTA_NEXT(rta, len1)) in find_interface() 236 if (rta->rta_type == IFA_LOCAL) in find_interface() 237 addr = *((struct in_addr *)(rta+1)); in find_interface()
|
/external/toybox/toys/pending/ |
D | ip.c | 431 struct rtattr *rta; in add_string_to_rtattr() local 434 rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); in add_string_to_rtattr() 435 rta->rta_type = type; in add_string_to_rtattr() 436 rta->rta_len = len; in add_string_to_rtattr() 437 memcpy(RTA_DATA(rta), data, alen); in add_string_to_rtattr() 950 struct rtattr *rta, *rta_tb[IFA_MAX+1] = {0,}; in print_addrinfo() local 962 for (rta = IFA_RTA(ifa); RTA_OK(rta, len); rta=RTA_NEXT(rta, len)) in print_addrinfo() 963 if (rta->rta_type <= IFA_MAX) rta_tb[rta->rta_type] = rta; in print_addrinfo() 1351 struct rtattr *rta, *rta_tb[IFA_MAX+1] = {0,}; in ipaddr_print() local 1365 for (rta = IFA_RTA(addressInfo); RTA_OK(rta, rt_len); rta=RTA_NEXT(rta, rt_len)) { in ipaddr_print() [all …]
|
/external/iputils/ninfod/ |
D | ni_ifaddrs.c | 387 struct rtattr *rta; in ni_ifaddrs() local 433 for (rta = (struct rtattr *) (((char *) NLMSG_DATA(nlh)) + in ni_ifaddrs() 435 RTA_OK(rta, rtasize); in ni_ifaddrs() 436 rta = RTA_NEXT(rta, rtasize)) { in ni_ifaddrs() 437 void *rtadata = RTA_DATA(rta); in ni_ifaddrs() 438 size_t rtapayload = RTA_PAYLOAD(rta); in ni_ifaddrs() 444 switch (rta->rta_type) { in ni_ifaddrs()
|
/external/ipsec-tools/src/racoon/ |
D | grabmyaddr.c | 113 static int parse_rtattr(struct rtattr *tb[], int max, struct rtattr *rta, int len) in parse_rtattr() argument 115 while (RTA_OK(rta, len)) { in parse_rtattr() 116 if (rta->rta_type <= max) in parse_rtattr() 117 tb[rta->rta_type] = rta; in parse_rtattr() 118 rta = RTA_NEXT(rta,len); in parse_rtattr()
|
/external/avahi/avahi-autoipd/ |
D | iface-bsd.c | 374 #define SKIPRTA(ifamsgp, rta, sa) \ in rtm_dispatch_newdeladdr() argument 376 if ((ifamsgp)->ifam_addrs & (rta)) \ in rtm_dispatch_newdeladdr()
|