Lines Matching refs:ethhdr
438 if (length < sizeof(struct ethhdr)) in syz_extract_tcp_res()
440 struct ethhdr* ethhdr = (struct ethhdr*)&data[0]; in syz_extract_tcp_res() local
442 if (ethhdr->h_proto == htons(ETH_P_IP)) { in syz_extract_tcp_res()
443 if (length < sizeof(struct ethhdr) + sizeof(struct iphdr)) in syz_extract_tcp_res()
445 struct iphdr* iphdr = (struct iphdr*)&data[sizeof(struct ethhdr)]; in syz_extract_tcp_res()
448 if (length < sizeof(struct ethhdr) + iphdr->ihl * 4 + sizeof(struct tcphdr)) in syz_extract_tcp_res()
450 tcphdr = (struct tcphdr*)&data[sizeof(struct ethhdr) + iphdr->ihl * 4]; in syz_extract_tcp_res()
452 if (length < sizeof(struct ethhdr) + sizeof(struct ipv6hdr)) in syz_extract_tcp_res()
454 struct ipv6hdr* ipv6hdr = (struct ipv6hdr*)&data[sizeof(struct ethhdr)]; in syz_extract_tcp_res()
458 if (length < sizeof(struct ethhdr) + sizeof(struct ipv6hdr) + sizeof(struct tcphdr)) in syz_extract_tcp_res()
460 tcphdr = (struct tcphdr*)&data[sizeof(struct ethhdr) + sizeof(struct ipv6hdr)]; in syz_extract_tcp_res()