]> Git Repo - linux.git/blob - include/linux/if_ether.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
[linux.git] / include / linux / if_ether.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * INET         An implementation of the TCP/IP protocol suite for the LINUX
4  *              operating system.  INET is implemented using the  BSD Socket
5  *              interface as the means of communication with the user level.
6  *
7  *              Global definitions for the Ethernet IEEE 802.3 interface.
8  *
9  * Version:     @(#)if_ether.h  1.0.1a  02/08/94
10  *
11  * Author:      Fred N. van Kempen, <[email protected]>
12  *              Donald Becker, <[email protected]>
13  *              Alan Cox, <[email protected]>
14  *              Steve Whitehouse, <[email protected]>
15  */
16 #ifndef _LINUX_IF_ETHER_H
17 #define _LINUX_IF_ETHER_H
18
19 #include <linux/skbuff.h>
20 #include <uapi/linux/if_ether.h>
21
22 static inline struct ethhdr *eth_hdr(const struct sk_buff *skb)
23 {
24         return (struct ethhdr *)skb_mac_header(skb);
25 }
26
27 static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb)
28 {
29         return (struct ethhdr *)skb_inner_mac_header(skb);
30 }
31
32 int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr);
33
34 extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len);
35
36 #endif  /* _LINUX_IF_ETHER_H */
This page took 0.028039 seconds and 4 git commands to generate.