Lines Matching refs:iph
109 struct iphdr *iph; in tcf_nat() local
135 if (!pskb_may_pull(skb, sizeof(*iph))) in tcf_nat()
138 iph = ip_hdr(skb); in tcf_nat()
141 addr = iph->saddr; in tcf_nat()
143 addr = iph->daddr; in tcf_nat()
147 !skb_clone_writable(skb, sizeof(*iph)) && in tcf_nat()
155 iph = ip_hdr(skb); in tcf_nat()
157 iph->saddr = new_addr; in tcf_nat()
159 iph->daddr = new_addr; in tcf_nat()
161 csum_replace4(&iph->check, addr, new_addr); in tcf_nat()
164 ihl = iph->ihl * 4; in tcf_nat()
167 switch (iph->frag_off & htons(IP_OFFSET) ? 0 : iph->protocol) { in tcf_nat()
205 if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph))) in tcf_nat()
215 iph = (void *)(icmph + 1); in tcf_nat()
217 addr = iph->daddr; in tcf_nat()
219 addr = iph->saddr; in tcf_nat()
226 ihl + sizeof(*icmph) + sizeof(*iph)) && in tcf_nat()
231 iph = (void *)(icmph + 1); in tcf_nat()
238 iph->daddr = new_addr; in tcf_nat()
240 iph->saddr = new_addr; in tcf_nat()