| /linux/net/sched/ |
| H A D | act_csum.c | 135 unsigned int ihl, unsigned int ipl, in tcf_csum_skb_nextlayer() argument 139 int hl = ihl + jhl; in tcf_csum_skb_nextlayer() 145 return (void *)(skb_network_header(skb) + ihl); in tcf_csum_skb_nextlayer() 148 static int tcf_csum_ipv4_icmp(struct sk_buff *skb, unsigned int ihl, in tcf_csum_ipv4_icmp() argument 153 icmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*icmph)); in tcf_csum_ipv4_icmp() 158 skb->csum = csum_partial(icmph, ipl - ihl, 0); in tcf_csum_ipv4_icmp() 167 unsigned int ihl, unsigned int ipl) in tcf_csum_ipv4_igmp() argument 171 igmph = tcf_csum_skb_nextlayer(skb, ihl, ipl, sizeof(*igmph)); in tcf_csum_ipv4_igmp() 176 skb->csum = csum_partial(igmph, ipl - ihl, 0); in tcf_csum_ipv4_igmp() 184 static int tcf_csum_ipv6_icmp(struct sk_buff *skb, unsigned int ihl, in tcf_csum_ipv6_icmp() argument [all …]
|
| H A D | act_nat.c | 128 int ihl; in tcf_nat_act() local 175 ihl = iph->ihl * 4; in tcf_nat_act() 183 if (!pskb_may_pull(skb, ihl + sizeof(*tcph) + noff) || in tcf_nat_act() 184 skb_try_make_writable(skb, ihl + sizeof(*tcph) + noff)) in tcf_nat_act() 187 tcph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act() 196 if (!pskb_may_pull(skb, ihl + sizeof(*udph) + noff) || in tcf_nat_act() 197 skb_try_make_writable(skb, ihl + sizeof(*udph) + noff)) in tcf_nat_act() 200 udph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act() 213 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + noff)) in tcf_nat_act() 216 icmph = (void *)(skb_network_header(skb) + ihl); in tcf_nat_act() [all …]
|
| /linux/net/ipv4/ |
| H A D | ah4.c | 80 int l = iph->ihl*4 - sizeof(struct iphdr); in ip_clear_mutable_options() 126 int ihl = ip_hdrlen(skb); in ah_output_done() local 133 seqhi = (__be32 *)((char *)iph + ihl); in ah_output_done() 140 if (top_iph->ihl != 5) { in ah_output_done() 142 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output_done() 153 int ihl; in ah_output() local 176 ihl = ip_hdrlen(skb); in ah_output() 183 iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + seqhi_len); in ah_output() 186 seqhi = (__be32 *)((char *)iph + ihl); in ah_output() 200 if (top_iph->ihl != 5) { in ah_output() [all …]
|
| H A D | ip_fragment.c | 266 int ihl, end, flags, offset; in ip_frag_queue() local 292 ihl = ip_hdrlen(skb); in ip_frag_queue() 295 end = offset + skb->len - skb_network_offset(skb) - ihl; in ip_frag_queue() 325 if (!pskb_pull(skb, skb_network_offset(skb) + ihl)) in ip_frag_queue() 353 fragsize = skb->len + ihl; in ip_frag_queue() 520 if (iph.ihl < 5 || iph.version != 4) in ip_check_defrag() 524 if (skb->len < netoff + len || len < (iph.ihl * 4)) in ip_check_defrag() 530 if (!pskb_may_pull(skb, netoff + iph.ihl * 4)) { in ip_check_defrag()
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | test_tc_edt.c | 84 uint32_t ihl; in handle_ipv4() local 92 ihl = iph->ihl * 4; in handle_ipv4() 93 if (((void *)iph) + ihl > data_end) in handle_ipv4() 97 return handle_tcp(skb, (struct tcphdr *)(((void *)iph) + ihl)); in handle_ipv4()
|
| H A D | verifier_netfilter_ctx.c | 95 uint8_t ihl; in with_valid_ctx_access_test6() 107 ihl = iph->ihl << 2; in with_valid_ctx_access_test6() 109 th = bpf_dynptr_slice(&ptr, ihl, buffer_th, sizeof(buffer_th)); in with_valid_ctx_access_test6() 100 uint8_t ihl; with_valid_ctx_access_test6() local
|
| H A D | test_tc_change_tail.c | 34 if (iph->ihl < 5) /* Minimum IP header length */ in parse_ip_header() 48 udp = hdr + (iph->ihl * 4); in parse_udp_header()
|
| /linux/net/xfrm/ |
| H A D | xfrm_inout.h | 13 XFRM_MODE_SKB_CB(skb)->ihl = sizeof(*iph); in xfrm4_extract_header() 18 XFRM_MODE_SKB_CB(skb)->optlen = iph->ihl * 4 - sizeof(*iph); in xfrm4_extract_header() 28 XFRM_MODE_SKB_CB(skb)->ihl = sizeof(*iph); in xfrm6_extract_header() 59 iph->ihl = 5; in xfrm4_beet_make_header()
|
| H A D | xfrm_output.c | 67 int ihl = iph->ihl * 4; in xfrm4_transport_output() local 76 skb->transport_header = skb->network_header + ihl; in xfrm4_transport_output() 77 __skb_pull(skb, ihl); in xfrm4_transport_output() 78 memmove(skb_network_header(skb), iph, ihl); in xfrm4_transport_output() 239 (XFRM_MODE_SKB_CB(skb)->ihl - sizeof(*top_iph))); in xfrm4_beet_encap_add() 248 ph = __skb_pull(skb, XFRM_MODE_SKB_CB(skb)->ihl - hdrlen); in xfrm4_beet_encap_add() 263 top_iph->ihl = sizeof(struct iphdr) / 4; in xfrm4_beet_encap_add() 294 top_iph->ihl = 5; in xfrm4_tunnel_encap_add() 378 ph = __skb_pull(skb, XFRM_MODE_SKB_CB(skb)->ihl - hdr_len); in xfrm6_beet_encap_add()
|
| H A D | xfrm_input.c | 218 iph->ihl += optlen / 4; in xfrm4_remove_beet_encap() 223 iph->check = ip_fast_csum(skb_network_header(skb), iph->ihl); in xfrm4_remove_beet_encap() 396 int ihl = skb->data - skb_transport_header(skb); in xfrm4_transport_input() local 400 skb_network_header(skb), ihl); in xfrm4_transport_input() 406 ip_hdr(skb)->tot_len = htons(skb->len + ihl); in xfrm4_transport_input() 415 int ihl = skb->data - skb_transport_header(skb); in xfrm6_transport_input() local 419 skb_network_header(skb), ihl); in xfrm6_transport_input() 425 ipv6_hdr(skb)->payload_len = htons(skb->len + ihl - in xfrm6_transport_input()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | flow_dissector.c | 103 .iph.ihl = 5, 147 .iph.ihl = 5, 193 .iph.ihl = 5, 220 .iph.ihl = 5, 363 .iph.ihl = 5, 366 .iph_inner.ihl = 5, 392 .iph.ihl = 5, 395 .iph_inner.ihl = 5, 420 .iph.ihl = 5, 424 .iph_inner.ihl = 5, [all …]
|
| /linux/arch/x86/um/asm/ |
| H A D | checksum.h | 86 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 110 : "=r" (sum), "=r" (iph), "=r" (ihl) in ip_fast_csum() 111 : "1" (iph), "2" (ihl) in ip_fast_csum()
|
| /linux/arch/m68k/include/asm/ |
| H A D | checksum.h | 46 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 61 : "=d" (sum), "=&a" (iph), "=&d" (ihl), "=&d" (tmp) in ip_fast_csum() 62 : "0" (sum), "1" (iph), "2" (ihl) in ip_fast_csum()
|
| /linux/arch/sh/include/asm/ |
| H A D | checksum_32.h | 86 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 108 : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) in ip_fast_csum() 109 : "1" (iph), "2" (ihl) in ip_fast_csum()
|
| /linux/arch/x86/include/asm/ |
| H A D | checksum_32.h | 65 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 89 : "=r" (sum), "=r" (iph), "=r" (ihl) in ip_fast_csum() 90 : "1" (iph), "2" (ihl) in ip_fast_csum()
|
| /linux/arch/arm/include/asm/ |
| H A D | checksum.h | 73 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 93 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (tmp1) in ip_fast_csum() 94 : "1" (iph), "2" (ihl) in ip_fast_csum()
|
| /linux/arch/xtensa/include/asm/ |
| H A D | checksum.h | 88 static __inline__ __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 115 : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (tmp), in ip_fast_csum() 117 : "1" (iph), "2" (ihl) in ip_fast_csum()
|
| /linux/arch/s390/include/asm/ |
| H A D | checksum.h | 56 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 65 ihl -= 4; in ip_fast_csum() 66 while (ihl--) in ip_fast_csum()
|
| /linux/samples/bpf/ |
| H A D | parse_varlen.c | 62 ihl_len = iph->ihl * 4; in parse_ipv4() 68 ihl_len += iph->ihl * 4; in parse_ipv4() 95 ihl_len += iph->ihl * 4; in parse_ipv6()
|
| /linux/arch/arc/include/asm/ |
| H A D | checksum.h | 38 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 59 : "r"(ihl) in ip_fast_csum()
|
| /linux/arch/arm64/include/asm/ |
| H A D | checksum.h | 23 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 27 int n = ihl; /* we want it signed */ in ip_fast_csum()
|
| /linux/arch/riscv/include/asm/ |
| H A D | checksum.h | 37 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 46 } while (++pos < ihl); in ip_fast_csum()
|
| /linux/arch/loongarch/include/asm/ |
| H A D | checksum.h | 42 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 46 int n = ihl; /* we want it signed */ in ip_fast_csum()
|
| /linux/net/ipv4/netfilter/ |
| H A D | nf_nat_snmp_basic_main.c | 129 struct udphdr *udph = (struct udphdr *)((__be32 *)iph + iph->ihl); in snmp_translate() 167 const struct udphdr *udph = (struct udphdr *)((__be32 *)iph + iph->ihl); in help() 184 if (ntohs(udph->len) != skb->len - (iph->ihl << 2)) { in help()
|
| /linux/arch/sparc/include/asm/ |
| H A D | checksum_32.h | 81 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 112 : "r" (ihl), "1" (iph) in ip_fast_csum()
|