Home
last modified time | relevance | path

Searched refs:offset (Results 1 – 25 of 177) sorted by relevance

12345678

/net/core/
Ddatagram.c356 int skb_copy_datagram_iovec(const struct sk_buff *skb, int offset, in skb_copy_datagram_iovec() argument
360 int i, copy = start - offset; in skb_copy_datagram_iovec()
369 if (memcpy_toiovec(to, skb->data + offset, copy)) in skb_copy_datagram_iovec()
373 offset += copy; in skb_copy_datagram_iovec()
381 WARN_ON(start > offset + len); in skb_copy_datagram_iovec()
384 if ((copy = end - offset) > 0) { in skb_copy_datagram_iovec()
393 offset - start, copy); in skb_copy_datagram_iovec()
399 offset += copy; in skb_copy_datagram_iovec()
407 WARN_ON(start > offset + len); in skb_copy_datagram_iovec()
410 if ((copy = end - offset) > 0) { in skb_copy_datagram_iovec()
[all …]
Dskbuff.c389 nc->frag.offset = 0; in __netdev_alloc_frag()
392 if (nc->frag.offset + fragsz > nc->frag.size) { in __netdev_alloc_frag()
405 nc->frag.offset = 0; in __netdev_alloc_frag()
408 data = page_address(nc->frag.page) + nc->frag.offset; in __netdev_alloc_frag()
409 nc->frag.offset += fragsz; in __netdev_alloc_frag()
1376 int offset = skb_headlen(skb); in ___pskb_trim() local
1386 if (offset >= len) in ___pskb_trim()
1390 int end = offset + skb_frag_size(&skb_shinfo(skb)->frags[i]); in ___pskb_trim()
1393 offset = end; in ___pskb_trim()
1397 skb_frag_size_set(&skb_shinfo(skb)->frags[i++], len - offset); in ___pskb_trim()
[all …]
Diovec.c86 int offset, unsigned int len, __wsum *csump) in csum_partial_copy_fromiovecend() argument
92 while (offset >= iov->iov_len) { in csum_partial_copy_fromiovecend()
93 offset -= iov->iov_len; in csum_partial_copy_fromiovecend()
98 u8 __user *base = iov->iov_base + offset; in csum_partial_copy_fromiovecend()
99 int copy = min_t(unsigned int, len, iov->iov_len - offset); in csum_partial_copy_fromiovecend()
101 offset = 0; in csum_partial_copy_fromiovecend()
162 unsigned long iov_pages(const struct iovec *iov, int offset, in iov_pages() argument
168 while (nr_segs && (offset >= iov->iov_len)) { in iov_pages()
169 offset -= iov->iov_len; in iov_pages()
175 base = (unsigned long)iov[seg].iov_base + offset; in iov_pages()
[all …]
/net/sunrpc/auth_gss/
Dgss_krb5_wrap.c49 gss_krb5_add_padding(struct xdr_buf *buf, int offset, int blocksize) in gss_krb5_add_padding() argument
51 int padding = gss_krb5_padding(blocksize, buf->len - offset); in gss_krb5_add_padding()
83 unsigned int offset = (buf->page_base + len - 1) in gss_krb5_remove_padding() local
86 pad = *(ptr + offset); in gss_krb5_remove_padding()
158 gss_wrap_kerberos_v1(struct krb5_ctx *kctx, int offset, in gss_wrap_kerberos_v1() argument
178 gss_krb5_add_padding(buf, offset, blocksize); in gss_wrap_kerberos_v1()
179 BUG_ON((buf->len - offset) % blocksize); in gss_wrap_kerberos_v1()
180 plainlen = conflen + buf->len - offset; in gss_wrap_kerberos_v1()
184 (buf->len - offset); in gss_wrap_kerberos_v1()
186 ptr = buf->head[0].iov_base + offset; in gss_wrap_kerberos_v1()
[all …]
Dgss_krb5_crypto.c423 sg->offset); in encryptor()
425 sg->offset); in encryptor()
449 sg->offset + sg->length - fraglen); in encryptor()
463 int offset, struct page **pages) in gss_encrypt_xdr_buf() argument
468 BUG_ON((buf->len - offset) % crypto_blkcipher_blocksize(tfm) != 0); in gss_encrypt_xdr_buf()
474 desc.pos = offset; in gss_encrypt_xdr_buf()
483 ret = xdr_process_buf(buf, offset, buf->len - offset, encryptor, &desc); in gss_encrypt_xdr_buf()
506 sg->offset); in decryptor()
527 sg->offset + sg->length - fraglen); in decryptor()
539 int offset) in gss_decrypt_xdr_buf() argument
[all …]
/net/rds/
Dinfo.c67 unsigned long offset; member
75 int offset = optname - RDS_INFO_FIRST; in rds_info_register_func() local
80 BUG_ON(rds_info_funcs[offset]); in rds_info_register_func()
81 rds_info_funcs[offset] = func; in rds_info_register_func()
88 int offset = optname - RDS_INFO_FIRST; in rds_info_deregister_func() local
93 BUG_ON(rds_info_funcs[offset] != func); in rds_info_deregister_func()
94 rds_info_funcs[offset] = NULL; in rds_info_deregister_func()
124 this = min(bytes, PAGE_SIZE - iter->offset); in rds_info_copy()
128 iter->offset, this, data, bytes); in rds_info_copy()
130 memcpy(iter->addr + iter->offset, data, this); in rds_info_copy()
[all …]
Dmessage.c149 unsigned int offset, ext_type, ext_len; in rds_message_next_extension() local
152 offset = *pos; in rds_message_next_extension()
153 if (offset >= RDS_HEADER_EXT_SPACE) in rds_message_next_extension()
158 ext_type = src[offset++]; in rds_message_next_extension()
163 if (offset + ext_len > RDS_HEADER_EXT_SPACE) in rds_message_next_extension()
166 *pos = offset + ext_len; in rds_message_next_extension()
169 memcpy(buf, src + offset, *buflen); in rds_message_next_extension()
178 int rds_message_add_rdma_dest_extension(struct rds_header *hdr, u32 r_key, u32 offset) in rds_message_add_rdma_dest_extension() argument
183 ext_hdr.h_rdma_offset = cpu_to_be32(offset); in rds_message_add_rdma_dest_extension()
308 (void *)sg_page(sg), sg->offset, sg->length, sg_off); in rds_message_copy_from_user()
[all …]
/net/ipv6/
Dexthdrs_core.c115 int ipv6_find_tlv(struct sk_buff *skb, int offset, int type) in ipv6_find_tlv() argument
122 if (offset + 2 > packet_len) in ipv6_find_tlv()
124 hdr = (struct ipv6_opt_hdr *)(nh + offset); in ipv6_find_tlv()
127 if (offset + len > packet_len) in ipv6_find_tlv()
130 offset += 2; in ipv6_find_tlv()
134 int opttype = nh[offset]; in ipv6_find_tlv()
138 return offset; in ipv6_find_tlv()
145 optlen = nh[offset + 1] + 2; in ipv6_find_tlv()
150 offset += optlen; in ipv6_find_tlv()
185 int ipv6_find_hdr(const struct sk_buff *skb, unsigned int *offset, in ipv6_find_hdr() argument
[all …]
Dmip6.c217 int offset; in mip6_destopt_reject() local
226 offset = ipv6_find_tlv(skb, opt->dsthao, IPV6_TLV_HAO); in mip6_destopt_reject()
227 if (likely(offset >= 0)) in mip6_destopt_reject()
229 (skb_network_header(skb) + offset); in mip6_destopt_reject()
266 u16 offset = sizeof(struct ipv6hdr); in mip6_destopt_offset() local
276 while (offset + 1 <= packet_len) { in mip6_destopt_offset()
290 if (ipv6_find_tlv(skb, offset, IPV6_TLV_HAO) >= 0) { in mip6_destopt_offset()
292 return offset; in mip6_destopt_offset()
296 return offset; in mip6_destopt_offset()
300 return offset; in mip6_destopt_offset()
[all …]
Doutput_core.c47 unsigned int offset = sizeof(struct ipv6hdr); in ip6_find_1stfragopt() local
53 while (offset <= packet_len) { in ip6_find_1stfragopt()
65 if (ipv6_find_tlv(skb, offset, IPV6_TLV_HAO) >= 0) in ip6_find_1stfragopt()
69 return offset; in ip6_find_1stfragopt()
72 return offset; in ip6_find_1stfragopt()
75 if (offset + sizeof(struct ipv6_opt_hdr) > packet_len) in ip6_find_1stfragopt()
79 offset); in ip6_find_1stfragopt()
80 offset += ipv6_optlen(exthdr); in ip6_find_1stfragopt()
81 if (offset > IPV6_MAXPLEN) in ip6_find_1stfragopt()
Dxfrm6_policy.c136 u16 offset = skb_network_header_len(skb); in _decode_session6() local
153 while (nh + offset + 1 < skb->data || in _decode_session6()
154 pskb_may_pull(skb, nh + offset + 1 - skb->data)) { in _decode_session6()
156 exthdr = (struct ipv6_opt_hdr *)(nh + offset); in _decode_session6()
164 offset += ipv6_optlen(exthdr); in _decode_session6()
166 exthdr = (struct ipv6_opt_hdr *)(nh + offset); in _decode_session6()
174 if (!onlyproto && (nh + offset + 4 < skb->data || in _decode_session6()
175 pskb_may_pull(skb, nh + offset + 4 - skb->data))) { in _decode_session6()
179 ports = (__be16 *)(nh + offset); in _decode_session6()
187 if (!onlyproto && pskb_may_pull(skb, nh + offset + 2 - skb->data)) { in _decode_session6()
[all …]
/net/netfilter/
Dnft_payload.c27 int offset; in nft_payload_eval() local
33 offset = skb_mac_header(skb) - skb->data; in nft_payload_eval()
36 offset = skb_network_offset(skb); in nft_payload_eval()
39 offset = pkt->xt.thoff; in nft_payload_eval()
44 offset += priv->offset; in nft_payload_eval()
46 if (skb_copy_bits(skb, offset, dest->data, priv->len) < 0) in nft_payload_eval()
68 priv->offset = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_OFFSET])); in nft_payload_init()
84 nla_put_be32(skb, NFTA_PAYLOAD_OFFSET, htonl(priv->offset)) || in nft_payload_dump()
115 unsigned int offset, len; in nft_payload_select_ops() local
133 offset = ntohl(nla_get_be32(tb[NFTA_PAYLOAD_OFFSET])); in nft_payload_select_ops()
[all …]
Dnft_exthdr.c23 u8 offset; member
34 unsigned int offset = 0; in nft_exthdr_eval() local
37 err = ipv6_find_hdr(pkt->skb, &offset, priv->type, NULL, NULL); in nft_exthdr_eval()
40 offset += priv->offset; in nft_exthdr_eval()
42 if (skb_copy_bits(pkt->skb, offset, dest->data, priv->len) < 0) in nft_exthdr_eval()
70 priv->offset = ntohl(nla_get_be32(tb[NFTA_EXTHDR_OFFSET])); in nft_exthdr_init()
91 if (nla_put_be32(skb, NFTA_EXTHDR_OFFSET, htonl(priv->offset))) in nft_exthdr_dump()
Dnf_log_common.c24 u8 proto, int fragment, unsigned int offset) in nf_log_dump_udp_header() argument
39 uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph); in nf_log_dump_udp_header()
41 nf_log_buf_add(m, "INCOMPLETE [%u bytes] ", skb->len - offset); in nf_log_dump_udp_header()
56 u8 proto, int fragment, unsigned int offset, in nf_log_dump_tcp_header() argument
69 th = skb_header_pointer(skb, offset, sizeof(_tcph), &_tcph); in nf_log_dump_tcp_header()
71 nf_log_buf_add(m, "INCOMPLETE [%u bytes] ", skb->len - offset); in nf_log_dump_tcp_header()
115 op = skb_header_pointer(skb, offset + sizeof(struct tcphdr), in nf_log_dump_tcp_header()
Dxt_AUDIT.c35 unsigned int proto, unsigned int offset) in audit_proto() argument
44 pptr = skb_header_pointer(skb, offset, sizeof(_ports), _ports); in audit_proto()
60 iptr = skb_header_pointer(skb, offset, sizeof(_ih), &_ih); in audit_proto()
102 int offset; in audit_ip6() local
111 offset = ipv6_skip_exthdr(skb, skb_network_offset(skb) + sizeof(_ip6h), in audit_ip6()
117 if (offset) in audit_ip6()
118 audit_proto(ab, skb, nexthdr, offset); in audit_ip6()
/net/wireless/
Ddebugfs.c44 char *buf, int buf_size, int offset) in ht_print_chan() argument
46 if (WARN_ON(offset > buf_size)) in ht_print_chan()
50 return scnprintf(buf + offset, in ht_print_chan()
51 buf_size - offset, in ht_print_chan()
55 return scnprintf(buf + offset, in ht_print_chan()
56 buf_size - offset, in ht_print_chan()
71 unsigned int offset = 0, buf_size = PAGE_SIZE, i, r; in ht40allow_map_read() local
86 offset += ht_print_chan(&sband->channels[i], in ht40allow_map_read()
87 buf, buf_size, offset); in ht40allow_map_read()
92 r = simple_read_from_buffer(user_buf, count, ppos, buf, offset); in ht40allow_map_read()
/net/sunrpc/
Dsocklib.c33 if (unlikely(skb_copy_bits(desc->skb, desc->offset, to, len))) in xdr_skb_read_bits()
36 desc->offset += len; in xdr_skb_read_bits()
56 pos = desc->offset; in xdr_skb_read_and_csum_bits()
60 desc->offset += len; in xdr_skb_read_and_csum_bits()
158 desc.offset = sizeof(struct udphdr); in csum_partial_copy_to_xdr()
159 desc.count = skb->len - desc.offset; in csum_partial_copy_to_xdr()
164 desc.csum = csum_partial(skb->data, desc.offset, skb->csum); in csum_partial_copy_to_xdr()
167 if (desc.offset != skb->len) { in csum_partial_copy_to_xdr()
169 csum2 = skb_checksum(skb, desc.offset, skb->len - desc.offset, 0); in csum_partial_copy_to_xdr()
170 desc.csum = csum_block_add(desc.csum, csum2, desc.offset); in csum_partial_copy_to_xdr()
/net/netlabel/
Dnetlabel_kapi.c427 u32 offset, in _netlbl_catmap_getnode() argument
436 if (offset < iter->startbit) in _netlbl_catmap_getnode()
438 while (iter && offset >= (iter->startbit + NETLBL_CATMAP_SIZE)) { in _netlbl_catmap_getnode()
442 if (iter == NULL || offset < iter->startbit) in _netlbl_catmap_getnode()
457 iter->startbit = offset & ~(NETLBL_CATMAP_SIZE - 1); in _netlbl_catmap_getnode()
480 int netlbl_catmap_walk(struct netlbl_lsm_catmap *catmap, u32 offset) in netlbl_catmap_walk() argument
487 iter = _netlbl_catmap_getnode(&catmap, offset, _CM_F_WALK, 0); in netlbl_catmap_walk()
490 if (offset > iter->startbit) { in netlbl_catmap_walk()
491 offset -= iter->startbit; in netlbl_catmap_walk()
492 idx = offset / NETLBL_CATMAP_MAPSIZE; in netlbl_catmap_walk()
[all …]
/net/mac80211/
Dtdls.c177 size_t offset = 0, noffset; in ieee80211_tdls_add_setup_start_ies() local
206 offset); in ieee80211_tdls_add_setup_start_ies()
207 pos = skb_put(skb, noffset - offset); in ieee80211_tdls_add_setup_start_ies()
208 memcpy(pos, extra_ies + offset, noffset - offset); in ieee80211_tdls_add_setup_start_ies()
209 offset = noffset; in ieee80211_tdls_add_setup_start_ies()
236 offset); in ieee80211_tdls_add_setup_start_ies()
237 pos = skb_put(skb, noffset - offset); in ieee80211_tdls_add_setup_start_ies()
238 memcpy(pos, extra_ies + offset, noffset - offset); in ieee80211_tdls_add_setup_start_ies()
239 offset = noffset; in ieee80211_tdls_add_setup_start_ies()
277 pos = skb_put(skb, noffset - offset); in ieee80211_tdls_add_setup_start_ies()
[all …]
/net/ipv4/
Dip_fragment.c63 int offset; member
322 int flags, offset; in ip_frag_queue() local
338 offset = ntohs(ip_hdr(skb)->frag_off); in ip_frag_queue()
339 flags = offset & ~IP_OFFSET; in ip_frag_queue()
340 offset &= IP_OFFSET; in ip_frag_queue()
341 offset <<= 3; /* offset is in 8-byte chunks */ in ip_frag_queue()
345 end = offset + skb->len - skb_network_offset(skb) - ihl; in ip_frag_queue()
371 if (end == offset) in ip_frag_queue()
378 err = pskb_trim_rcsum(skb, end - offset); in ip_frag_queue()
387 if (!prev || FRAG_CB(prev)->offset < offset) { in ip_frag_queue()
[all …]
Dip_output.c489 int offset; in ip_fragment() local
564 offset = 0; in ip_fragment()
585 if (offset == 0) in ip_fragment()
587 offset += skb->len - hlen; in ip_fragment()
588 iph->frag_off = htons(offset>>3); in ip_fragment()
648 offset = (ntohs(iph->frag_off) & IP_OFFSET) << 3; in ip_fragment()
710 iph->frag_off = htons((offset >> 3)); in ip_fragment()
718 if (offset == 0) in ip_fragment()
728 offset += len; in ip_fragment()
755 ip_generic_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb) in ip_generic_getfrag() argument
[all …]
/net/ipv6/netfilter/
Dnf_conntrack_reasm.c58 int offset; member
224 int offset, end; in nf_ct_frag6_queue() local
234 offset = ntohs(fhdr->frag_off) & ~0x7; in nf_ct_frag6_queue()
235 end = offset + (payload_len - in nf_ct_frag6_queue()
285 if (end == offset) in nf_ct_frag6_queue()
293 if (pskb_trim_rcsum(skb, end - offset)) { in nf_ct_frag6_queue()
303 if (!prev || NFCT_FRAG6_CB(prev)->offset < offset) { in nf_ct_frag6_queue()
309 if (NFCT_FRAG6_CB(next)->offset >= offset) in nf_ct_frag6_queue()
325 (NFCT_FRAG6_CB(prev)->offset + prev->len) > offset) in nf_ct_frag6_queue()
329 if (next && NFCT_FRAG6_CB(next)->offset < end) in nf_ct_frag6_queue()
[all …]
/net/802/
Dmrp.c621 static int mrp_pdu_parse_end_mark(struct sk_buff *skb, int *offset) in mrp_pdu_parse_end_mark() argument
625 if (skb_copy_bits(skb, *offset, &endmark, sizeof(endmark)) < 0) in mrp_pdu_parse_end_mark()
628 *offset += sizeof(endmark); in mrp_pdu_parse_end_mark()
674 struct sk_buff *skb, int *offset) in mrp_pdu_parse_vecattr() argument
680 mrp_cb(skb)->vah = skb_header_pointer(skb, *offset, sizeof(_vah), in mrp_pdu_parse_vecattr()
684 *offset += sizeof(_vah); in mrp_pdu_parse_vecattr()
701 if (skb_copy_bits(skb, *offset, mrp_cb(skb)->attrvalue, in mrp_pdu_parse_vecattr()
704 *offset += mrp_cb(skb)->mh->attrlen; in mrp_pdu_parse_vecattr()
710 if (skb_copy_bits(skb, *offset, &vaevents, in mrp_pdu_parse_vecattr()
713 *offset += sizeof(vaevents); in mrp_pdu_parse_vecattr()
[all …]
/net/sched/
Dact_pedit.c128 int offset = tkey->off; in tcf_pedit() local
137 offset += (*d & tkey->offmask) >> tkey->shift; in tcf_pedit()
140 if (offset % 4) { in tcf_pedit()
145 if (offset > 0 && offset > skb->len) { in tcf_pedit()
148 offset, skb->len); in tcf_pedit()
152 ptr = skb_header_pointer(skb, off + offset, 4, &_data); in tcf_pedit()
158 skb_store_bits(skb, off + offset, ptr, 4); in tcf_pedit()
/net/rxrpc/
Dar-recvmsg.c54 int copy, ret, ullen, offset, copied = 0; in rxrpc_recvmsg() local
161 ntohl(sp->hdr.seq), skb->len, sp->offset); in rxrpc_recvmsg()
178 offset = sp->offset; in rxrpc_recvmsg()
179 copy = skb->len - offset; in rxrpc_recvmsg()
183 ret = skb_copy_datagram_iovec(skb, offset, msg->msg_iov, copy); in rxrpc_recvmsg()
191 offset += copy; in rxrpc_recvmsg()
195 sp->offset = offset; in rxrpc_recvmsg()
197 if (sp->offset < skb->len) { in rxrpc_recvmsg()

12345678