Home
last modified time | relevance | path

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

12345678910>>...28

/net/dccp/
Doptions.c26 u64 dccp_decode_value_var(const u8 *bf, const u8 len) in dccp_decode_value_var() argument
30 if (len >= DCCP_OPTVAL_MAXLEN) in dccp_decode_value_var()
32 if (len > 4) in dccp_decode_value_var()
34 if (len > 3) in dccp_decode_value_var()
36 if (len > 2) in dccp_decode_value_var()
38 if (len > 1) in dccp_decode_value_var()
40 if (len > 0) in dccp_decode_value_var()
62 unsigned char opt, len; in dccp_parse_options() local
71 opt = len = 0; in dccp_parse_options()
74 len = 0; in dccp_parse_options()
[all …]
/net/sunrpc/
Dxdr.c25 unsigned int quadlen = XDR_QUADLEN(obj->len); in xdr_encode_netobj()
28 *p++ = cpu_to_be32(obj->len); in xdr_encode_netobj()
29 memcpy(p, obj->data, obj->len); in xdr_encode_netobj()
30 return p + XDR_QUADLEN(obj->len); in xdr_encode_netobj()
37 unsigned int len; in xdr_decode_netobj() local
39 if ((len = be32_to_cpu(*p++)) > XDR_MAX_NETOBJ) in xdr_decode_netobj()
41 obj->len = len; in xdr_decode_netobj()
43 return p + XDR_QUADLEN(len); in xdr_decode_netobj()
103 u32 len; in xdr_decode_string_inplace() local
105 len = be32_to_cpu(*p++); in xdr_decode_string_inplace()
[all …]
Dsocklib.c29 size_t xdr_skb_read_bits(struct xdr_skb_reader *desc, void *to, size_t len) in xdr_skb_read_bits() argument
31 if (len > desc->count) in xdr_skb_read_bits()
32 len = desc->count; in xdr_skb_read_bits()
33 if (unlikely(skb_copy_bits(desc->skb, desc->offset, to, len))) in xdr_skb_read_bits()
35 desc->count -= len; in xdr_skb_read_bits()
36 desc->offset += len; in xdr_skb_read_bits()
37 return len; in xdr_skb_read_bits()
49 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
54 if (len > desc->count) in xdr_skb_read_and_csum_bits()
55 len = desc->count; in xdr_skb_read_and_csum_bits()
[all …]
Dsvcsock.c186 int len = 0; in svc_send_common() local
188 slen = xdr->len; in svc_send_common()
193 len = kernel_sendpage(sock, headpage, headoffset, in svc_send_common()
195 if (len != xdr->head[0].iov_len) in svc_send_common()
208 len += result; in svc_send_common()
223 len += result; in svc_send_common()
227 return len; in svc_send_common()
244 int len = 0; in svc_sendto() local
266 len = svc_send_common(sock, xdr, rqstp->rq_respages[0], headoff, in svc_sendto()
272 xdr->len, len, svc_print_addr(rqstp, buf, sizeof(buf))); in svc_sendto()
[all …]
/net/caif/
Dcfpkt_skbuff.c80 static struct cfpkt *cfpkt_create_pfx(u16 len, u16 pfx) in cfpkt_create_pfx() argument
84 skb = alloc_skb(len + pfx, GFP_ATOMIC); in cfpkt_create_pfx()
92 inline struct cfpkt *cfpkt_create(u16 len) in cfpkt_create() argument
94 return cfpkt_create_pfx(len + PKT_POSTFIX, PKT_PREFIX); in cfpkt_create()
106 return skb->len > 0; in cfpkt_more()
109 int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len) in cfpkt_peek_head() argument
112 if (skb_headlen(skb) >= len) { in cfpkt_peek_head()
113 memcpy(data, skb->data, len); in cfpkt_peek_head()
116 return !cfpkt_extr_head(pkt, data, len) && in cfpkt_peek_head()
117 !cfpkt_add_head(pkt, data, len); in cfpkt_peek_head()
[all …]
/net/core/
Ddatagram.c225 if (_off >= skb->len && (skb->len || _off || in __skb_recv_datagram()
227 _off -= skb->len; in __skb_recv_datagram()
357 struct iovec *to, int len) in skb_copy_datagram_iovec() argument
363 trace_skb_copy_datagram_iovec(skb, len); in skb_copy_datagram_iovec()
367 if (copy > len) in skb_copy_datagram_iovec()
368 copy = len; in skb_copy_datagram_iovec()
371 if ((len -= copy) == 0) in skb_copy_datagram_iovec()
381 WARN_ON(start > offset + len); in skb_copy_datagram_iovec()
389 if (copy > len) in skb_copy_datagram_iovec()
390 copy = len; in skb_copy_datagram_iovec()
[all …]
Dskbuff.c99 msg, addr, skb->len, sz, skb->head, skb->data, in skb_panic()
478 skb->len += size; in skb_add_rx_frag()
490 skb->len += size; in skb_coalesce_rx_frag()
776 C(len); in __skb_clone()
981 skb_put(n, skb->len); in skb_copy()
983 if (skb_copy_bits(skb, -headerlen, n->head, headerlen + skb->len)) in skb_copy()
1023 skb_copy_from_linear_data(skb, n->data, n->len); in __pskb_copy_fclone()
1027 n->len = skb->len; in __pskb_copy_fclone()
1194 struct sk_buff *n = __alloc_skb(newheadroom + skb->len + newtailroom, in skb_copy_expand()
1206 skb_put(n, skb->len); in skb_copy_expand()
[all …]
Dpktgen.c828 int len; in get_labels() local
833 len = hex32_arg(&buffer[i], 8, &tmp); in get_labels()
834 if (len <= 0) in get_labels()
835 return len; in get_labels()
839 i += len; in get_labels()
858 int i, max, len; in pktgen_if_write() local
882 len = strn_len(&user_buffer[i], sizeof(name) - 1); in pktgen_if_write()
883 if (len < 0) in pktgen_if_write()
884 return len; in pktgen_if_write()
887 if (copy_from_user(name, &user_buffer[i], len)) in pktgen_if_write()
[all …]
Diovec.c65 size_t len = iov[ct].iov_len; in verify_iovec() local
67 if (len > INT_MAX - err) { in verify_iovec()
68 len = INT_MAX - err; in verify_iovec()
69 iov[ct].iov_len = len; in verify_iovec()
71 err += len; in verify_iovec()
86 int offset, unsigned int len, __wsum *csump) in csum_partial_copy_fromiovecend() argument
97 while (len > 0) { in csum_partial_copy_fromiovecend()
99 int copy = min_t(unsigned int, len, iov->iov_len - offset); in csum_partial_copy_fromiovecend()
114 len -= copy; in csum_partial_copy_fromiovecend()
116 if (len) in csum_partial_copy_fromiovecend()
[all …]
/net/sunrpc/auth_gss/
Dgss_krb5_keys.c157 if ((inkey->len != keylength) || (outkey->len != keylength)) in krb5_derive_key()
164 if (crypto_blkcipher_setkey(cipher, inkey->data, inkey->len)) in krb5_derive_key()
183 inblock.len = blocksize; in krb5_derive_key()
186 outblock.len = blocksize; in krb5_derive_key()
190 if (in_constant->len == inblock.len) { in krb5_derive_key()
191 memcpy(inblock.data, in_constant->data, inblock.len); in krb5_derive_key()
193 krb5_nfold(in_constant->len * 8, in_constant->data, in krb5_derive_key()
194 inblock.len * 8, inblock.data); in krb5_derive_key()
202 outblock.data, inblock.len); in krb5_derive_key()
204 if ((keybytes - n) <= outblock.len) { in krb5_derive_key()
[all …]
Dsvcauth_gss.c68 return a->len == b->len && 0 == memcmp(a->data, b->data, a->len); in netobj_equal()
101 return hash_mem(item->in_handle.data, item->in_handle.len, RSI_HASHBITS) in rsi_hash()
102 ^ hash_mem(item->in_token.data, item->in_token.len, RSI_HASHBITS); in rsi_hash()
113 static int dup_to_netobj(struct xdr_netobj *dst, char *src, int len) in dup_to_netobj() argument
115 dst->len = len; in dup_to_netobj()
116 dst->data = (len ? kmemdup(src, len, GFP_KERNEL) : NULL); in dup_to_netobj()
117 if (len && !dst->data) in dup_to_netobj()
124 return dup_to_netobj(dst, src->data, src->len); in dup_netobj()
133 new->out_handle.len = 0; in rsi_init()
135 new->out_token.len = 0; in rsi_init()
[all …]
/net/sctp/
Dtsnmap.c46 __u16 len, __u16 *start, __u16 *end);
50 struct sctp_tsnmap *sctp_tsnmap_init(struct sctp_tsnmap *map, __u16 len, in sctp_tsnmap_init() argument
54 map->tsn_map = kzalloc(len>>3, gfp); in sctp_tsnmap_init()
58 map->len = len; in sctp_tsnmap_init()
60 bitmap_zero(map->tsn_map, map->len); in sctp_tsnmap_init()
74 map->len = 0; in sctp_tsnmap_free()
102 if (gap < map->len && test_bit(gap, map->tsn_map)) in sctp_tsnmap_check()
120 if (gap >= map->len && !sctp_tsnmap_grow(map, gap + 1)) in sctp_tsnmap_mark()
179 sctp_tsnmap_find_gap_ack(map->tsn_map, offset, map->len, in sctp_tsnmap_next_gap_ack()
184 end_ = map->len - 1; in sctp_tsnmap_next_gap_ack()
[all …]
/net/netfilter/
Dnf_conntrack_h323_asn1.c291 int len; in decode_oid() local
297 len = *bs->cur++; in decode_oid()
298 bs->cur += len; in decode_oid()
308 unsigned int len; in decode_int() local
322 len = get_bits(bs, 2) + 1; in decode_int()
325 unsigned int v = get_uint(bs, len) + f->lb; in decode_int()
329 bs->cur += len; in decode_int()
334 len = get_len(bs); in decode_int()
335 bs->cur += len; in decode_int()
368 unsigned int len; in decode_bitstr() local
[all …]
Dnf_conntrack_amanda.c61 size_t len; member
66 .len = 8,
70 .len = 1,
74 .len = 5,
78 .len = 5,
82 .len = 6,
96 u_int16_t len; in amanda_help() local
111 if (dataoff >= skb->len) { in amanda_help()
112 net_err_ratelimited("amanda_help: skblen = %u\n", skb->len); in amanda_help()
117 start = skb_find_text(skb, dataoff, skb->len, in amanda_help()
[all …]
/net/rose/
Drose_subr.c109 int len, faclen = 0; in rose_write_internal() local
111 len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN + 1; in rose_write_internal()
115 len += 1 + ROSE_ADDR_LEN + ROSE_ADDR_LEN; in rose_write_internal()
117 len += faclen; in rose_write_internal()
122 len += 2; in rose_write_internal()
126 if ((skb = alloc_skb(len, GFP_ATOMIC)) == NULL) 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/ipv4/netfilter/
Dnf_nat_snmp_basic.c149 unsigned int len; member
154 unsigned int len) in asn1_open() argument
157 ctx->end = buf + len; in asn1_open()
211 unsigned int *len) in asn1_length_decode() argument
224 *len = ch; in asn1_length_decode()
227 *len = 0; in asn1_length_decode()
232 *len <<= 8; in asn1_length_decode()
233 *len |= ch; in asn1_length_decode()
240 if (*len > ctx->end - ctx->pointer) in asn1_length_decode()
252 unsigned int def, len; in asn1_header_decode() local
[all …]
/net/bridge/
Dbr_sysfs_br.c32 const char *buf, size_t len, in store_bridge_parm() argument
48 return err ? err : len; in store_bridge_parm()
61 const char *buf, size_t len) in forward_delay_store() argument
63 return store_bridge_parm(d, buf, len, br_set_forward_delay); in forward_delay_store()
76 size_t len) in hello_time_store() argument
78 return store_bridge_parm(d, buf, len, br_set_hello_time); in hello_time_store()
90 const char *buf, size_t len) in max_age_store() argument
92 return store_bridge_parm(d, buf, len, br_set_max_age); in max_age_store()
111 const char *buf, size_t len) in ageing_time_store() argument
113 return store_bridge_parm(d, buf, len, set_ageing_time); in ageing_time_store()
[all …]
/net/bluetooth/
Da2mp.c27 static struct a2mp_cmd *__a2mp_build(u8 code, u8 ident, u16 len, void *data) in __a2mp_build() argument
32 plen = sizeof(*cmd) + len; in __a2mp_build()
39 cmd->len = cpu_to_le16(len); in __a2mp_build()
41 memcpy(cmd->data, data, len); in __a2mp_build()
46 void a2mp_send(struct amp_mgr *mgr, u8 code, u8 ident, u16 len, void *data) in a2mp_send() argument
50 u16 total_len = len + sizeof(*cmd); in a2mp_send()
54 cmd = __a2mp_build(code, ident, len, data); in a2mp_send()
108 if (le16_to_cpu(hdr->len) < sizeof(*rej)) in a2mp_command_rej()
122 u16 len = le16_to_cpu(hdr->len); in a2mp_discover_req() local
128 if (len < sizeof(*req)) in a2mp_discover_req()
[all …]
/net/ipv4/
Dxfrm4_input.c52 iph->tot_len = htons(skb->len); in xfrm4_transport_finish()
72 int iphlen, len; in xfrm4_udp_encap_rcv() local
84 len = skb->len - sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
85 if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) in xfrm4_udp_encap_rcv()
97 if (len == 1 && udpdata[0] == 0xff) { in xfrm4_udp_encap_rcv()
99 } else if (len > sizeof(struct ip_esp_hdr) && udpdata32[0] != 0) { in xfrm4_udp_encap_rcv()
101 len = sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
108 if (len == 1 && udpdata[0] == 0xff) { in xfrm4_udp_encap_rcv()
110 } else if (len > 2 * sizeof(u32) + sizeof(struct ip_esp_hdr) && in xfrm4_udp_encap_rcv()
114 len = sizeof(struct udphdr) + 2 * sizeof(u32); in xfrm4_udp_encap_rcv()
[all …]
/net/ceph/
Dosdmap.c14 char *ceph_osdmap_state_str(char *str, int len, int state) in ceph_osdmap_state_str() argument
16 if (!len) in ceph_osdmap_state_str()
20 snprintf(str, len, "exists, up"); in ceph_osdmap_state_str()
22 snprintf(str, len, "exists"); in ceph_osdmap_state_str()
24 snprintf(str, len, "up"); in ceph_osdmap_state_str()
26 snprintf(str, len, "doesn't exist"); in ceph_osdmap_state_str()
127 int len; in skip_name_map() local
128 ceph_decode_32_safe(p, end, len ,bad); in skip_name_map()
129 while (len--) { in skip_name_map()
298 r->len = yes; in crush_decode()
[all …]
/net/x25/
Dx25_facilities.c50 unsigned int len; in x25_parse_facilities() local
68 len = skb->data[0]; in x25_parse_facilities()
70 if (!pskb_may_pull(skb, 1 + len)) in x25_parse_facilities()
75 while (len > 0) { in x25_parse_facilities()
78 if (len < 2) in x25_parse_facilities()
120 len -= 2; in x25_parse_facilities()
123 if (len < 3) in x25_parse_facilities()
143 len -= 3; in x25_parse_facilities()
146 if (len < 4) in x25_parse_facilities()
152 len -= 4; in x25_parse_facilities()
[all …]
/net/bluetooth/cmtp/
Dcore.c113 size = (skb) ? skb->len + count : count; in cmtp_add_msgpart()
121 if (skb && (skb->len > 0)) in cmtp_add_msgpart()
122 skb_copy_from_linear_data(skb, skb_put(nskb, skb->len), skb->len); in cmtp_add_msgpart()
134 __u16 len; in cmtp_recv_frame() local
136 BT_DBG("session %p skb %p len %d", session, skb, skb->len); in cmtp_recv_frame()
138 while (skb->len > 0) { in cmtp_recv_frame()
144 len = skb->data[1]; in cmtp_recv_frame()
148 len = skb->data[1] | (skb->data[2] << 8); in cmtp_recv_frame()
152 len = 0; in cmtp_recv_frame()
158 BT_DBG("hdr 0x%02x hdrlen %d len %d id %d", hdr, hdrlen, len, id); in cmtp_recv_frame()
[all …]
/net/decnet/
Dsysctl_net_decnet.c140 size_t len; in dn_node_address_handler() local
149 len = (*lenp < DN_ASCBUF_LEN) ? *lenp : (DN_ASCBUF_LEN-1); in dn_node_address_handler()
151 if (copy_from_user(addr, buffer, len)) in dn_node_address_handler()
154 addr[len] = 0; in dn_node_address_handler()
166 *ppos += len; in dn_node_address_handler()
172 len = strlen(addr); in dn_node_address_handler()
173 addr[len++] = '\n'; in dn_node_address_handler()
175 if (len > *lenp) len = *lenp; in dn_node_address_handler()
177 if (copy_to_user(buffer, addr, len)) in dn_node_address_handler()
180 *lenp = len; in dn_node_address_handler()
[all …]
/net/irda/
Dparameters.c38 static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
40 static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
42 static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
44 static int irda_extract_no_value(void *self, __u8 *buf, int len, __u8 pi,
47 static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
49 static int irda_insert_no_value(void *self, __u8 *buf, int len, __u8 pi,
78 static int irda_insert_no_value(void *self, __u8 *buf, int len, __u8 pi, in irda_insert_no_value() argument
105 static int irda_extract_no_value(void *self, __u8 *buf, int len, __u8 pi, in irda_extract_no_value() argument
126 static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi, in irda_insert_integer() argument
160 if (len < (2+p.pl)) { in irda_insert_integer()
[all …]
/net/bridge/netfilter/
Dnft_reject_bridge.c41 u32 len; in nft_reject_iphdr_validate() local
50 len = ntohs(iph->tot_len); in nft_reject_iphdr_validate()
51 if (oldskb->len < len) in nft_reject_iphdr_validate()
53 else if (len < (iph->ihl*4)) in nft_reject_iphdr_validate()
86 niph->tot_len = htons(nskb->len); in nft_reject_br_send_v4_tcp_reset()
100 unsigned int len; in nft_reject_br_send_v4_unreach() local
112 len = min_t(unsigned int, 536, oldskb->len); in nft_reject_br_send_v4_unreach()
114 if (!pskb_may_pull(oldskb, len)) in nft_reject_br_send_v4_unreach()
121 LL_MAX_HEADER + len, GFP_ATOMIC); in nft_reject_br_send_v4_unreach()
135 payload = skb_put(nskb, len); in nft_reject_br_send_v4_unreach()
[all …]

12345678910>>...28