diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2004-10-18 18:03:51 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-10-18 18:03:51 -0700 |
| commit | bffe01870598b7a0a77073e25ee94e026bc98e6b (patch) | |
| tree | f5f5b65fec1239b18a4c2634807ff5d7e5729de9 /include/linux/if_ether.h | |
| parent | 23aebb6f8755121394ef088d84a7fa483b444aa9 (diff) | |
| parent | a4946826c30c56a5830326552a395c5b6afc13ef (diff) | |
merge
Diffstat (limited to 'include/linux/if_ether.h')
| -rw-r--r-- | include/linux/if_ether.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index d62b4dfd8305..4037aaab7aa9 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h @@ -96,11 +96,19 @@ * This is an Ethernet frame header. */ -struct ethhdr -{ +struct ethhdr { unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ unsigned char h_source[ETH_ALEN]; /* source ether addr */ unsigned short h_proto; /* packet type ID field */ } __attribute__((packed)); +#ifdef __KERNEL__ +#include <linux/skbuff.h> + +static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) +{ + return (struct ethhdr *)skb->mac.raw; +} +#endif + #endif /* _LINUX_IF_ETHER_H */ |
