X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Flinux%2Fif_ether.h;h=5f9297793661784f05d2e8567f6f4eddc36d43b8;hb=1edee60e9d994f2b9a79b1333be39790683541fe;hp=ab08f35cbc355f4b2058d88ff289552f202ea5b4;hpb=2e9abdd9bad485970b37cd53a82f92702054984c;p=powerpc.git diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h index ab08f35cbc..5f92977936 100644 --- a/include/linux/if_ether.h +++ b/include/linux/if_ether.h @@ -33,6 +33,7 @@ #define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ #define ETH_DATA_LEN 1500 /* Max. octets in payload */ #define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ +#define ETH_FCS_LEN 4 /* Octets in the FCS */ /* * These are the defined Ethernet Protocol ID's. @@ -61,6 +62,7 @@ #define ETH_P_8021Q 0x8100 /* 802.1Q VLAN Extended Header */ #define ETH_P_IPX 0x8137 /* IPX over DIX */ #define ETH_P_IPV6 0x86DD /* IPv6 over bluebook */ +#define ETH_P_PAUSE 0x8808 /* IEEE Pause frames. See 802.3 31B */ #define ETH_P_SLOW 0x8809 /* Slow Protocol. See 802.3ad 43B */ #define ETH_P_WCCP 0x883E /* Web-cache coordination protocol * defined in draft-wilson-wrec-wccp-v2-00.txt */ @@ -112,12 +114,22 @@ struct ethhdr { static inline struct ethhdr *eth_hdr(const struct sk_buff *skb) { - return (struct ethhdr *)skb->mac.raw; + return (struct ethhdr *)skb_mac_header(skb); } +int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr); + #ifdef CONFIG_SYSCTL extern struct ctl_table ether_table[]; #endif + +/* + * Display a 6 byte device address (MAC) in a readable format. + */ +#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x" +extern char *print_mac(char *buf, const u8 *addr); +#define DECLARE_MAC_BUF(var) char var[18] __maybe_unused + #endif #endif /* _LINUX_IF_ETHER_H */