/linux-6.1.9/tools/accounting/ |
D | procacct.c | 127 void *nla_data, int nla_len) in send_cmd() argument 145 na->nla_len = nla_len + 1 + NLA_HDRLEN; in send_cmd() 146 memcpy(NLA_DATA(na), nla_data, nla_len); in send_cmd() 147 msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len); in send_cmd() 194 na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len)); in get_family_id() 226 int aggr_len = NLA_PAYLOAD(na->nla_len); in handle_aggr() 245 if (write(fd, NLA_DATA(na), na->nla_len) < 0) in handle_aggr() 256 len2 += NLA_ALIGN(na->nla_len); in handle_aggr() 258 NLA_ALIGN(na->nla_len)); in handle_aggr() 382 len += NLA_ALIGN(na->nla_len); in main()
|
D | getdelays.c | 120 void *nla_data, int nla_len) in send_cmd() argument 138 na->nla_len = nla_len + NLA_HDRLEN; in send_cmd() 139 memcpy(NLA_DATA(na), nla_data, nla_len); in send_cmd() 140 msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len); in send_cmd() 187 na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len)); in get_family_id() 487 len += NLA_ALIGN(na->nla_len); in main() 492 aggr_len = NLA_PAYLOAD(na->nla_len); in main() 516 if (write(fd, NLA_DATA(na), na->nla_len) < 0) { in main() 531 len2 += NLA_ALIGN(na->nla_len); in main() 533 NLA_ALIGN(na->nla_len)); in main()
|
/linux-6.1.9/net/xfrm/ |
D | xfrm_compat.c | 244 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 250 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 252 return nla_put_64bit(dst, src->nla_type, nla_len(src), in xfrm_xlate64_attr() 259 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 261 return nla_put_64bit(dst, src->nla_type, nla_len(src), in xfrm_xlate64_attr() 279 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 307 err = xfrm_nla_cpy(dst, nla, nla_len(nla)); in xfrm_xlate64() 417 nla->nla_len = nla_attr_size(payload); in xfrm_attr_cpy32() 419 nlmsg->nlmsg_len += nla->nla_len; in xfrm_attr_cpy32() 440 if (nla_len(nla) < compat_policy[type].len) { in xfrm_xlate32_attr() [all …]
|
/linux-6.1.9/net/openvswitch/ |
D | flow_netlink.c | 498 if (!check_attr_len(nla_len(nla), expected_len)) { in __parse_flow_nlattrs() 500 type, nla_len(nla), expected_len); in __parse_flow_nlattrs() 504 if (!nz || !is_all_zero(nla_data(nla), nla_len(nla))) { in __parse_flow_nlattrs() 537 if (nla_len(a) > sizeof(match->key->tun_opts)) { in genev_tun_opt_from_nlattr() 539 nla_len(a), sizeof(match->key->tun_opts)); in genev_tun_opt_from_nlattr() 543 if (nla_len(a) % 4 != 0) { in genev_tun_opt_from_nlattr() 545 nla_len(a)); in genev_tun_opt_from_nlattr() 554 SW_FLOW_KEY_PUT(match, tun_opts_len, nla_len(a), in genev_tun_opt_from_nlattr() 567 if (match->key->tun_opts_len != nla_len(a)) { in genev_tun_opt_from_nlattr() 569 match->key->tun_opts_len, nla_len(a)); in genev_tun_opt_from_nlattr() [all …]
|
D | vport.c | 342 if (!nla_len(ids) || nla_len(ids) % sizeof(u32)) in ovs_vport_set_upcall_portids() 347 vport_portids = kmalloc(sizeof(*vport_portids) + nla_len(ids), in ovs_vport_set_upcall_portids() 352 vport_portids->n_ids = nla_len(ids) / sizeof(u32); in ovs_vport_set_upcall_portids() 354 nla_memcpy(vport_portids->ids, ids, nla_len(ids)); in ovs_vport_set_upcall_portids()
|
D | vport-vxlan.c | 57 if (nla_len(attr) < sizeof(struct nlattr)) in vxlan_configure_exts() 92 if (a && nla_len(a) == sizeof(u16)) { in vxlan_tnl_create()
|
D | conntrack.c | 1422 if (nla_len(a) != ovs_nat_attr_lens[type][ip_vers]) { in parse_nat() 1424 type, nla_len(a), in parse_nat() 1557 if (nla_len(a) < minlen || nla_len(a) > maxlen) { in parse_ct() 1560 type, nla_len(a), maxlen); in parse_ct() 1602 if (!memchr(*helper, '\0', nla_len(a))) { in parse_ct() 1622 memcpy(info->timeout, nla_data(a), nla_len(a)); in parse_ct() 1623 if (!memchr(info->timeout, '\0', nla_len(a))) { in parse_ct() 1971 rem = NLA_ALIGN(nla_len(nla_zone_limit)); in ovs_ct_limit_set_zone_limit() 2016 rem = NLA_ALIGN(nla_len(nla_zone_limit)); in ovs_ct_limit_del_zone_limit() 2083 rem = NLA_ALIGN(nla_len(nla_zone_limit)); in ovs_ct_limit_get_zone_limit()
|
/linux-6.1.9/tools/lib/bpf/ |
D | nlattr.h | 108 return nla->nla_len - NLA_HDRLEN; in libbpf_nla_len() 141 nla->nla_len = NLA_HDRLEN + len; in nlattr_add() 144 req->nh.nlmsg_len = NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(nla->nla_len); in nlattr_add() 161 tail->nla_len = (void *)req_tail(req) - (void *)tail; in nlattr_end_nested()
|
D | nlattr.c | 27 int totlen = NLA_ALIGN(nla->nla_len); in nla_next() 36 nla->nla_len >= sizeof(*nla) && in nla_ok() 37 nla->nla_len <= remaining; in nla_ok()
|
/linux-6.1.9/lib/ |
D | nlattr.c | 96 if (nla_len(entry) == 0) in nla_validate_array() 99 if (nla_len(entry) < NLA_HDRLEN) { in nla_validate_array() 105 ret = __nla_validate_parse(nla_data(entry), nla_len(entry), in nla_validate_array() 190 value = nla_len(nla); in nla_validate_range_unsigned() 376 int minlen = 0, attrlen = nla_len(nla), type = nla_type(nla); in validate_nla() 480 err = __nla_validate_parse(nla_data(nla), nla_len(nla), in validate_nla() 504 err = nla_validate_array(nla_data(nla), nla_len(nla), in validate_nla() 742 size_t srclen = nla_len(nla); in nla_strscpy() 778 size_t srclen = nla_len(nla); in nla_strdup() 806 int minlen = min_t(int, count, nla_len(src)); in nla_memcpy() [all …]
|
/linux-6.1.9/tools/testing/selftests/nci/ |
D | nci_dev.c | 113 void *nla_data[], int nla_len[], __u16 flags) in send_cmd_mt_nla() argument 134 na->nla_len = nla_len[cnt] + NLA_HDRLEN; in send_cmd_mt_nla() 136 if (nla_len[cnt] > 0) in send_cmd_mt_nla() 137 memcpy(NLA_DATA(na), nla_data[cnt], nla_len[cnt]); in send_cmd_mt_nla() 139 prv_len = NLA_ALIGN(nla_len[cnt]) + NLA_HDRLEN; in send_cmd_mt_nla() 205 len += NLA_ALIGN(na->nla_len); in get_family_id() 226 group_attr_len += NLA_ALIGN(group_na->nla_len) + in get_family_id() 228 if (group_attr_len >= nested_na->nla_len) in get_family_id() 232 NLA_ALIGN(group_na->nla_len)); in get_family_id() 245 int nla_len = 4; in send_cmd_with_idx() local [all …]
|
/linux-6.1.9/net/ieee802154/ |
D | nl-phy.c | 87 if (name[nla_len(info->attrs[IEEE802154_ATTR_PHY_NAME]) - 1] != '\0') in ieee802154_list_phy() 178 if (name[nla_len(info->attrs[IEEE802154_ATTR_PHY_NAME]) - 1] != '\0') in ieee802154_add_iface() 183 if (devname[nla_len(info->attrs[IEEE802154_ATTR_DEV_NAME]) - 1] in ieee802154_add_iface() 204 nla_len(info->attrs[IEEE802154_ATTR_HW_ADDR]) != in ieee802154_add_iface() 280 if (name[nla_len(info->attrs[IEEE802154_ATTR_DEV_NAME]) - 1] != '\0') in ieee802154_del_iface() 301 if (pname[nla_len(info->attrs[IEEE802154_ATTR_PHY_NAME]) - 1] in ieee802154_del_iface()
|
/linux-6.1.9/include/net/ |
D | netlink.h | 1163 static inline int nla_len(const struct nlattr *nla) in nla_len() function 1165 return nla->nla_len - NLA_HDRLEN; in nla_len() 1176 nla->nla_len >= sizeof(*nla) && in nla_ok() 1177 nla->nla_len <= remaining; in nla_ok() 1190 unsigned int totlen = NLA_ALIGN(nla->nla_len); in nla_next() 1206 return nla_find(nla_data(nla), nla_len(nla), attrtype); in nla_find_nested() 1229 return __nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy, in nla_parse_nested() 1248 return __nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy, in nla_parse_nested_deprecated() 1765 return kmemdup(nla_data(src), nla_len(src), gfp); in nla_memdup() 1817 start->nla_len = skb_tail_pointer(skb) - (unsigned char *)start; in nla_nest_end() [all …]
|
/linux-6.1.9/drivers/net/wireguard/ |
D | netlink.c | 342 nla_len(attrs[WGALLOWEDIP_A_IPADDR]) == sizeof(struct in_addr)) in set_allowedip() 348 nla_len(attrs[WGALLOWEDIP_A_IPADDR]) == sizeof(struct in6_addr)) in set_allowedip() 366 nla_len(attrs[WGPEER_A_PUBLIC_KEY]) == NOISE_PUBLIC_KEY_LEN) in set_peer() 371 nla_len(attrs[WGPEER_A_PRESHARED_KEY]) == NOISE_SYMMETRIC_KEY_LEN) in set_peer() 438 size_t len = nla_len(attrs[WGPEER_A_ENDPOINT]); in set_peer() 489 nla_len(attrs[WGPEER_A_PRESHARED_KEY])); in set_peer() 544 nla_len(info->attrs[WGDEVICE_A_PRIVATE_KEY]) == in wg_set_device() 602 nla_len(info->attrs[WGDEVICE_A_PRIVATE_KEY])); in wg_set_device()
|
/linux-6.1.9/net/sched/ |
D | ematch.c | 175 int data_len = nla_len(nla) - sizeof(*em_hdr); in tcf_em_validate() 334 list_len = nla_len(rt_list); in tcf_em_tree_validate() 359 if (nla_len(rt_match) < sizeof(struct tcf_ematch_hdr)) in tcf_em_tree_validate() 478 match_start->nla_len = tail - (u8 *)match_start; in tcf_em_tree_dump()
|
D | sch_plug.c | 138 if (nla_len(opt) < sizeof(*ctl)) in plug_init() 165 if (nla_len(opt) < sizeof(*msg)) in plug_change()
|
D | act_bpf.c | 110 memcpy(nla_data(nla), prog->bpf_ops, nla_len(nla)); in tcf_bpf_dump_bpf_info() 131 memcpy(nla_data(nla), prog->filter->tag, nla_len(nla)); in tcf_bpf_dump_ebpf_info() 198 if (bpf_size != nla_len(tb[TCA_ACT_BPF_OPS])) in tcf_bpf_init_from_ops()
|
D | sch_fifo.c | 112 if (nla_len(opt) < sizeof(*ctl)) in __fifo_init() 242 nla->nla_len = nla_attr_size(sizeof(struct tc_fifo_qopt)); in fifo_set_limit()
|
/linux-6.1.9/tools/lib/thermal/ |
D | thermal_nl.c | 94 nla_data(mcgrp), nla_len(mcgrp), NULL); in nl_family_handler() 102 nla_len(tb_mcgrp[CTRL_ATTR_MCAST_GRP_NAME]))) in nl_family_handler()
|
/linux-6.1.9/net/wireless/ |
D | nl80211.c | 229 unsigned int len = nla_len(attr); in validate_beacon_head() 274 unsigned int len = nla_len(attr); in validate_ie_attr() 291 if (!ieee80211_he_capa_size_ok(nla_data(attr), nla_len(attr))) in validate_he_capa() 1306 k->p.key_len = nla_len(tb[NL80211_KEY_DATA]); in nl80211_parse_key_new() 1311 k->p.seq_len = nla_len(tb[NL80211_KEY_SEQ]); in nl80211_parse_key_new() 1345 k->p.key_len = nla_len(info->attrs[NL80211_ATTR_KEY_DATA]); in nl80211_parse_key_old() 1350 k->p.seq_len = nla_len(info->attrs[NL80211_ATTR_KEY_SEQ]); in nl80211_parse_key_old() 4145 nla_len(info->attrs[NL80211_ATTR_MESH_ID]); in nl80211_set_interface() 4254 nla_len(info->attrs[NL80211_ATTR_MESH_ID]); in _nl80211_new_interface() 4794 if (nla_len(attr) != ETH_ALEN) in validate_acl_mac_addrs() [all …]
|
/linux-6.1.9/net/netlabel/ |
D | netlabel_mgmt.c | 93 size_t tmp_size = nla_len(info->attrs[NLBL_MGMT_A_DOMAIN]); in netlbl_mgmt_add_common() 161 if (nla_len(info->attrs[NLBL_MGMT_A_IPV4ADDR]) != in netlbl_mgmt_add_common() 166 if (nla_len(info->attrs[NLBL_MGMT_A_IPV4MASK]) != in netlbl_mgmt_add_common() 208 if (nla_len(info->attrs[NLBL_MGMT_A_IPV6ADDR]) != in netlbl_mgmt_add_common() 213 if (nla_len(info->attrs[NLBL_MGMT_A_IPV6MASK]) != in netlbl_mgmt_add_common()
|
D | netlabel_unlabeled.c | 771 addr_len = nla_len(info->attrs[NLBL_UNLABEL_A_IPV4ADDR]); in netlbl_unlabel_addrinfo_get() 773 addr_len != nla_len(info->attrs[NLBL_UNLABEL_A_IPV4MASK])) in netlbl_unlabel_addrinfo_get() 780 addr_len = nla_len(info->attrs[NLBL_UNLABEL_A_IPV6ADDR]); in netlbl_unlabel_addrinfo_get() 782 addr_len != nla_len(info->attrs[NLBL_UNLABEL_A_IPV6MASK])) in netlbl_unlabel_addrinfo_get() 906 nla_len(info->attrs[NLBL_UNLABEL_A_SECCTX]), in netlbl_unlabel_staticadd() 955 nla_len(info->attrs[NLBL_UNLABEL_A_SECCTX]), in netlbl_unlabel_staticadddef()
|
/linux-6.1.9/tools/power/x86/intel-speed-select/ |
D | hfi-events.c | 138 nla_len(mcgrp), NULL); in family_handler() 143 nla_len(tb2[CTRL_ATTR_MCAST_GRP_NAME])) != 0) in family_handler()
|
/linux-6.1.9/drivers/block/drbd/ |
D | drbd_nla.c | 10 int len = nla_len(nla); in drbd_nla_check_mandatory()
|
/linux-6.1.9/drivers/net/wireless/ath/ath6kl/ |
D | testmode.c | 91 buf_len = nla_len(tb[ATH6KL_TM_ATTR_DATA]); in ath6kl_tm_cmd()
|