Home
last modified time | relevance | path

Searched refs:iph (Results 1 – 15 of 15) sorted by relevance

/include/net/netfilter/
Dnf_tables_ipv4.h23 struct iphdr *iph, _iph; in __nft_set_pktinfo_ipv4_validate() local
26 iph = skb_header_pointer(skb, skb_network_offset(skb), sizeof(*iph), in __nft_set_pktinfo_ipv4_validate()
28 if (!iph) in __nft_set_pktinfo_ipv4_validate()
31 if (iph->ihl < 5 || iph->version != 4) in __nft_set_pktinfo_ipv4_validate()
34 len = ntohs(iph->tot_len); in __nft_set_pktinfo_ipv4_validate()
35 thoff = iph->ihl * 4; in __nft_set_pktinfo_ipv4_validate()
42 pkt->tprot = iph->protocol; in __nft_set_pktinfo_ipv4_validate()
44 pkt->xt.fragoff = ntohs(iph->frag_off) & IP_OFFSET; in __nft_set_pktinfo_ipv4_validate()
59 struct iphdr *iph; in nft_set_pktinfo_ipv4_ingress() local
62 if (!pskb_may_pull(skb, sizeof(*iph))) in nft_set_pktinfo_ipv4_ingress()
[all …]
Dnf_queue.h49 static inline u32 hash_v4(const struct iphdr *iph, u32 initval) in hash_v4() argument
52 if ((__force u32)iph->saddr < (__force u32)iph->daddr) in hash_v4()
53 return jhash_3words((__force u32)iph->saddr, in hash_v4()
54 (__force u32)iph->daddr, iph->protocol, initval); in hash_v4()
56 return jhash_3words((__force u32)iph->daddr, in hash_v4()
57 (__force u32)iph->saddr, iph->protocol, initval); in hash_v4()
85 struct iphdr *iph, _iph; in hash_bridge() local
89 iph = skb_header_pointer(skb, skb_network_offset(skb), in hash_bridge()
90 sizeof(*iph), &_iph); in hash_bridge()
91 if (iph) in hash_bridge()
[all …]
/include/net/
Ddsfield.h16 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()
Dinet_ecn.h76 static inline int IP_ECN_set_ce(struct iphdr *iph) in IP_ECN_set_ce() argument
78 u32 check = (__force u32)iph->check; in IP_ECN_set_ce()
79 u32 ecn = (iph->tos + 1) & INET_ECN_MASK; in IP_ECN_set_ce()
98 iph->check = (__force __sum16)(check + (check>=0xFFFF)); in IP_ECN_set_ce()
99 iph->tos |= INET_ECN_CE; in IP_ECN_set_ce()
103 static inline int IP_ECN_set_ect1(struct iphdr *iph) in IP_ECN_set_ect1() argument
105 u32 check = (__force u32)iph->check; in IP_ECN_set_ect1()
107 if ((iph->tos & INET_ECN_MASK) != INET_ECN_ECT_0) in IP_ECN_set_ect1()
112 iph->check = (__force __sum16)(check + (check>=0xFFFF)); in IP_ECN_set_ect1()
113 iph->tos ^= INET_ECN_MASK; in IP_ECN_set_ect1()
[all …]
Dip_vs.h77 const struct ipv6hdr *iph = skb_header_pointer( in ip_vs_fill_iph_skb_off() local
79 if (!iph) in ip_vs_fill_iph_skb_off()
82 iphdr->saddr.in6 = iph->saddr; in ip_vs_fill_iph_skb_off()
83 iphdr->daddr.in6 = iph->daddr; in ip_vs_fill_iph_skb_off()
96 const struct iphdr *iph = skb_header_pointer( in ip_vs_fill_iph_skb_off() local
98 if (!iph) in ip_vs_fill_iph_skb_off()
101 iphdr->len = offset + iph->ihl * 4; in ip_vs_fill_iph_skb_off()
103 iphdr->protocol = iph->protocol; in ip_vs_fill_iph_skb_off()
104 iphdr->saddr.ip = iph->saddr; in ip_vs_fill_iph_skb_off()
105 iphdr->daddr.ip = iph->daddr; in ip_vs_fill_iph_skb_off()
[all …]
Dip6_checksum.h48 const struct ipv6hdr *iph = skb_gro_network_header(skb); in ip6_gro_compute_pseudo() local
50 return ~csum_unfold(csum_ipv6_magic(&iph->saddr, &iph->daddr, in ip6_gro_compute_pseudo()
Dip.h175 struct iphdr *iph; member
180 void ip_fraglist_init(struct sk_buff *skb, struct iphdr *iph,
400 static inline bool ip_is_fragment(const struct iphdr *iph) in ip_is_fragment() argument
402 return (iph->frag_off & htons(IP_MF | IP_OFFSET)) != 0; in ip_is_fragment()
411 int ip_decrease_ttl(struct iphdr *iph) in ip_decrease_ttl() argument
413 u32 check = (__force u32)iph->check; in ip_decrease_ttl()
415 iph->check = (__force __sum16)(check + (check>=0xFFFF)); in ip_decrease_ttl()
416 return --iph->ttl; in ip_decrease_ttl()
519 void __ip_select_ident(struct net *net, struct iphdr *iph, int segs);
524 struct iphdr *iph = ip_hdr(skb); in ip_select_ident_segs() local
[all …]
Ddst_metadata.h180 const struct iphdr *iph = ip_hdr(skb); in ip_tun_rx_dst() local
182 return __ip_tun_set_dst(iph->saddr, iph->daddr, iph->tos, iph->ttl, in ip_tun_rx_dst()
Dip_tunnels.h378 static inline u8 ip_tunnel_get_dsfield(const struct iphdr *iph, in ip_tunnel_get_dsfield() argument
384 return iph->tos; in ip_tunnel_get_dsfield()
386 return ipv6_get_dsfield((const struct ipv6hdr *)iph); in ip_tunnel_get_dsfield()
391 static inline u8 ip_tunnel_get_ttl(const struct iphdr *iph, in ip_tunnel_get_ttl() argument
397 return iph->ttl; in ip_tunnel_get_ttl()
399 return ((const struct ipv6hdr *)iph)->hop_limit; in ip_tunnel_get_ttl()
405 static inline u8 ip_tunnel_ecn_encap(u8 tos, const struct iphdr *iph, in ip_tunnel_ecn_encap() argument
408 u8 inner = ip_tunnel_get_dsfield(iph, skb); in ip_tunnel_ecn_encap()
Dinet_hashtables.h374 const struct iphdr *iph = ip_hdr(skb); in __inet_lookup_skb() local
380 doff, iph->saddr, sport, in __inet_lookup_skb()
381 iph->daddr, dport, inet_iif(skb), sdif, in __inet_lookup_skb()
Dtcp.h427 u16 tcp_v4_get_syncookie(struct sock *sk, struct iphdr *iph,
429 u16 tcp_v6_get_syncookie(struct sock *sk, struct ipv6hdr *iph,
475 int __cookie_v4_check(const struct iphdr *iph, const struct tcphdr *th,
560 u32 __cookie_v4_init_sequence(const struct iphdr *iph, const struct tcphdr *th,
570 int __cookie_v6_check(const struct ipv6hdr *iph, const struct tcphdr *th,
574 u32 __cookie_v6_init_sequence(const struct ipv6hdr *iph,
Dipv6.h833 const struct ipv6hdr *iph) in iph_to_flow_copy_v6addrs() argument
838 memcpy(&flow->addrs.v6addrs, &iph->addrs, sizeof(flow->addrs.v6addrs)); in iph_to_flow_copy_v6addrs()
/include/linux/
Dnetfilter_ipv6.h52 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, cookie); in nf_cookie_v6_check()
194 return __cookie_v6_check(iph, th, cookie); in nf_cookie_v6_check()
/include/asm-generic/
Dchecksum.h24 extern __sum16 ip_fast_csum(const void *iph, unsigned int ihl);
/include/uapi/linux/
Dif_tunnel.h55 struct iphdr iph; member