Rev 4350 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4350 | Rev 4728 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | * @{ |
30 | * @{ |
31 | */ |
31 | */ |
32 | 32 | ||
33 | /** @file |
33 | /** @file |
34 | * Ethernet protocol header definitions. |
34 | * Ethernet protocol header definitions. |
35 | * Names according to the linux src/include/linux/ip.h header file. |
35 | * Based on the IEEE~802.3-2005 |
36 | */ |
36 | */ |
37 | 37 | ||
38 | #ifndef __NET_ETH_HEADER_H__ |
38 | #ifndef __NET_ETH_HEADER_H__ |
39 | #define __NET_ETH_HEADER_H__ |
39 | #define __NET_ETH_HEADER_H__ |
40 | 40 | ||
Line 122... | Line 122... | ||
122 | /** Ethernet header SNAP extension. |
122 | /** Ethernet header SNAP extension. |
123 | */ |
123 | */ |
124 | struct eth_header_snap{ |
124 | struct eth_header_snap{ |
125 | /** Protocol identifier or organization code. |
125 | /** Protocol identifier or organization code. |
126 | */ |
126 | */ |
127 | uint8_t proto[ 3 ]; |
127 | uint8_t protocol[ 3 ]; |
128 | /** Ethernet protocol identifier in the network byte order (big endian). |
128 | /** Ethernet protocol identifier in the network byte order (big endian). |
129 | * @see ethernet_protocols.h |
129 | * @see ethernet_protocols.h |
130 | */ |
130 | */ |
131 | uint16_t ethertype; |
131 | uint16_t ethertype; |
132 | } __attribute__ ((packed)); |
132 | } __attribute__ ((packed)); |
Line 148... | Line 148... | ||
148 | /** Ethernet header. |
148 | /** Ethernet header. |
149 | */ |
149 | */ |
150 | struct eth_header{ |
150 | struct eth_header{ |
151 | /** Destination host Ethernet address (MAC address). |
151 | /** Destination host Ethernet address (MAC address). |
152 | */ |
152 | */ |
153 | uint8_t dest[ ETH_ADDR ]; |
153 | uint8_t destination_address[ ETH_ADDR ]; |
154 | /** Source host Ethernet address (MAC address). |
154 | /** Source host Ethernet address (MAC address). |
155 | */ |
155 | */ |
156 | uint8_t src[ ETH_ADDR ]; |
156 | uint8_t source_address[ ETH_ADDR ]; |
157 | /** Ethernet protocol identifier in the network byte order (big endian). |
157 | /** Ethernet protocol identifier in the network byte order (big endian). |
158 | * @see ethernet_protocols.h |
158 | * @see ethernet_protocols.h |
159 | */ |
159 | */ |
160 | uint16_t ethertype; |
160 | uint16_t ethertype; |
161 | } __attribute__ ((packed)); |
161 | } __attribute__ ((packed)); |