Lines Matching defs:iph
84 struct iphdr *iph = data + sizeof(struct ethhdr);
92 if (iph + 1 > data_end)
95 dport = get_dport(iph + 1, data_end, iph->protocol);
99 vip.protocol = iph->protocol;
101 vip.daddr.v4 = iph->daddr;
103 payload_len = ntohs(iph->tot_len);
119 iph = data + sizeof(*new_eth);
120 old_eth = data + sizeof(*iph);
124 iph + 1 > data_end)
129 iph->version = 4;
130 iph->ihl = sizeof(*iph) >> 2;
131 iph->frag_off = 0;
132 iph->protocol = IPPROTO_IPIP;
133 iph->check = 0;
134 iph->tos = 0;
135 iph->tot_len = htons(payload_len + sizeof(*iph));
136 iph->daddr = tnl->daddr.v4;
137 iph->saddr = tnl->saddr.v4;
138 iph->ttl = 8;
140 next_iph_u16 = (u16 *)iph;
142 for (i = 0; i < sizeof(*iph) >> 1; i++)
145 iph->check = ~((csum & 0xffff) + (csum >> 16));