/linux-master/include/linux/ |
H A D | ip.h | 36 return ntohs(ip_hdr(skb)->tot_len) - skb_network_header_len(skb); 41 u32 len = ntohs(iph->tot_len); 52 /* IPv4 datagram length is stored into 16bit field (tot_len) */ 57 iph->tot_len = len <= IP_MAX_MTU ? htons(len) : 0;
|
/linux-master/drivers/mtd/lpddr/ |
H A D | lpddr2_nvm.c | 321 u_long add, current_len, tot_len, target_len, my_data; local 332 tot_len = 0; 334 while (tot_len < target_len) { 336 my_data = write_buf[tot_len]; 337 my_data += (write_buf[tot_len+1]) << 8; 339 my_data += (write_buf[tot_len+2]) << 16; 340 my_data += (write_buf[tot_len+3]) << 24; 348 tot_len += pcm_data->bus_width; 350 current_len = min(target_len - tot_len, 353 0x00, add, current_len, write_buf + tot_len); [all...] |
/linux-master/samples/bpf/ |
H A D | xdp_fwd_kern.c | 76 fib_params.tot_len = ntohs(iph->tot_len); 95 fib_params.tot_len = ntohs(ip6h->payload_len);
|
H A D | xdp_tx_iptunnel_kern.c | 103 payload_len = ntohs(iph->tot_len); 135 iph->tot_len = htons(payload_len + sizeof(*iph));
|
/linux-master/tools/testing/selftests/bpf/progs/ |
H A D | test_tc_neigh_fib.c | 43 fib_params->tot_len = bpf_ntohs(ip4h->tot_len); 71 fib_params->tot_len = bpf_ntohs(ip6h->payload_len);
|
H A D | test_tc_tunnel.c | 128 iph_inner.tot_len = bpf_htons(sizeof(iph6_inner) + 189 h_outer.l4hdr.udp.len = bpf_htons(bpf_ntohs(iph_inner.tot_len) + 231 h_outer.ip.tot_len = bpf_htons(olen + 232 bpf_ntohs(h_outer.ip.tot_len)); 271 __u16 tot_len; local 319 tot_len = bpf_ntohs(iph_inner.payload_len) + sizeof(iph_inner) + 322 h_outer.l4hdr.udp.len = bpf_htons(tot_len); 410 h_outer.ip.payload_len = iph_inner.tot_len;
|
H A D | test_lwt_ip_encap.c | 39 hdr.iph.tot_len = bpf_htons(skb->len + sizeof(struct encap_hdr));
|
H A D | test_xdp.c | 105 payload_len = bpf_ntohs(iph->tot_len); 135 iph->tot_len = bpf_htons(payload_len + sizeof(*iph));
|
/linux-master/net/ipv4/ |
H A D | xfrm4_input.c | 62 iph->tot_len = htons(skb->len); 142 iph->tot_len = htons(ntohs(iph->tot_len) - len);
|
/linux-master/drivers/net/netdevsim/ |
H A D | psample.c | 40 int tot_len, data_len = NSIM_PSAMPLE_L4_DATA_LEN; local 49 tot_len = sizeof(struct iphdr) + sizeof(struct udphdr) + data_len; 66 iph->tot_len = htons(tot_len);
|
/linux-master/tools/testing/selftests/net/ |
H A D | nat6to4.c | 98 .tot_len = bpf_htons(bpf_ntohs(ip6->payload_len) + sizeof(struct iphdr)), // u16 179 if (bpf_htons(ip4->tot_len) > 0xFFFF - sizeof(struct ipv6hdr)) 196 if (bpf_ntohs(ip4->tot_len) < sizeof(*ip4)) 233 .payload_len = bpf_htons(bpf_ntohs(ip4->tot_len) - 20), // __be16
|
/linux-master/tools/testing/selftests/bpf/prog_tests/ |
H A D | flow_dissector.c | 118 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 162 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 208 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 235 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 378 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 381 .iph_inner.tot_len = 407 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 410 .iph_inner.tot_len = 435 .iph.tot_len = __bpf_constant_htons(MAGIC_BYTES), 439 .iph_inner.tot_len [all...] |
/linux-master/net/ipv6/ |
H A D | seg6_iptunnel.c | 134 int hdrlen, tot_len, err; local 138 tot_len = hdrlen + sizeof(*hdr); 140 err = skb_cow_head(skb, tot_len + skb->mac_len); 147 skb_push(skb, tot_len); 196 skb_postpush_rcsum(skb, hdr, tot_len); 215 int tot_len, err; local 231 tot_len = red_hdrlen + sizeof(struct ipv6hdr); 233 err = skb_cow_head(skb, tot_len + skb->mac_len); 240 skb_push(skb, tot_len); 315 skb_postpush_rcsum(skb, hdr, tot_len); [all...] |
H A D | exthdrs.c | 1207 opt2 = sock_kmalloc(sk, opt->tot_len, GFP_ATOMIC); 1210 memcpy(opt2, opt, opt->tot_len); 1266 int tot_len = 0; local 1272 tot_len += CMSG_ALIGN(ipv6_optlen(opt->hopopt)); 1274 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst0opt)); 1276 tot_len += CMSG_ALIGN(ipv6_optlen(opt->srcrt)); 1278 tot_len += CMSG_ALIGN(ipv6_optlen(opt->dst1opt)); 1282 tot_len += CMSG_ALIGN(ipv6_optlen(newopt)); 1284 if (!tot_len) 1287 tot_len [all...] |
/linux-master/net/ipv4/netfilter/ |
H A D | nf_reject_ipv4.c | 27 len = ntohs(iph->tot_len); 67 niph->tot_len = htons(nskb->len); 100 if (pskb_trim_rcsum(oldskb, ntohs(ip_hdr(oldskb)->tot_len))) 132 niph->tot_len = htons(nskb->len); 300 niph->tot_len = htons(nskb->len);
|
/linux-master/net/dccp/ |
H A D | options.c | 507 u8 tot_len, *to; local 517 tot_len = 3 + repeat_first + len; 519 if (DCCP_SKB_CB(skb)->dccpd_opt_len + tot_len > DCCP_MAX_OPT_LEN) { 523 DCCP_SKB_CB(skb)->dccpd_opt_len += tot_len; 525 to = skb_push(skb, tot_len); 527 *to++ = tot_len;
|
/linux-master/fs/ |
H A D | read_write.c | 785 size_t tot_len; local 795 tot_len = iov_iter_count(iter); 796 if (!tot_len) 798 ret = rw_verify_area(READ, file, &iocb->ki_pos, tot_len); 813 size_t tot_len; local 823 tot_len = iov_iter_count(iter); 824 if (!tot_len) 826 ret = rw_verify_area(READ, file, ppos, tot_len); 845 size_t tot_len; local 855 tot_len 876 size_t tot_len; local 910 size_t tot_len; local 948 size_t tot_len; local [all...] |
/linux-master/drivers/net/slip/ |
H A D | slhc.c | 405 if(ip->tot_len != cs->cs_ip.tot_len && 406 ntohs(cs->cs_ip.tot_len) == hlen) 417 deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ 424 if(deltaS == ntohs(cs->cs_ip.tot_len) - hlen){ 553 i = ntohs(ip->tot_len) - hdrlen; 561 ntohs(ip->tot_len) - hdrlen); 611 ip->tot_len = htons(len);
|
/linux-master/drivers/crypto/bcm/ |
H A D | util.h | 97 u8 from_nents, u32 tot_len);
|
/linux-master/drivers/net/ethernet/fungible/funeth/ |
H A D | funeth_rx.c | 285 * length @tot_len includes optional head- and tail-rooms. 296 static int fun_gather_pkt(struct funeth_rxq *q, unsigned int tot_len, argument 304 buf = get_buf(q, buf, tot_len); 317 frag_len = min_t(unsigned int, tot_len, 329 tot_len -= frag_len; 330 if (!tot_len) 368 unsigned int i, tot_len, pkt_len = be32_to_cpu(rxreq->pkt_len); local 387 tot_len = pkt_len; 390 tot_len += FUN_RX_TAILROOM + headroom; 392 ref_ok = fun_gather_pkt(q, tot_len, frag [all...] |
/linux-master/net/sched/ |
H A D | act_csum.c | 268 * Use iph->tot_len, or just ipl. 400 ntohs(iph->tot_len))) 406 ntohs(iph->tot_len))) 412 ntohs(iph->tot_len))) 418 ntohs(iph->tot_len), 0)) 424 ntohs(iph->tot_len), 1)) 429 !tcf_csum_sctp(skb, iph->ihl * 4, ntohs(iph->tot_len)))
|
/linux-master/net/netfilter/ |
H A D | xt_TCPMSS.c | 210 newlen = htons(ntohs(iph->tot_len) + ret); 211 csum_replace2(&iph->check, iph->tot_len, newlen); 212 iph->tot_len = newlen;
|
/linux-master/drivers/infiniband/core/ |
H A D | ud_header.c | 133 { STRUCT_FIELD(ip4, tot_len), 290 iph.tot_len = header->ip4.tot_len; 370 header->ip4.tot_len =
|
/linux-master/net/core/ |
H A D | tso.c | 19 iph->tot_len = htons(size + hdr_len - mac_hdr_len);
|
/linux-master/include/uapi/linux/ |
H A D | ip.h | 98 __be16 tot_len; member in struct:iphdr
|