/linux/tools/accounting/ |
A 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()
|
/linux/net/xfrm/ |
A D | xfrm_compat.c | 243 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 249 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 258 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 277 return xfrm_nla_cpy(dst, src, nla_len(src)); in xfrm_xlate64_attr() 305 err = xfrm_nla_cpy(dst, nla, nla_len(nla)); in xfrm_xlate64() 415 nla->nla_len = nla_attr_size(payload); in xfrm_attr_cpy32() 417 nlmsg->nlmsg_len += nla->nla_len; in xfrm_attr_cpy32() 438 if (nla_len(nla) < compat_policy[type].len) { in xfrm_xlate32_attr() 448 if (nla_len(nla) != compat_policy[type].len) { in xfrm_xlate32_attr() 457 return xfrm_attr_cpy32(dst, pos, nla, size, nla_len(nla), nla_len(nla)); in xfrm_xlate32_attr() [all …]
|
/linux/lib/ |
A D | nlattr.c | 95 if (nla_len(entry) == 0) in nla_validate_array() 98 if (nla_len(entry) < NLA_HDRLEN) { in nla_validate_array() 185 value = nla_len(nla); in nla_validate_range_unsigned() 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() 727 size_t srclen = nla_len(nla); in nla_strscpy() 763 size_t srclen = nla_len(nla); in nla_strdup() 791 int minlen = min_t(int, count, nla_len(src)); in nla_memcpy() 810 int d = nla_len(nla) - size; in nla_memcmp() 828 int attrlen = nla_len(nla); in nla_strcmp() [all …]
|
/linux/net/openvswitch/ |
A D | flow_netlink.c | 535 nla_len(a)); in genev_tun_opt_from_nlattr() 596 type, nla_len(a), in vxlan_tun_opt_from_nlattr() 1311 mdlen = nla_len(a); in nsh_hdr_from_nlattr() 1318 mdlen = nla_len(a); in nsh_hdr_from_nlattr() 1407 nla_len(a), in nsh_key_put_from_nlattr() 1445 mdlen = nla_len(a); in nsh_key_put_from_nlattr() 1861 len = nla_len(attr); in get_ufid_len() 2461 if (!actions || (nla_len(actions) && nla_len(actions) < NLA_HDRLEN)) in validate_and_copy_sample() 2533 if (!actions || (nla_len(actions) && nla_len(actions) < NLA_HDRLEN)) { in validate_and_copy_dec_ttl() 2566 if (nla_len(attr) && nla_len(attr) < NLA_HDRLEN) in validate_and_copy_clone() [all …]
|
A 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()
|
A 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()
|
A D | conntrack.c | 1407 if (nla_len(a) != ovs_nat_attr_lens[type][ip_vers]) { in parse_nat() 1409 type, nla_len(a), in parse_nat() 1542 if (nla_len(a) < minlen || nla_len(a) > maxlen) { in parse_ct() 1545 type, nla_len(a), maxlen); in parse_ct() 1587 if (!memchr(*helper, '\0', nla_len(a))) { in parse_ct() 1607 memcpy(info->timeout, nla_data(a), nla_len(a)); in parse_ct() 1608 if (!memchr(info->timeout, '\0', nla_len(a))) { in parse_ct() 1957 rem = NLA_ALIGN(nla_len(nla_zone_limit)); in ovs_ct_limit_set_zone_limit() 2001 rem = NLA_ALIGN(nla_len(nla_zone_limit)); in ovs_ct_limit_del_zone_limit() 2068 rem = NLA_ALIGN(nla_len(nla_zone_limit)); in ovs_ct_limit_get_zone_limit()
|
/linux/tools/lib/bpf/ |
A 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()
|
A 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/tools/testing/selftests/nci/ |
A 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() 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() 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 248 &nla_type, &nla_data, &nla_len, NLM_F_REQUEST); in send_cmd_with_idx() 289 len += NLA_ALIGN(na->nla_len); in get_dev_enable_state() [all …]
|
/linux/net/ieee802154/ |
A 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/include/net/ |
A 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() 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() 1932 nla_for_each_attr(pos, nla_data(nla), nla_len(nla), rem) [all …]
|
/linux/drivers/net/wireguard/ |
A 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() 490 nla_len(attrs[WGPEER_A_PRESHARED_KEY])); in set_peer() 545 nla_len(info->attrs[WGDEVICE_A_PRIVATE_KEY]) == in wg_set_device() 603 nla_len(info->attrs[WGDEVICE_A_PRIVATE_KEY])); in wg_set_device()
|
/linux/net/sched/ |
A D | ematch.c | 175 int data_len = nla_len(nla) - sizeof(*em_hdr); in tcf_em_validate() 332 list_len = nla_len(rt_list); in tcf_em_tree_validate() 357 if (nla_len(rt_match) < sizeof(struct tcf_ematch_hdr)) in tcf_em_tree_validate() 476 match_start->nla_len = tail - (u8 *)match_start; in tcf_em_tree_dump()
|
A D | sch_plug.c | 138 if (nla_len(opt) < sizeof(*ctl)) in plug_init() 168 if (nla_len(opt) < sizeof(*msg)) in plug_change()
|
A D | act_bpf.c | 109 memcpy(nla_data(nla), prog->bpf_ops, nla_len(nla)); in tcf_bpf_dump_bpf_info() 130 memcpy(nla_data(nla), prog->filter->tag, nla_len(nla)); in tcf_bpf_dump_ebpf_info() 197 if (bpf_size != nla_len(tb[TCA_ACT_BPF_OPS])) in tcf_bpf_init_from_ops()
|
A 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/net/wireless/ |
A 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() 4535 if (nla_len(attr) != ETH_ALEN) in validate_acl_mac_addrs() 4898 nla_len(tb[NL80211_TXRATE_HT]), in nl80211_parse_tx_bitrate_mask() 7824 setup->ie_len = nla_len(ieattr); in nl80211_parse_mesh_setup() 8267 if (!nla_ok(nest, nla_len(nest))) in parse_bss_select() 8642 nla_len(attr), in nl80211_trigger_scan() 9063 nla_len(attr)); in nl80211_parse_sched_scan() 9103 nla_len(ssid); in nl80211_parse_sched_scan() 13351 len += nla_len(attr); in validate_nan_filter() [all …]
|
/linux/net/netlabel/ |
A 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()
|
A 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/drivers/block/drbd/ |
A D | drbd_nla.c | 10 int len = nla_len(nla); in drbd_nla_check_mandatory()
|
/linux/net/ethtool/ |
A D | netlink.h | 157 if (nla_len(attr) < len) in ethnl_update_binary() 158 len = nla_len(attr); in ethnl_update_binary()
|
/linux/net/psample/ |
A D | psample.c | 466 int nla_len = nla_total_size(data_len); in psample_sample_packet() local 469 nla = skb_put(nl_skb, nla_len); in psample_sample_packet() 471 nla->nla_len = nla_attr_size(data_len); in psample_sample_packet()
|
/linux/drivers/net/wireless/ath/ath6kl/ |
A D | testmode.c | 91 buf_len = nla_len(tb[ATH6KL_TM_ATTR_DATA]); in ath6kl_tm_cmd()
|
/linux/net/netfilter/ |
A D | nft_log.c | 166 priv->prefix = kmalloc(nla_len(nla) + 1, GFP_KERNEL); in nft_log_init() 169 nla_strscpy(priv->prefix, nla, nla_len(nla) + 1); in nft_log_init()
|