Lines Matching refs:eth
177 static inline void swap_eth(struct ethhdr *eth);
642 static inline void swap_eth(struct ethhdr *eth) {
644 memcpy(tmp_mac, eth->h_dest, ETH_ALEN);
645 memcpy(eth->h_dest, eth->h_source, ETH_ALEN);
646 memcpy(eth->h_source, tmp_mac, ETH_ALEN);
746 struct ethhdr *eth = (struct ethhdr *)pkt;
756 if (*len < (sizeof(*eth) + sizeof(struct iphdr) + sizeof(*udp)))
759 data_before_dnshdr_len = sizeof(*eth) + sizeof(*udp);
761 switch (ntohs(eth->h_proto)) {
763 ipv6 = (struct ipv6hdr *)(eth + 1);
765 if (*len < (sizeof(*eth) + sizeof(*ipv6) + sizeof(*udp)))
770 dnslen -= (uint32_t) (sizeof(*eth) + sizeof(*ipv6) + sizeof(*udp));
778 ipv4 = (struct iphdr *)(eth + 1);
783 dnslen -= (uint32_t) (sizeof(*eth) + sizeof(*ipv4) + sizeof(*udp));
794 /* if (*len < (sizeof(*eth) + sizeof(*vlan))) */
844 swap_eth(eth);