Lines Matching refs:ethhdr
1036 if (length < sizeof(struct ethhdr))
1038 struct ethhdr* ethhdr = (struct ethhdr*)&data[0];
1040 if (ethhdr->h_proto == htons(ETH_P_IP)) {
1041 if (length < sizeof(struct ethhdr) + sizeof(struct iphdr))
1043 struct iphdr* iphdr = (struct iphdr*)&data[sizeof(struct ethhdr)];
1046 if (length < sizeof(struct ethhdr) + iphdr->ihl * 4 + sizeof(struct tcphdr))
1048 tcphdr = (struct tcphdr*)&data[sizeof(struct ethhdr) + iphdr->ihl * 4];
1050 if (length < sizeof(struct ethhdr) + sizeof(struct ipv6hdr))
1052 struct ipv6hdr* ipv6hdr = (struct ipv6hdr*)&data[sizeof(struct ethhdr)];
1055 if (length < sizeof(struct ethhdr) + sizeof(struct ipv6hdr) + sizeof(struct tcphdr))
1057 tcphdr = (struct tcphdr*)&data[sizeof(struct ethhdr) + sizeof(struct ipv6hdr)];