/kernel/linux/linux-5.10/tools/lib/bpf/ |
D | netlink.c | 163 nla->nla_len = NLA_HDRLEN; in __bpf_set_link_xdp_fd_replace() 166 nla_xdp = (struct nlattr *)((char *)nla + nla->nla_len); in __bpf_set_link_xdp_fd_replace() 168 nla_xdp->nla_len = NLA_HDRLEN + sizeof(int); in __bpf_set_link_xdp_fd_replace() 170 nla->nla_len += nla_xdp->nla_len; in __bpf_set_link_xdp_fd_replace() 174 nla_xdp = (struct nlattr *)((char *)nla + nla->nla_len); in __bpf_set_link_xdp_fd_replace() 176 nla_xdp->nla_len = NLA_HDRLEN + sizeof(flags); in __bpf_set_link_xdp_fd_replace() 178 nla->nla_len += nla_xdp->nla_len; in __bpf_set_link_xdp_fd_replace() 182 nla_xdp = (struct nlattr *)((char *)nla + nla->nla_len); in __bpf_set_link_xdp_fd_replace() 184 nla_xdp->nla_len = NLA_HDRLEN + sizeof(old_fd); in __bpf_set_link_xdp_fd_replace() 186 nla->nla_len += nla_xdp->nla_len; in __bpf_set_link_xdp_fd_replace() [all …]
|
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()
|
D | nlattr.h | 95 return nla->nla_len - NLA_HDRLEN; in libbpf_nla_len()
|
/kernel/linux/linux-5.10/tools/accounting/ |
D | getdelays.c | 121 void *nla_data, int nla_len) in send_cmd() argument 139 na->nla_len = nla_len + NLA_HDRLEN; in send_cmd() 140 memcpy(NLA_DATA(na), nla_data, nla_len); in send_cmd() 141 msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len); in send_cmd() 188 na = (struct nlattr *) ((char *) na + NLA_ALIGN(na->nla_len)); in get_family_id() 477 len += NLA_ALIGN(na->nla_len); in main() 482 aggr_len = NLA_PAYLOAD(na->nla_len); in main() 508 if (write(fd, NLA_DATA(na), na->nla_len) < 0) { in main() 523 len2 += NLA_ALIGN(na->nla_len); in main() 525 NLA_ALIGN(na->nla_len)); in main()
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/lib/ |
D | nlattr.c | 95 if (nla_len(entry) == 0) in nla_validate_array() 98 if (nla_len(entry) < NLA_HDRLEN) { in nla_validate_array() 104 ret = __nla_validate_parse(nla_data(entry), nla_len(entry), in nla_validate_array() 185 value = nla_len(nla); in nla_validate_range_unsigned() 363 int minlen = 0, attrlen = nla_len(nla), type = nla_type(nla); in validate_nla() 466 err = __nla_validate_parse(nla_data(nla), nla_len(nla), in validate_nla() 490 err = nla_validate_array(nla_data(nla), nla_len(nla), in validate_nla() 725 size_t srclen = nla_len(nla); in nla_strlcpy() 751 size_t srclen = nla_len(nla); in nla_strdup() 779 int minlen = min_t(int, count, nla_len(src)); in nla_memcpy() [all …]
|
/kernel/linux/linux-5.10/net/openvswitch/ |
D | flow_netlink.c | 488 if (!check_attr_len(nla_len(nla), expected_len)) { in __parse_flow_nlattrs() 490 type, nla_len(nla), expected_len); in __parse_flow_nlattrs() 494 if (!nz || !is_all_zero(nla_data(nla), nla_len(nla))) { in __parse_flow_nlattrs() 527 if (nla_len(a) > sizeof(match->key->tun_opts)) { in genev_tun_opt_from_nlattr() 529 nla_len(a), sizeof(match->key->tun_opts)); in genev_tun_opt_from_nlattr() 533 if (nla_len(a) % 4 != 0) { in genev_tun_opt_from_nlattr() 535 nla_len(a)); in genev_tun_opt_from_nlattr() 544 SW_FLOW_KEY_PUT(match, tun_opts_len, nla_len(a), in genev_tun_opt_from_nlattr() 557 if (match->key->tun_opts_len != nla_len(a)) { in genev_tun_opt_from_nlattr() 559 match->key->tun_opts_len, nla_len(a)); in genev_tun_opt_from_nlattr() [all …]
|
D | vport.c | 340 if (!nla_len(ids) || nla_len(ids) % sizeof(u32)) in ovs_vport_set_upcall_portids() 345 vport_portids = kmalloc(sizeof(*vport_portids) + nla_len(ids), in ovs_vport_set_upcall_portids() 350 vport_portids->n_ids = nla_len(ids) / sizeof(u32); in ovs_vport_set_upcall_portids() 352 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()
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/include/net/ |
D | netlink.h | 1146 static inline int nla_len(const struct nlattr *nla) in nla_len() function 1148 return nla->nla_len - NLA_HDRLEN; in nla_len() 1159 nla->nla_len >= sizeof(*nla) && in nla_ok() 1160 nla->nla_len <= remaining; in nla_ok() 1173 unsigned int totlen = NLA_ALIGN(nla->nla_len); in nla_next() 1189 return nla_find(nla_data(nla), nla_len(nla), attrtype); in nla_find_nested() 1212 return __nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy, in nla_parse_nested() 1231 return __nla_parse(tb, maxtype, nla_data(nla), nla_len(nla), policy, in nla_parse_nested_deprecated() 1748 return kmemdup(nla_data(src), nla_len(src), gfp); in nla_memdup() 1800 start->nla_len = skb_tail_pointer(skb) - (unsigned char *)start; in nla_nest_end() [all …]
|
/kernel/linux/linux-5.10/net/wimax/ |
D | op-msg.c | 180 *size = nla_len(nla); in wimax_msg_data_len() 223 return nla_len(nla); in wimax_msg_len() 348 msg_len = nla_len(info->attrs[WIMAX_GNL_MSG_DATA]); in wimax_gnl_doit_msg_from_user() 354 size_t attr_len = nla_len(attr); in wimax_gnl_doit_msg_from_user()
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/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() 168 if (nla_len(opt) < sizeof(*msg)) in plug_change()
|
D | act_bpf.c | 111 memcpy(nla_data(nla), prog->bpf_ops, nla_len(nla)); in tcf_bpf_dump_bpf_info() 132 memcpy(nla_data(nla), prog->filter->tag, nla_len(nla)); in tcf_bpf_dump_ebpf_info() 199 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()
|
/kernel/linux/linux-5.10/net/wireless/ |
D | nl80211.c | 209 unsigned int len = nla_len(attr); in validate_beacon_head() 254 unsigned int len = nla_len(attr); in validate_ie_attr() 1166 k->p.key_len = nla_len(tb[NL80211_KEY_DATA]); in nl80211_parse_key_new() 1171 k->p.seq_len = nla_len(tb[NL80211_KEY_SEQ]); in nl80211_parse_key_new() 1205 k->p.key_len = nla_len(info->attrs[NL80211_ATTR_KEY_DATA]); in nl80211_parse_key_old() 1210 k->p.seq_len = nla_len(info->attrs[NL80211_ATTR_KEY_SEQ]); in nl80211_parse_key_old() 3781 nla_len(info->attrs[NL80211_ATTR_MESH_ID]); in nl80211_set_interface() 3892 nla_len(info->attrs[NL80211_ATTR_MESH_ID]); in nl80211_new_interface() 4332 if (nla_len(attr) != ETH_ALEN) in validate_acl_mac_addrs() 4682 nla_len(tb[NL80211_TXRATE_LEGACY])); in nl80211_parse_tx_bitrate_mask() [all …]
|
/kernel/linux/linux-5.10/drivers/block/drbd/ |
D | drbd_nla.c | 10 int len = nla_len(nla); in drbd_nla_check_mandatory()
|
/kernel/linux/linux-5.10/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 | 773 addr_len = nla_len(info->attrs[NLBL_UNLABEL_A_IPV4ADDR]); in netlbl_unlabel_addrinfo_get() 775 addr_len != nla_len(info->attrs[NLBL_UNLABEL_A_IPV4MASK])) in netlbl_unlabel_addrinfo_get() 782 addr_len = nla_len(info->attrs[NLBL_UNLABEL_A_IPV6ADDR]); in netlbl_unlabel_addrinfo_get() 784 addr_len != nla_len(info->attrs[NLBL_UNLABEL_A_IPV6MASK])) in netlbl_unlabel_addrinfo_get() 908 nla_len(info->attrs[NLBL_UNLABEL_A_SECCTX]), in netlbl_unlabel_staticadd() 957 nla_len(info->attrs[NLBL_UNLABEL_A_SECCTX]), in netlbl_unlabel_staticadddef()
|
/kernel/linux/linux-5.10/net/psample/ |
D | psample.c | 427 int nla_len = nla_total_size(data_len); in psample_sample_packet() local 430 nla = skb_put(nl_skb, nla_len); in psample_sample_packet() 432 nla->nla_len = nla_attr_size(data_len); in psample_sample_packet()
|
/kernel/linux/linux-5.10/drivers/net/wireless/ath/ath6kl/ |
D | testmode.c | 91 buf_len = nla_len(tb[ATH6KL_TM_ATTR_DATA]); in ath6kl_tm_cmd()
|
/kernel/linux/linux-5.10/net/ethtool/ |
D | netlink.h | 157 if (nla_len(attr) < len) in ethnl_update_binary() 158 len = nla_len(attr); in ethnl_update_binary()
|
/kernel/linux/linux-5.10/net/ipv4/ |
D | metrics.c | 41 if (nla_len(nla) != sizeof(u32)) { in ip_metrics_convert()
|