This source file includes following definitions.
- eth_hdr
- skb_eth_hdr
- inner_eth_hdr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
28
29
30 static inline struct ethhdr *skb_eth_hdr(const struct sk_buff *skb)
31 {
32 return (struct ethhdr *)skb->data;
33 }
34
35 static inline struct ethhdr *inner_eth_hdr(const struct sk_buff *skb)
36 {
37 return (struct ethhdr *)skb_inner_mac_header(skb);
38 }
39
40 int eth_header_parse(const struct sk_buff *skb, unsigned char *haddr);
41
42 extern ssize_t sysfs_format_mac(char *buf, const unsigned char *addr, int len);
43
44 #endif