/Linux-v6.6/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() 377 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() 493 len += NLA_ALIGN(na->nla_len); in main() 498 aggr_len = NLA_PAYLOAD(na->nla_len); in main() 522 if (write(fd, NLA_DATA(na), na->nla_len) < 0) { in main() 537 len2 += NLA_ALIGN(na->nla_len); in main() 539 NLA_ALIGN(na->nla_len)); in main()
|
/Linux-v6.6/net/xfrm/ |
D | xfrm_compat.c | 245 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 251 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 253 return nla_put_64bit(dst, src->nla_type, nla_len(src), in xfrm_xlate64_attr() 260 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 262 return nla_put_64bit(dst, src->nla_type, nla_len(src), in xfrm_xlate64_attr() 280 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 308 err = xfrm_nla_cpy(dst, nla, nla_len(nla)); in xfrm_xlate64() 418 nla->nla_len = nla_attr_size(payload); in xfrm_attr_cpy32() 420 nlmsg->nlmsg_len += nla->nla_len; in xfrm_attr_cpy32() 442 if (nla_len(nla) < compat_policy[type].len) { in xfrm_xlate32_attr() [all …]
|
/Linux-v6.6/net/openvswitch/ |
D | flow_netlink.c | 500 if (!check_attr_len(nla_len(nla), expected_len)) { in __parse_flow_nlattrs() 502 type, nla_len(nla), expected_len); in __parse_flow_nlattrs() 506 if (!nz || !is_all_zero(nla_data(nla), nla_len(nla))) { in __parse_flow_nlattrs() 539 if (nla_len(a) > sizeof(match->key->tun_opts)) { in genev_tun_opt_from_nlattr() 541 nla_len(a), sizeof(match->key->tun_opts)); in genev_tun_opt_from_nlattr() 545 if (nla_len(a) % 4 != 0) { in genev_tun_opt_from_nlattr() 547 nla_len(a)); in genev_tun_opt_from_nlattr() 556 SW_FLOW_KEY_PUT(match, tun_opts_len, nla_len(a), in genev_tun_opt_from_nlattr() 569 if (match->key->tun_opts_len != nla_len(a)) { in genev_tun_opt_from_nlattr() 571 match->key->tun_opts_len, nla_len(a)); in genev_tun_opt_from_nlattr() [all …]
|
D | vport.c | 406 if (!nla_len(ids) || nla_len(ids) % sizeof(u32)) in ovs_vport_set_upcall_portids() 411 vport_portids = kmalloc(sizeof(*vport_portids) + nla_len(ids), in ovs_vport_set_upcall_portids() 416 vport_portids->n_ids = nla_len(ids) / sizeof(u32); in ovs_vport_set_upcall_portids() 418 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 | 1091 if (nla_len(a) != ovs_nat_attr_lens[type][ip_vers]) { in parse_nat() 1093 type, nla_len(a), in parse_nat() 1226 if (nla_len(a) < minlen || nla_len(a) > maxlen) { in parse_ct() 1229 type, nla_len(a), maxlen); in parse_ct() 1271 if (!string_is_terminated(*helper, nla_len(a))) { in parse_ct() 1291 memcpy(info->timeout, nla_data(a), nla_len(a)); in parse_ct() 1292 if (!string_is_terminated(info->timeout, nla_len(a))) { in parse_ct() 1644 rem = NLA_ALIGN(nla_len(nla_zone_limit)); in ovs_ct_limit_set_zone_limit() 1689 rem = NLA_ALIGN(nla_len(nla_zone_limit)); in ovs_ct_limit_del_zone_limit() 1756 rem = NLA_ALIGN(nla_len(nla_zone_limit)); in ovs_ct_limit_get_zone_limit()
|
/Linux-v6.6/tools/lib/bpf/ |
D | nlattr.h | 120 return nla->nla_len - NLA_HDRLEN; in libbpf_nla_len() 153 nla->nla_len = NLA_HDRLEN + len; in nlattr_add() 156 req->nh.nlmsg_len = NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(nla->nla_len); in nlattr_add() 173 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-v6.6/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() 382 int minlen = 0, attrlen = nla_len(nla), type = nla_type(nla); in validate_nla() 486 err = __nla_validate_parse(nla_data(nla), nla_len(nla), in validate_nla() 510 err = nla_validate_array(nla_data(nla), nla_len(nla), in validate_nla() 748 size_t srclen = nla_len(nla); in nla_strscpy() 784 size_t srclen = nla_len(nla); in nla_strdup() 812 int minlen = min_t(int, count, nla_len(src)); in nla_memcpy() [all …]
|
/Linux-v6.6/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-v6.6/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-v6.6/include/net/ |
D | netlink.h | 1192 static inline int nla_len(const struct nlattr *nla) in nla_len() function 1194 return nla->nla_len - NLA_HDRLEN; in nla_len() 1205 nla->nla_len >= sizeof(*nla) && in nla_ok() 1206 nla->nla_len <= remaining; in nla_ok() 1219 unsigned int totlen = NLA_ALIGN(nla->nla_len); in nla_next() 1235 return nla_find(nla_data(nla), nla_len(nla), attrtype); in nla_find_nested() 1258 return __nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy, in nla_parse_nested() 1277 return __nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy, in nla_parse_nested_deprecated() 1794 return kmemdup(nla_data(src), nla_len(src), gfp); in nla_memdup() 1846 start->nla_len = skb_tail_pointer(skb) - (unsigned char *)start; in nla_nest_end() [all …]
|
/Linux-v6.6/drivers/net/vxlan/ |
D | vxlan_private.h | 91 if (nla_len(nla) >= sizeof(struct in6_addr)) { in vxlan_nla_get_addr() 95 } else if (nla_len(nla) >= sizeof(__be32)) { in vxlan_nla_get_addr() 132 if (nla_len(nla) >= sizeof(struct in6_addr)) { in vxlan_nla_get_addr() 134 } else if (nla_len(nla) >= sizeof(__be32)) { in vxlan_nla_get_addr()
|
/Linux-v6.6/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() 606 nla_len(info->attrs[WGDEVICE_A_PRIVATE_KEY])); in wg_set_device()
|
/Linux-v6.6/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 | 112 memcpy(nla_data(nla), prog->bpf_ops, nla_len(nla)); in tcf_bpf_dump_bpf_info() 133 memcpy(nla_data(nla), prog->filter->tag, nla_len(nla)); in tcf_bpf_dump_ebpf_info() 200 if (bpf_size != nla_len(tb[TCA_ACT_BPF_OPS])) in tcf_bpf_init_from_ops()
|
D | sch_mqprio.c | 249 int nlattr_opt_len = nla_len(opt) - NLA_ALIGN(sizeof(*qopt)); in mqprio_parse_nlattr() 294 if (nla_len(attr) != sizeof(u64)) { in mqprio_parse_nlattr() 323 if (nla_len(attr) != sizeof(u64)) { in mqprio_parse_nlattr() 372 if (!opt || nla_len(opt) < sizeof(*qopt)) in mqprio_init() 385 len = nla_len(opt) - NLA_ALIGN(sizeof(*qopt)); in mqprio_init()
|
/Linux-v6.6/net/devlink/ |
D | param.c | 460 if (nla_len(param_data) != sizeof(u8)) in devlink_param_value_get_from_info() 465 if (nla_len(param_data) != sizeof(u16)) in devlink_param_value_get_from_info() 470 if (nla_len(param_data) != sizeof(u32)) in devlink_param_value_get_from_info() 475 len = strnlen(nla_data(param_data), nla_len(param_data)); in devlink_param_value_get_from_info() 476 if (len == nla_len(param_data) || in devlink_param_value_get_from_info() 482 if (param_data && nla_len(param_data)) in devlink_param_value_get_from_info()
|
/Linux-v6.6/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-v6.6/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() 1319 k->p.key_len = nla_len(tb[NL80211_KEY_DATA]); in nl80211_parse_key_new() 1324 k->p.seq_len = nla_len(tb[NL80211_KEY_SEQ]); in nl80211_parse_key_new() 1358 k->p.key_len = nla_len(info->attrs[NL80211_ATTR_KEY_DATA]); in nl80211_parse_key_old() 1363 k->p.seq_len = nla_len(info->attrs[NL80211_ATTR_KEY_SEQ]); in nl80211_parse_key_old() 4198 nla_len(info->attrs[NL80211_ATTR_MESH_ID]); in nl80211_set_interface() 4307 nla_len(info->attrs[NL80211_ATTR_MESH_ID]); in _nl80211_new_interface() 4847 if (nla_len(attr) != ETH_ALEN) in validate_acl_mac_addrs() [all …]
|
/Linux-v6.6/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()
|
/Linux-v6.6/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-v6.6/drivers/block/drbd/ |
D | drbd_nla.c | 10 int len = nla_len(nla); in drbd_nla_check_mandatory()
|