Lines Matching defs:iphdr
293 struct ip_hdr *iphdr;
295 iphdr = (struct ip_hdr *)((void *)ethhdr + 14);
300 ip4_addr1(&iphdr->src), ip4_addr2(&iphdr->src),
301 ip4_addr3(&iphdr->src), ip4_addr4(&iphdr->src),
302 ip4_addr1(&iphdr->dest), ip4_addr2(&iphdr->dest),
303 ip4_addr3(&iphdr->dest), ip4_addr4(&iphdr->dest),
304 ntohs(IPH_LEN(iphdr)), ntohs(IPH_ID(iphdr)),
305 IPH_PROTO(iphdr), ntohs(IPH_CHKSUM(iphdr)),
306 (IPH_HL(iphdr) << 2),
317 struct ip_hdr *iphdr;
320 iphdr = (struct ip_hdr *)((void *)ethhdr + 14);
321 if (IPH_PROTO(iphdr) == IP_PROTO_ICMP) {
322 icmphdr = (struct icmp_echo_hdr *)((void *)iphdr + (IPH_HL(iphdr) << 2));
342 struct ip_hdr *iphdr;
345 iphdr = (struct ip_hdr *)((void *)ethhdr + 14);
346 if (IPH_PROTO(iphdr) == IP_PROTO_TCP) {
347 tcphdr = (struct tcp_hdr *)((void *)iphdr + (IPH_HL(iphdr) << 2));
368 struct ip_hdr *iphdr;
371 iphdr = (struct ip_hdr *)((void *)ethhdr + 14);
372 if (IPH_PROTO(iphdr) == IP_PROTO_UDP) {
373 udphdr = (struct udp_hdr *)((void *)iphdr + (IPH_HL(iphdr) << 2));