Lines Matching refs:ip
269 struct iphdr *ip; in efx_gen_tun_header_ipv4() local
271 ip = (struct iphdr *)(encap->encap_hdr + encap->encap_hdr_len); in efx_gen_tun_header_ipv4()
272 encap->encap_hdr_len += sizeof(*ip); in efx_gen_tun_header_ipv4()
274 ip->daddr = key->u.ipv4.dst; in efx_gen_tun_header_ipv4()
275 ip->saddr = key->u.ipv4.src; in efx_gen_tun_header_ipv4()
276 ip->ttl = neigh->ttl; in efx_gen_tun_header_ipv4()
277 ip->protocol = ipproto; in efx_gen_tun_header_ipv4()
278 ip->version = 0x4; in efx_gen_tun_header_ipv4()
279 ip->ihl = 0x5; in efx_gen_tun_header_ipv4()
280 ip->tot_len = cpu_to_be16(ip->ihl * 4 + len); in efx_gen_tun_header_ipv4()
281 ip_send_check(ip); in efx_gen_tun_header_ipv4()
289 struct ipv6hdr *ip; in efx_gen_tun_header_ipv6() local
291 ip = (struct ipv6hdr *)(encap->encap_hdr + encap->encap_hdr_len); in efx_gen_tun_header_ipv6()
292 encap->encap_hdr_len += sizeof(*ip); in efx_gen_tun_header_ipv6()
294 ip6_flow_hdr(ip, key->tos, key->label); in efx_gen_tun_header_ipv6()
295 ip->daddr = key->u.ipv6.dst; in efx_gen_tun_header_ipv6()
296 ip->saddr = key->u.ipv6.src; in efx_gen_tun_header_ipv6()
297 ip->hop_limit = neigh->ttl; in efx_gen_tun_header_ipv6()
298 ip->nexthdr = ipproto; in efx_gen_tun_header_ipv6()
299 ip->version = 0x6; in efx_gen_tun_header_ipv6()
300 ip->payload_len = cpu_to_be16(len); in efx_gen_tun_header_ipv6()