| /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 129 icv = ah_tmp_icv(iph, ihl); in ah_output_done() 135 if (top_iph->ihl != 5) { in ah_output_done() 137 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output_done() 148 int ihl; in ah_output() local 171 ihl = ip_hdrlen(skb); in ah_output() 178 iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + seqhi_len); in ah_output() 181 seqhi = (__be32 *)((char *)iph + ihl); in ah_output() 195 if (top_iph->ihl != 5) { in ah_output() [all …]
|
| /linux/drivers/net/slip/ |
| H A D | slhc.c | 251 if (ip->version != 4 || ip->ihl < 5) in slhc_compress() 263 nlen = ip->ihl * 4; in slhc_compress() 353 if(ip->version != cs->cs_ip.version || ip->ihl != cs->cs_ip.ihl in slhc_compress() 358 || (ip->ihl > 5 && memcmp(ip+1,cs->cs_ipopt,((ip->ihl)-5)*4) != 0) in slhc_compress() 478 if (ip->ihl > 5) in slhc_compress() 479 memcpy(cs->cs_ipopt, ip+1, ((ip->ihl) - 5) * 4); in slhc_compress() 547 hdrlen = ip->ihl * 4 + thp->doff * 4; in slhc_uncompress() 620 if (ip->ihl > 5) { in slhc_uncompress() 621 memcpy(cp, cs->cs_ipopt, (ip->ihl - 5) * 4); in slhc_uncompress() 622 cp += (ip->ihl - 5) * 4; in slhc_uncompress() [all …]
|
| /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
|
| /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()
|
| /linux/include/net/netfilter/ |
| H A D | nf_tables_ipv4.h | 29 if (iph->ihl < 5 || iph->version != 4) in __nft_set_pktinfo_ipv4_validate() 33 thoff = iph->ihl * 4; in __nft_set_pktinfo_ipv4_validate() 66 if (iph->ihl < 5 || iph->version != 4) in nft_set_pktinfo_ipv4_ingress() 70 thoff = iph->ihl * 4; in nft_set_pktinfo_ipv4_ingress()
|
| /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/powerpc/include/asm/ |
| H A D | checksum.h | 127 static inline __wsum ip_fast_csum_nofold(const void *iph, unsigned int ihl) in ip_fast_csum_nofold() argument 134 for (i = 0; i < ihl - 1; i++, ptr++) in ip_fast_csum_nofold() 147 : "r" (ihl - 2), "r" (*(const u32 *)iph), "r" (*ptr) in ip_fast_csum_nofold() 154 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 156 return csum_fold(ip_fast_csum_nofold(iph, 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/parisc/include/asm/ |
| H A D | checksum.h | 27 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 53 : "=r" (sum), "=r" (iph), "=r" (ihl), "=r" (t0), "=r" (t1), "=r" (t2) in ip_fast_csum() 54 : "1" (iph), "2" (ihl) in ip_fast_csum()
|
| /linux/arch/x86/include/asm/ |
| H A D | checksum_64.h | 45 static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl) in ip_fast_csum() argument 69 : "=r" (sum), "=r" (iph), "=r" (ihl) in ip_fast_csum() 70 : "1" (iph), "2" (ihl) in ip_fast_csum()
|
| 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/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/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/net/netfilter/ |
| H A D | nf_log_syslog.c | 344 ih->ihl * 4 > sizeof(struct iphdr)) { in dump_ipv4_packet() 349 optsize = ih->ihl * 4 - sizeof(struct iphdr); in dump_ipv4_packet() 368 iphoff + ih->ihl * 4, logflags)) in dump_ipv4_packet() 375 iphoff + ih->ihl * 4)) in dump_ipv4_packet() 401 ich = skb_header_pointer(skb, iphoff + ih->ihl * 4, in dump_ipv4_packet() 405 skb->len - iphoff - ih->ihl * 4); in dump_ipv4_packet() 415 skb->len - iphoff - ih->ihl * 4 < required_len[ich->type]) { in dump_ipv4_packet() 417 skb->len - iphoff - ih->ihl * 4); in dump_ipv4_packet() 446 iphoff + ih->ihl * 4 + sizeof(_icmph)); in dump_ipv4_packet() 471 ah = skb_header_pointer(skb, iphoff + ih->ihl * 4, in dump_ipv4_packet() [all …]
|
| /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()
|