| /include/net/netfilter/ |
| D | nf_tables_ipv4.h | 21 struct iphdr *iph, _iph; in __nft_set_pktinfo_ipv4_validate() local 24 iph = skb_header_pointer(pkt->skb, skb_network_offset(pkt->skb), in __nft_set_pktinfo_ipv4_validate() 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() 32 len = iph_totlen(pkt->skb, iph); in __nft_set_pktinfo_ipv4_validate() 33 thoff = iph->ihl * 4; in __nft_set_pktinfo_ipv4_validate() 40 else if (thoff < sizeof(*iph)) in __nft_set_pktinfo_ipv4_validate() 44 pkt->tprot = iph->protocol; in __nft_set_pktinfo_ipv4_validate() 46 pkt->fragoff = ntohs(iph->frag_off) & IP_OFFSET; in __nft_set_pktinfo_ipv4_validate() [all …]
|
| 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/ |
| 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()
|
| D | inet_ecn.h | 77 static inline int IP_ECN_set_ce(struct iphdr *iph) in IP_ECN_set_ce() argument 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() 105 static inline int IP_ECN_set_ect1(struct iphdr *iph) in IP_ECN_set_ect1() argument 107 if ((iph->tos & INET_ECN_MASK) != INET_ECN_ECT_0) in IP_ECN_set_ect1() 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() 115 static inline void IP_ECN_clear(struct iphdr *iph) in IP_ECN_clear() argument 117 iph->tos &= ~INET_ECN_MASK; in IP_ECN_clear() [all …]
|
| D | ip_vs.h | 80 const struct ipv6hdr *iph = skb_header_pointer( in ip_vs_fill_iph_skb_off() local 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() 99 const struct iphdr *iph = skb_header_pointer( in ip_vs_fill_iph_skb_off() local 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() [all …]
|
| 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()
|
| D | ip.h | 178 struct iphdr *iph; member 183 void ip_fraglist_init(struct sk_buff *skb, struct iphdr *iph, 410 static inline bool ip_is_fragment(const struct iphdr *iph) in ip_is_fragment() argument 412 return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0; in ip_is_fragment() 421 int ip_decrease_ttl(struct iphdr *iph) in ip_decrease_ttl() argument 423 u32 check = (__force u32)iph->check; in ip_decrease_ttl() 425 iph->check = (__force __sum16)(check + (check>=0xFFFF)); in ip_decrease_ttl() 426 return --iph->ttl; in ip_decrease_ttl() 556 void __ip_select_ident(struct net *net, struct iphdr *iph, int segs); 561 struct iphdr *iph = ip_hdr(skb); in ip_select_ident_segs() local [all …]
|
| D | ip_tunnels.h | 139 struct iphdr iph; member 539 static inline u8 ip_tunnel_get_dsfield(const struct iphdr *iph, in ip_tunnel_get_dsfield() argument 545 return iph->tos; in ip_tunnel_get_dsfield() 547 return ipv6_get_dsfield((const struct ipv6hdr *)iph); in ip_tunnel_get_dsfield() 552 static inline __be32 ip_tunnel_get_flowlabel(const struct iphdr *iph, in ip_tunnel_get_flowlabel() argument 558 return ip6_flowlabel((const struct ipv6hdr *)iph); in ip_tunnel_get_flowlabel() 563 static inline u8 ip_tunnel_get_ttl(const struct iphdr *iph, in ip_tunnel_get_ttl() argument 569 return iph->ttl; in ip_tunnel_get_ttl() 571 return ((const struct ipv6hdr *)iph)->hop_limit; in ip_tunnel_get_ttl() 577 static inline u8 ip_tunnel_ecn_encap(u8 tos, const struct iphdr *iph, in ip_tunnel_ecn_encap() argument [all …]
|
| D | dst_metadata.h | 225 const struct iphdr *iph = ip_hdr(skb); in ip_tun_rx_dst() local 227 return __ip_tun_set_dst(iph->saddr, iph->daddr, iph->tos, iph->ttl, in ip_tun_rx_dst()
|
| D | inet_hashtables.h | 496 const struct iphdr *iph = ip_hdr(skb); in __inet_lookup_skb() local 499 sk = inet_steal_sock(net, skb, doff, iph->saddr, sport, iph->daddr, dport, in __inet_lookup_skb() 507 doff, iph->saddr, sport, in __inet_lookup_skb() 508 iph->daddr, dport, inet_iif(skb), sdif, in __inet_lookup_skb()
|
| D | tcp.h | 441 u16 tcp_v4_get_syncookie(struct sock *sk, struct iphdr *iph, 443 u16 tcp_v6_get_syncookie(struct sock *sk, struct ipv6hdr *iph, 490 int __cookie_v4_check(const struct iphdr *iph, const struct tcphdr *th); 601 u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th, 635 int __cookie_v6_check(const struct ipv6hdr *iph, const struct tcphdr *th); 638 u32 __cookie_v6_init_sequence(const struct ipv6hdr *iph,
|
| D | ipv6.h | 918 const struct ipv6hdr *iph) in iph_to_flow_copy_v6addrs() argument 923 memcpy(&flow->addrs.v6addrs, &iph->addrs, sizeof(flow->addrs.v6addrs)); in iph_to_flow_copy_v6addrs()
|
| /include/linux/ |
| 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()
|
| D | netfilter_ipv6.h | 52 u32 (*cookie_init_sequence)(const struct ipv6hdr *iph, 54 int (*cookie_v6_check)(const struct ipv6hdr *iph, 167 static inline u32 nf_ipv6_cookie_init_sequence(const struct ipv6hdr *iph, in nf_ipv6_cookie_init_sequence() argument 176 return v6_ops->cookie_init_sequence(iph, th, mssp); in nf_ipv6_cookie_init_sequence() 178 return __cookie_v6_init_sequence(iph, th, mssp); in nf_ipv6_cookie_init_sequence() 184 static inline int nf_cookie_v6_check(const struct ipv6hdr *iph, in nf_cookie_v6_check() argument 192 return v6_ops->cookie_v6_check(iph, th); in nf_cookie_v6_check() 194 return __cookie_v6_check(iph, th); in nf_cookie_v6_check()
|
| /include/trace/events/ |
| D | icmp.h | 29 struct iphdr *iph = ip_hdr(skb); 31 int proto_4 = iph->protocol; 51 *p32 = iph->saddr; 54 *p32 = iph->daddr;
|
| D | net_probe_common.h | 90 const struct iphdr *iph = ip_hdr(skb); \ 92 if (iph->version == 6) { \
|
| /include/asm-generic/ |
| D | checksum.h | 26 extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl);
|
| /include/uapi/linux/ |
| D | if_tunnel.h | 55 struct iphdr iph; member
|