| /include/net/netfilter/ |
| A D | nf_tables_ipv4.h | 21 struct iphdr *iph, _iph; in __nft_set_pktinfo_ipv4_validate() local 25 sizeof(*iph), &_iph); in __nft_set_pktinfo_ipv4_validate() 26 if (!iph) in __nft_set_pktinfo_ipv4_validate() 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() 44 pkt->tprot = iph->protocol; in __nft_set_pktinfo_ipv4_validate() 59 struct iphdr *iph; in nft_set_pktinfo_ipv4_ingress() local 65 iph = ip_hdr(pkt->skb); in nft_set_pktinfo_ipv4_ingress() 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() [all …]
|
| A D | nf_queue.h | 48 static inline u32 hash_v4(const struct iphdr *iph, u32 initval) in hash_v4() argument 51 if ((__force u32)iph->saddr < (__force u32)iph->daddr) in hash_v4() 52 return jhash_3words((__force u32)iph->saddr, in hash_v4() 53 (__force u32)iph->daddr, iph->protocol, initval); in hash_v4() 55 return jhash_3words((__force u32)iph->daddr, in hash_v4() 56 (__force u32)iph->saddr, iph->protocol, initval); in hash_v4() 84 struct iphdr *iph, _iph; in hash_bridge() local 88 iph = skb_header_pointer(skb, skb_network_offset(skb), in hash_bridge() 89 sizeof(*iph), &_iph); in hash_bridge() 90 if (iph) in hash_bridge() [all …]
|
| /include/net/ |
| A D | dsfield.h | 16 static inline __u8 ipv4_get_dsfield(const struct iphdr *iph) in ipv4_get_dsfield() argument 18 return iph->tos; in ipv4_get_dsfield() 28 static inline void ipv4_change_dsfield(struct iphdr *iph,__u8 mask, in ipv4_change_dsfield() argument 31 __u32 check = ntohs((__force __be16)iph->check); in ipv4_change_dsfield() 34 dsfield = (iph->tos & mask) | value; in ipv4_change_dsfield() 35 check += iph->tos; in ipv4_change_dsfield() 39 iph->check = (__force __sum16)htons(check); in ipv4_change_dsfield() 40 iph->tos = dsfield; in ipv4_change_dsfield()
|
| A D | inet_ecn.h | 79 u32 ecn = (iph->tos + 1) & INET_ECN_MASK; in IP_ECN_set_ce() 100 iph->check = csum16_add(iph->check, check_add); in IP_ECN_set_ce() 101 iph->tos |= INET_ECN_CE; in IP_ECN_set_ce() 110 iph->check = csum16_add(iph->check, htons(0x1)); in IP_ECN_set_ect1() 111 iph->tos ^= INET_ECN_MASK; in IP_ECN_set_ect1() 117 iph->tos &= ~INET_ECN_MASK; in IP_ECN_clear() 138 if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph))) in IP6_ECN_set_ce() 141 from = *(__be32 *)iph; in IP6_ECN_set_ce() 143 *(__be32 *)iph = to; in IP6_ECN_set_ce() 157 from = *(__be32 *)iph; in IP6_ECN_set_ect1() [all …]
|
| A D | ip_vs.h | 82 if (!iph) in ip_vs_fill_iph_skb_off() 85 iphdr->saddr.in6 = iph->saddr; in ip_vs_fill_iph_skb_off() 86 iphdr->daddr.in6 = iph->daddr; in ip_vs_fill_iph_skb_off() 101 if (!iph) in ip_vs_fill_iph_skb_off() 104 iphdr->len = offset + iph->ihl * 4; in ip_vs_fill_iph_skb_off() 106 iphdr->protocol = iph->protocol; in ip_vs_fill_iph_skb_off() 107 iphdr->saddr.ip = iph->saddr; in ip_vs_fill_iph_skb_off() 108 iphdr->daddr.ip = iph->daddr; in ip_vs_fill_iph_skb_off() 495 struct ip_vs_iphdr *iph); 507 const struct ip_vs_iphdr *iph); [all …]
|
| A D | gro.h | 202 const struct iphdr *iph = skb_gro_network_header(skb); in inet_gro_compute_pseudo() local 204 return csum_tcpudp_nofold(iph->saddr, iph->daddr, in inet_gro_compute_pseudo() 441 const struct ipv6hdr *iph = skb_gro_network_header(skb); in ip6_gro_compute_pseudo() local 443 return ~csum_unfold(csum_ipv6_magic(&iph->saddr, &iph->daddr, in ip6_gro_compute_pseudo() 447 static inline int inet_gro_flush(const struct iphdr *iph, const struct iphdr *iph2, in inet_gro_flush() argument 450 const u32 id = ntohl(*(__be32 *)&iph->id); in inet_gro_flush() 458 flush = (iph->ttl ^ iph2->ttl) | (iph->tos ^ iph2->tos) | (df ^ (id2 & IP_DF)); in inet_gro_flush() 473 static inline int ipv6_gro_flush(const struct ipv6hdr *iph, const struct ipv6hdr *iph2) in ipv6_gro_flush() argument 476 __be32 first_word = *(__be32 *)iph ^ *(__be32 *)iph2; in ipv6_gro_flush() 480 (__force __be32)(iph->hop_limit ^ iph2->hop_limit)); in ipv6_gro_flush()
|
| A D | ip.h | 179 struct iphdr *iph; member 407 return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0; in ip_is_fragment() 416 int ip_decrease_ttl(struct iphdr *iph) in ip_decrease_ttl() argument 418 u32 check = (__force u32)iph->check; in ip_decrease_ttl() 420 iph->check = (__force __sum16)(check + (check>=0xFFFF)); in ip_decrease_ttl() 421 return --iph->ttl; in ip_decrease_ttl() 557 struct iphdr *iph = ip_hdr(skb); in ip_select_ident_segs() local 575 iph->id = htons(val); in ip_select_ident_segs() 579 iph->id = 0; in ip_select_ident_segs() 582 __ip_select_ident(net, iph, segs); in ip_select_ident_segs() [all …]
|
| A D | ip_tunnels.h | 140 struct iphdr iph; member 549 static inline u8 ip_tunnel_get_dsfield(const struct iphdr *iph, in ip_tunnel_get_dsfield() argument 555 return iph->tos; in ip_tunnel_get_dsfield() 557 return ipv6_get_dsfield((const struct ipv6hdr *)iph); in ip_tunnel_get_dsfield() 562 static inline __be32 ip_tunnel_get_flowlabel(const struct iphdr *iph, in ip_tunnel_get_flowlabel() argument 568 return ip6_flowlabel((const struct ipv6hdr *)iph); in ip_tunnel_get_flowlabel() 573 static inline u8 ip_tunnel_get_ttl(const struct iphdr *iph, in ip_tunnel_get_ttl() argument 579 return iph->ttl; in ip_tunnel_get_ttl() 581 return ((const struct ipv6hdr *)iph)->hop_limit; in ip_tunnel_get_ttl() 587 static inline u8 ip_tunnel_ecn_encap(u8 tos, const struct iphdr *iph, in ip_tunnel_ecn_encap() argument [all …]
|
| A D | dst_metadata.h | 222 const struct iphdr *iph = ip_hdr(skb); in ip_tun_rx_dst() local 224 return __ip_tun_set_dst(iph->saddr, iph->daddr, iph->tos, iph->ttl, in ip_tun_rx_dst()
|
| A D | inet_hashtables.h | 485 const struct iphdr *iph = ip_hdr(skb); in __inet_lookup_skb() local 488 sk = inet_steal_sock(net, skb, doff, iph->saddr, sport, iph->daddr, dport, in __inet_lookup_skb() 496 doff, iph->saddr, sport, in __inet_lookup_skb() 497 iph->daddr, dport, inet_iif(skb), sdif, in __inet_lookup_skb()
|
| A D | tcp.h | 481 u16 tcp_v4_get_syncookie(struct sock *sk, struct iphdr *iph, 483 u16 tcp_v6_get_syncookie(struct sock *sk, struct ipv6hdr *iph, 530 int __cookie_v4_check(const struct iphdr *iph, const struct tcphdr *th); 641 u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th, 675 int __cookie_v6_check(const struct ipv6hdr *iph, const struct tcphdr *th); 678 u32 __cookie_v6_init_sequence(const struct ipv6hdr *iph,
|
| A D | ipv6.h | 923 const struct ipv6hdr *iph) in iph_to_flow_copy_v6addrs() argument 928 memcpy(&flow->addrs.v6addrs, &iph->addrs, sizeof(flow->addrs.v6addrs)); in iph_to_flow_copy_v6addrs()
|
| /include/linux/ |
| A D | ip.h | 39 static inline unsigned int iph_totlen(const struct sk_buff *skb, const struct iphdr *iph) in iph_totlen() argument 41 u32 len = ntohs(iph->tot_len); in iph_totlen() 55 static inline void iph_set_totlen(struct iphdr *iph, unsigned int len) in iph_set_totlen() argument 57 iph->tot_len = len <= IP_MAX_MTU ? htons(len) : 0; in iph_set_totlen()
|
| A D | netfilter_ipv6.h | 51 u32 (*cookie_init_sequence)(const struct ipv6hdr *iph, 53 int (*cookie_v6_check)(const struct ipv6hdr *iph, 164 static inline u32 nf_ipv6_cookie_init_sequence(const struct ipv6hdr *iph, in nf_ipv6_cookie_init_sequence() argument 173 return v6_ops->cookie_init_sequence(iph, th, mssp); in nf_ipv6_cookie_init_sequence() 175 return __cookie_v6_init_sequence(iph, th, mssp); in nf_ipv6_cookie_init_sequence() 181 static inline int nf_cookie_v6_check(const struct ipv6hdr *iph, in nf_cookie_v6_check() argument 189 return v6_ops->cookie_v6_check(iph, th); in nf_cookie_v6_check() 191 return __cookie_v6_check(iph, th); in nf_cookie_v6_check()
|
| /include/trace/events/ |
| A D | icmp.h | 29 struct iphdr *iph = ip_hdr(skb); 31 int proto_4 = iph->protocol; 51 *p32 = iph->saddr; 54 *p32 = iph->daddr;
|
| A D | net_probe_common.h | 90 const struct iphdr *iph = ip_hdr(skb); \ 92 if (iph->version == 6) { \
|
| /include/asm-generic/ |
| A D | checksum.h | 26 extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl);
|
| /include/uapi/linux/ |
| A D | if_tunnel.h | 55 struct iphdr iph; member
|