Lines Matching refs:iph
65 struct iphdr *iph; in icmp_check() local
67 if (data + sizeof(*eth) + sizeof(*iph) + ICMP_ECHO_LEN > data_end) in icmp_check()
73 iph = data + sizeof(*eth); in icmp_check()
75 if (iph->protocol != IPPROTO_ICMP) in icmp_check()
78 if (bpf_ntohs(iph->tot_len) - sizeof(*iph) != ICMP_ECHO_LEN) in icmp_check()
81 icmph = data + sizeof(*eth) + sizeof(*iph); in icmp_check()
97 struct iphdr *iph; in xdping_client() local
109 iph = data + sizeof(*eth); in xdping_client()
110 icmph = data + sizeof(*eth) + sizeof(*iph); in xdping_client()
111 raddr = iph->saddr; in xdping_client()
139 iph->saddr = iph->daddr; in xdping_client()
140 iph->daddr = raddr; in xdping_client()
160 struct iphdr *iph; in xdping_server() local
169 iph = data + sizeof(*eth); in xdping_server()
170 icmph = data + sizeof(*eth) + sizeof(*iph); in xdping_server()
171 raddr = iph->saddr; in xdping_server()
175 iph->saddr = iph->daddr; in xdping_server()
176 iph->daddr = raddr; in xdping_server()