Lines Matching refs:ip
65 struct iphdr ip; member
71 struct ipv6hdr ip; member
152 olen = sizeof(h_outer.ip); in __encap_ipv4()
227 h_outer.ip = iph_inner; in __encap_ipv4()
228 h_outer.ip.tot_len = bpf_htons(olen + in __encap_ipv4()
229 bpf_ntohs(h_outer.ip.tot_len)); in __encap_ipv4()
230 h_outer.ip.protocol = encap_proto; in __encap_ipv4()
232 set_ipv4_csum((void *)&h_outer.ip); in __encap_ipv4()
283 olen = sizeof(h_outer.ip); in __encap_ipv6()
356 h_outer.ip = iph_inner; in __encap_ipv6()
357 h_outer.ip.payload_len = bpf_htons(olen + in __encap_ipv6()
358 bpf_ntohs(h_outer.ip.payload_len)); in __encap_ipv6()
360 h_outer.ip.nexthdr = encap_proto; in __encap_ipv6()
391 olen = sizeof(h_outer.ip); in encap_ipv6_ipip6()
400 memset(&h_outer.ip, 0, sizeof(h_outer.ip)); in encap_ipv6_ipip6()
401 h_outer.ip.version = 6; in encap_ipv6_ipip6()
402 h_outer.ip.hop_limit = iph_inner.ttl; in encap_ipv6_ipip6()
403 h_outer.ip.saddr.s6_addr[1] = 0xfd; in encap_ipv6_ipip6()
404 h_outer.ip.saddr.s6_addr[15] = 1; in encap_ipv6_ipip6()
405 h_outer.ip.daddr.s6_addr[1] = 0xfd; in encap_ipv6_ipip6()
406 h_outer.ip.daddr.s6_addr[15] = 2; in encap_ipv6_ipip6()
407 h_outer.ip.payload_len = iph_inner.tot_len; in encap_ipv6_ipip6()
408 h_outer.ip.nexthdr = IPPROTO_IPIP; in encap_ipv6_ipip6()