Lines Matching refs:ip4h
56 struct iphdr *ip4h; in rmnet_map_ipv4_dl_csum_trailer() local
60 ip4h = (struct iphdr *)(skb->data); in rmnet_map_ipv4_dl_csum_trailer()
61 if ((ntohs(ip4h->frag_off) & IP_MF) || in rmnet_map_ipv4_dl_csum_trailer()
62 ((ntohs(ip4h->frag_off) & IP_OFFSET) > 0)) { in rmnet_map_ipv4_dl_csum_trailer()
67 txporthdr = skb->data + ip4h->ihl * 4; in rmnet_map_ipv4_dl_csum_trailer()
69 csum_field = rmnet_map_get_csum_field(ip4h->protocol, txporthdr); in rmnet_map_ipv4_dl_csum_trailer()
77 if (*csum_field == 0 && ip4h->protocol == IPPROTO_UDP) { in rmnet_map_ipv4_dl_csum_trailer()
83 hdr_csum = ~ip_fast_csum(ip4h, (int)ip4h->ihl); in rmnet_map_ipv4_dl_csum_trailer()
87 pseudo_csum = ~csum_tcpudp_magic(ip4h->saddr, ip4h->daddr, in rmnet_map_ipv4_dl_csum_trailer()
88 ntohs(ip4h->tot_len) - ip4h->ihl * 4, in rmnet_map_ipv4_dl_csum_trailer()
89 ip4h->protocol, 0); in rmnet_map_ipv4_dl_csum_trailer()
98 switch (ip4h->protocol) { in rmnet_map_ipv4_dl_csum_trailer()
192 struct iphdr *ip4h = (struct iphdr *)iphdr; in rmnet_map_complement_ipv4_txporthdr_csum_field() local
196 txphdr = iphdr + ip4h->ihl * 4; in rmnet_map_complement_ipv4_txporthdr_csum_field()
198 if (ip4h->protocol == IPPROTO_TCP || ip4h->protocol == IPPROTO_UDP) { in rmnet_map_complement_ipv4_txporthdr_csum_field()
199 csum = (u16 *)rmnet_map_get_csum_field(ip4h->protocol, txphdr); in rmnet_map_complement_ipv4_txporthdr_csum_field()
209 struct iphdr *ip4h = (struct iphdr *)iphdr; in rmnet_map_ipv4_ul_csum_header() local
217 if (ip4h->protocol == IPPROTO_UDP) in rmnet_map_ipv4_ul_csum_header()