Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 870) sorted by relevance

12345678910>>...35

/net/sunrpc/
Dxdr.c31 unsigned int quadlen = XDR_QUADLEN(obj->len); in xdr_encode_netobj()
34 *p++ = cpu_to_be32(obj->len); in xdr_encode_netobj()
35 memcpy(p, obj->data, obj->len); in xdr_encode_netobj()
36 return p + XDR_QUADLEN(obj->len); in xdr_encode_netobj()
43 unsigned int len; in xdr_decode_netobj() local
45 if ((len = be32_to_cpu(*p++)) > XDR_MAX_NETOBJ) in xdr_decode_netobj()
47 obj->len = len; in xdr_decode_netobj()
49 return p + XDR_QUADLEN(len); in xdr_decode_netobj()
109 u32 len; in xdr_decode_string_inplace() local
111 len = be32_to_cpu(*p++); in xdr_decode_string_inplace()
[all …]
Dsocklib.c35 size_t len);
47 xdr_skb_read_bits(struct xdr_skb_reader *desc, void *to, size_t len) in xdr_skb_read_bits() argument
49 if (len > desc->count) in xdr_skb_read_bits()
50 len = desc->count; in xdr_skb_read_bits()
51 if (unlikely(skb_copy_bits(desc->skb, desc->offset, to, len))) in xdr_skb_read_bits()
53 desc->count -= len; in xdr_skb_read_bits()
54 desc->offset += len; in xdr_skb_read_bits()
55 return len; in xdr_skb_read_bits()
66 static size_t xdr_skb_read_and_csum_bits(struct xdr_skb_reader *desc, void *to, size_t len) in xdr_skb_read_and_csum_bits() argument
71 if (len > desc->count) in xdr_skb_read_and_csum_bits()
[all …]
/net/dccp/
Doptions.c22 u64 dccp_decode_value_var(const u8 *bf, const u8 len) in dccp_decode_value_var() argument
26 if (len >= DCCP_OPTVAL_MAXLEN) in dccp_decode_value_var()
28 if (len > 4) in dccp_decode_value_var()
30 if (len > 3) in dccp_decode_value_var()
32 if (len > 2) in dccp_decode_value_var()
34 if (len > 1) in dccp_decode_value_var()
36 if (len > 0) in dccp_decode_value_var()
59 unsigned char opt, len; in dccp_parse_options() local
68 opt = len = 0; in dccp_parse_options()
71 len = 0; in dccp_parse_options()
[all …]
/net/caif/
Dcfpkt_skbuff.c79 static struct cfpkt *cfpkt_create_pfx(u16 len, u16 pfx) in cfpkt_create_pfx() argument
83 skb = alloc_skb(len + pfx, GFP_ATOMIC); in cfpkt_create_pfx()
91 inline struct cfpkt *cfpkt_create(u16 len) in cfpkt_create() argument
93 return cfpkt_create_pfx(len + PKT_POSTFIX, PKT_PREFIX); in cfpkt_create()
105 return skb->len > 0; in cfpkt_more()
108 int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len) in cfpkt_peek_head() argument
111 if (skb_headlen(skb) >= len) { in cfpkt_peek_head()
112 memcpy(data, skb->data, len); in cfpkt_peek_head()
115 return !cfpkt_extr_head(pkt, data, len) && in cfpkt_peek_head()
116 !cfpkt_add_head(pkt, data, len); in cfpkt_peek_head()
[all …]
/net/sunrpc/auth_gss/
Dgss_krb5_keys.c163 if (inkey->len != keylength) in krb5_DK()
170 if (crypto_sync_skcipher_setkey(cipher, inkey->data, inkey->len)) in krb5_DK()
183 inblock.len = blocksize; in krb5_DK()
186 outblock.len = blocksize; in krb5_DK()
190 if (in_constant->len == inblock.len) { in krb5_DK()
191 memcpy(inblock.data, in_constant->data, inblock.len); in krb5_DK()
193 krb5_nfold(in_constant->len * 8, in_constant->data, in krb5_DK()
194 inblock.len * 8, inblock.data); in krb5_DK()
202 inblock.len); in krb5_DK()
204 if ((keybytes - n) <= outblock.len) { in krb5_DK()
[all …]
Dgss_krb5_test.c55 derivedkey.data = kunit_kzalloc(test, param->expected_result->len, in kdf_case()
58 derivedkey.len = param->expected_result->len; in kdf_case()
68 derivedkey.data, derivedkey.len), 0, in kdf_case()
76 .head[0].iov_len = param->plaintext->len, in checksum_case()
77 .len = param->plaintext->len, in checksum_case()
89 Kc.len = gk5e->Kc_length; in checksum_case()
90 Kc.data = kunit_kzalloc(test, Kc.len, GFP_KERNEL); in checksum_case()
98 err = crypto_ahash_setkey(tfm, Kc.data, Kc.len); in checksum_case()
105 checksum.len = gk5e->cksumlength; in checksum_case()
106 checksum.data = kunit_kzalloc(test, checksum.len, GFP_KERNEL); in checksum_case()
[all …]
Dsvcauth_gss.c92 return a->len == b->len && 0 == memcmp(a->data, b->data, a->len); in netobj_equal()
134 return hash_mem(item->in_handle.data, item->in_handle.len, RSI_HASHBITS) in rsi_hash()
135 ^ hash_mem(item->in_token.data, item->in_token.len, RSI_HASHBITS); in rsi_hash()
146 static int dup_to_netobj(struct xdr_netobj *dst, char *src, int len) in dup_to_netobj() argument
148 dst->len = len; in dup_to_netobj()
149 dst->data = (len ? kmemdup(src, len, GFP_KERNEL) : NULL); in dup_to_netobj()
150 if (len && !dst->data) in dup_to_netobj()
157 return dup_to_netobj(dst, src->data, src->len); in dup_netobj()
166 new->out_handle.len = 0; in rsi_init()
168 new->out_token.len = 0; in rsi_init()
[all …]
/net/core/
Dpktgen.c844 long len; in get_imix_entries() local
853 len = num_arg(&buffer[i], max_digits, &size); in get_imix_entries()
854 if (len < 0) in get_imix_entries()
855 return len; in get_imix_entries()
856 i += len; in get_imix_entries()
867 len = num_arg(&buffer[i], max_digits, &weight); in get_imix_entries()
868 if (len < 0) in get_imix_entries()
869 return len; in get_imix_entries()
876 i += len; in get_imix_entries()
895 int len; in get_labels() local
[all …]
Dskbuff.c191 msg, addr, skb->len, sz, skb->head, skb->data, in skb_panic()
704 struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int len, in __netdev_alloc_skb() argument
712 len += NET_SKB_PAD; in __netdev_alloc_skb()
717 if (len <= SKB_WITH_OVERHEAD(1024) || in __netdev_alloc_skb()
718 len > SKB_WITH_OVERHEAD(PAGE_SIZE) || in __netdev_alloc_skb()
720 skb = __alloc_skb(len, gfp_mask, SKB_ALLOC_RX, NUMA_NO_NODE); in __netdev_alloc_skb()
726 len = SKB_HEAD_ALIGN(len); in __netdev_alloc_skb()
733 data = page_frag_alloc(nc, len, gfp_mask); in __netdev_alloc_skb()
738 data = page_frag_alloc(nc, len, gfp_mask); in __netdev_alloc_skb()
746 skb = __build_skb(data, len); in __netdev_alloc_skb()
[all …]
Ddatagram.c183 if (peek_at_off && _off >= skb->len && in __skb_try_recv_from_queue()
185 _off -= skb->len; in __skb_try_recv_from_queue()
188 if (!skb->len) { in __skb_try_recv_from_queue()
326 void __skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb, int len) in __skb_free_datagram_locked() argument
331 sk_peek_offset_bwd(sk, len); in __skb_free_datagram_locked()
336 sk_peek_offset_bwd(sk, len); in __skb_free_datagram_locked()
407 struct iov_iter *to, int len, bool fault_short, in __skb_datagram_iter() argument
417 if (copy > len) in __skb_datagram_iter()
418 copy = len; in __skb_datagram_iter()
424 if ((len -= copy) == 0) in __skb_datagram_iter()
[all …]
/net/sctp/
Dtsnmap.c31 __u16 len, __u16 *start, __u16 *end);
35 struct sctp_tsnmap *sctp_tsnmap_init(struct sctp_tsnmap *map, __u16 len, in sctp_tsnmap_init() argument
39 map->tsn_map = kzalloc(len>>3, gfp); in sctp_tsnmap_init()
43 map->len = len; in sctp_tsnmap_init()
45 bitmap_zero(map->tsn_map, map->len); in sctp_tsnmap_init()
59 map->len = 0; in sctp_tsnmap_free()
87 if (gap < map->len && test_bit(gap, map->tsn_map)) in sctp_tsnmap_check()
105 if (gap >= map->len && !sctp_tsnmap_grow(map, gap + 1)) in sctp_tsnmap_mark()
164 sctp_tsnmap_find_gap_ack(map->tsn_map, offset, map->len, in sctp_tsnmap_next_gap_ack()
169 end_ = map->len - 1; in sctp_tsnmap_next_gap_ack()
[all …]
Dsocket.c82 union sctp_addr *addr, int len);
210 int len) in sctp_verify_addr() argument
215 af = sctp_sockaddr_af(sctp_sk(sk), addr, len); in sctp_verify_addr()
333 union sctp_addr *addr, int len) in sctp_sockaddr_af() argument
338 if (len < sizeof (struct sockaddr)) in sctp_sockaddr_af()
345 if (len < SIN6_LEN_RFC2133) in sctp_sockaddr_af()
356 if (len < af->sockaddr_len) in sctp_sockaddr_af()
375 static int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len) in sctp_do_bind() argument
386 af = sctp_sockaddr_af(sp, addr, len); in sctp_do_bind()
389 __func__, sk, addr, len); in sctp_do_bind()
[all …]
/net/netfilter/
Dnf_conntrack_h323_asn1.c298 int len; in decode_oid() local
306 len = *bs->cur++; in decode_oid()
307 bs->cur += len; in decode_oid()
317 unsigned int len; in decode_int() local
333 len = get_bits(bs, 2) + 1; in decode_int()
336 unsigned int v = get_uint(bs, len) + f->lb; in decode_int()
340 bs->cur += len; in decode_int()
346 len = get_len(bs); in decode_int()
347 bs->cur += len; in decode_int()
380 unsigned int len; in decode_bitstr() local
[all …]
Dnft_cmp.c22 u8 len; member
33 d = memcmp(&regs->data[priv->sreg], &priv->data, priv->len); in nft_cmp_eval()
86 err = nft_parse_register_load(tb[NFTA_CMP_SREG], &priv->sreg, desc.len); in nft_cmp_init()
91 priv->len = desc.len; in nft_cmp_init()
106 NFT_DATA_VALUE, priv->len) < 0) in nft_cmp_dump()
121 const u8 *val, u32 len) in nft_payload_n2h() argument
123 switch (len) { in nft_payload_n2h()
149 if (priv->op != NFT_CMP_EQ || priv->len > reg->len) in __nft_cmp_offload()
153 nft_payload_n2h(&_data, (u8 *)&priv->data, reg->len); in __nft_cmp_offload()
154 nft_payload_n2h(&_datamask, (u8 *)&reg->mask, reg->len); in __nft_cmp_offload()
[all …]
Dutils.c23 skb->len - dataoff, protocol, in nf_ip_checksum()
34 skb->len - dataoff, in nf_ip_checksum()
44 unsigned int dataoff, unsigned int len, in nf_ip_checksum_partial() argument
52 if (len == skb->len - dataoff) in nf_ip_checksum_partial()
57 skb->len - dataoff, 0); in nf_ip_checksum_partial()
59 return __skb_checksum_complete_head(skb, dataoff + len); in nf_ip_checksum_partial()
75 skb->len - dataoff, protocol, in nf_ip6_checksum()
86 skb->len - dataoff, in nf_ip6_checksum()
98 unsigned int dataoff, unsigned int len, in nf_ip6_checksum_partial() argument
107 if (len == skb->len - dataoff) in nf_ip6_checksum_partial()
[all …]
Dnf_conntrack_amanda.c60 size_t len; member
65 .len = 8,
69 .len = 1,
73 .len = 5,
77 .len = 5,
81 .len = 6,
85 .len = 6,
98 u_int16_t len; in amanda_help() local
113 if (dataoff >= skb->len) { in amanda_help()
114 net_err_ratelimited("amanda_help: skblen = %u\n", skb->len); in amanda_help()
[all …]
Dnft_payload.c43 nft_payload_copy_vlan(u32 *d, const struct sk_buff *skb, u8 offset, u8 len) in nft_payload_copy_vlan() argument
51 u8 ethlen = len; in nft_payload_copy_vlan()
56 if (offset + len > VLAN_ETH_HLEN) in nft_payload_copy_vlan()
57 ethlen -= offset + len - VLAN_ETH_HLEN; in nft_payload_copy_vlan()
61 len -= ethlen; in nft_payload_copy_vlan()
62 if (len == 0) in nft_payload_copy_vlan()
71 return skb_copy_bits(skb, offset + mac_off, dst_u8, len) == 0; in nft_payload_copy_vlan()
148 static bool nft_payload_need_vlan_adjust(u32 offset, u32 len) in nft_payload_need_vlan_adjust() argument
150 unsigned int boundary = offset + len; in nft_payload_need_vlan_adjust()
168 if (priv->len % NFT_REG32_SIZE) in nft_payload_eval()
[all …]
/net/tls/
Dtls_strp.c42 int offset, int len) in tls_strp_skb_copy() argument
47 skb = alloc_skb_with_frags(0, len, TLS_PAGE_ORDER, in tls_strp_skb_copy()
61 skb->len = len; in tls_strp_skb_copy()
62 skb->data_len = len; in tls_strp_skb_copy()
162 int chunk, len, offset; in tls_strp_msg_hold() local
165 len = strp->stm.full_len; in tls_strp_msg_hold()
168 while (len > 0) { in tls_strp_msg_hold()
169 if (iter->len <= offset) { in tls_strp_msg_hold()
170 offset -= iter->len; in tls_strp_msg_hold()
174 chunk = iter->len - offset; in tls_strp_msg_hold()
[all …]
/net/rose/
Drose_subr.c106 int len, faclen; in rose_write_internal() local
110 len = ROSE_MIN_LEN; in rose_write_internal()
114 len += 1 + ROSE_ADDR_LEN + ROSE_ADDR_LEN; in rose_write_internal()
120 len += 2; in rose_write_internal()
124 skb = alloc_skb(reserve + len + maxfaclen, GFP_ATOMIC); in rose_write_internal()
133 dptr = skb_put(skb, len); in rose_write_internal()
239 static int rose_parse_national(unsigned char *p, struct rose_facilities_struct *facilities, int len) in rose_parse_national() argument
248 if (len < 2) in rose_parse_national()
252 len -= 2; in rose_parse_national()
256 if (len < 3) in rose_parse_national()
[all …]
/net/bridge/
Dbr_sysfs_br.c32 const char *buf, size_t len, in store_bridge_parm() argument
62 return err ? err : len; in store_bridge_parm()
81 const char *buf, size_t len) in forward_delay_store() argument
83 return store_bridge_parm(d, buf, len, set_forward_delay); in forward_delay_store()
102 size_t len) in hello_time_store() argument
104 return store_bridge_parm(d, buf, len, set_hello_time); in hello_time_store()
122 const char *buf, size_t len) in max_age_store() argument
124 return store_bridge_parm(d, buf, len, set_max_age); in max_age_store()
143 const char *buf, size_t len) in ageing_time_store() argument
145 return store_bridge_parm(d, buf, len, set_ageing_time); in ageing_time_store()
[all …]
/net/mac80211/
Dfils_aead.c26 size_t num_elem, const u8 *addr[], size_t len[], u8 *v) in aes_s2v() argument
40 crypto_shash_digest(desc, addr[i], len[i], tmp); in aes_s2v()
46 if (len[i] >= AES_BLOCK_SIZE) { in aes_s2v()
49 crypto_shash_update(desc, addr[i], len[i] - AES_BLOCK_SIZE); in aes_s2v()
50 crypto_xor(d, addr[i] + len[i] - AES_BLOCK_SIZE, in aes_s2v()
56 crypto_xor(d, addr[i], len[i]); in aes_s2v()
57 d[len[i]] ^= 0x80; in aes_s2v()
69 size_t len[], u8 *out) in aes_siv_encrypt() argument
82 len[num_elem] = plain_len; in aes_siv_encrypt()
93 res = aes_s2v(tfm, num_elem, addr, len, v); in aes_siv_encrypt()
[all …]
/net/bluetooth/
Dhci_codec.c13 __u32 len) in hci_codec_list_add() argument
17 entry = kzalloc(sizeof(*entry) + len, GFP_KERNEL); in hci_codec_list_add()
27 entry->len = len; in hci_codec_list_add()
31 memcpy(entry->caps, caps, len); in hci_codec_list_add()
60 __u32 len; in hci_read_codec_capabilities() local
83 if (skb->len < sizeof(*rp)) in hci_read_codec_capabilities()
92 len = 0; in hci_read_codec_capabilities()
99 for (j = 0, len = 0; j < rp->num_caps; j++) { in hci_read_codec_capabilities()
101 if (skb->len < sizeof(*caps)) in hci_read_codec_capabilities()
103 if (skb->len < caps->len) in hci_read_codec_capabilities()
[all …]
/net/bluetooth/cmtp/
Dcore.c114 size = (skb) ? skb->len + count : count; in cmtp_add_msgpart()
122 if (skb && (skb->len > 0)) in cmtp_add_msgpart()
123 skb_copy_from_linear_data(skb, skb_put(nskb, skb->len), skb->len); in cmtp_add_msgpart()
135 __u16 len; in cmtp_recv_frame() local
137 BT_DBG("session %p skb %p len %d", session, skb, skb->len); in cmtp_recv_frame()
139 while (skb->len > 0) { in cmtp_recv_frame()
145 len = skb->data[1]; in cmtp_recv_frame()
149 len = skb->data[1] | (skb->data[2] << 8); in cmtp_recv_frame()
153 len = 0; in cmtp_recv_frame()
159 BT_DBG("hdr 0x%02x hdrlen %d len %d id %d", hdr, hdrlen, len, id); in cmtp_recv_frame()
[all …]
/net/xfrm/
Dxfrm_compat.c101 [XFRMA_SA] = { .len = XMSGSIZE(compat_xfrm_usersa_info)},
102 [XFRMA_POLICY] = { .len = XMSGSIZE(compat_xfrm_userpolicy_info)},
104 [XFRMA_ALG_AUTH_TRUNC] = { .len = sizeof(struct xfrm_algo_auth)},
105 [XFRMA_ALG_AEAD] = { .len = sizeof(struct xfrm_algo_aead) },
106 [XFRMA_ALG_AUTH] = { .len = sizeof(struct xfrm_algo) },
107 [XFRMA_ALG_CRYPT] = { .len = sizeof(struct xfrm_algo) },
108 [XFRMA_ALG_COMP] = { .len = sizeof(struct xfrm_algo) },
109 [XFRMA_ENCAP] = { .len = sizeof(struct xfrm_encap_tmpl) },
110 [XFRMA_TMPL] = { .len = sizeof(struct xfrm_user_tmpl) },
111 [XFRMA_SEC_CTX] = { .len = sizeof(struct xfrm_user_sec_ctx) },
[all …]
/net/x25/
Dx25_facilities.c45 unsigned int len; in x25_parse_facilities() local
63 len = skb->data[0]; in x25_parse_facilities()
65 if (!pskb_may_pull(skb, 1 + len)) in x25_parse_facilities()
70 while (len > 0) { in x25_parse_facilities()
73 if (len < 2) in x25_parse_facilities()
115 len -= 2; in x25_parse_facilities()
118 if (len < 3) in x25_parse_facilities()
138 len -= 3; in x25_parse_facilities()
141 if (len < 4) in x25_parse_facilities()
147 len -= 4; in x25_parse_facilities()
[all …]

12345678910>>...35