Skip to content

Commit

Permalink
netinet/if_ether.h: move #define ETH_XXX into if_ether.h
Browse files Browse the repository at this point in the history
consistent with other operating systems

Signed-off-by: zhanghongyu <[email protected]>
  • Loading branch information
zhhyu7 authored and xiaoxiang781216 committed Nov 4, 2024
1 parent ba56c6c commit 082bc17
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
11 changes: 10 additions & 1 deletion include/netinet/if_ether.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,16 @@
* Pre-processor Definitions
****************************************************************************/

#define ETH_ALEN 6 /* Octets in one ethernet addr */
#define ETH_ALEN 6 /* Octets in one ethernet addr */
#define ETH_TLEN 2 /* Octets in ethernet type field */
#define ETH_HLEN 14 /* Total octets in header. */
#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 */

#define ETH_MIN_MTU 68 /* Min IPv4 MTU per RFC791 */
#define ETH_MAX_MTU 0xFFFFU /* 65535, same as IP_MAX_MTU */

#define ETH_P_IP ETHERTYPE_IP
#define ETH_P_ARP ETHERTYPE_ARP
Expand Down
17 changes: 2 additions & 15 deletions include/nuttx/wireless/ieee80211/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,12 @@
#include <nuttx/config.h>
#include <nuttx/compiler.h>

#include <netinet/if_ether.h>

/****************************************************************************
* Pre-processor Definitions
****************************************************************************/

/* IEEE 802.3 Ethernet magic constants. The frame sizes omit the preamble
* and FCS/CRC (frame check sequence).
*/

#define ETH_ALEN 6 /* Octets in one ethernet addr */
#define ETH_TLEN 2 /* Octets in ethernet type field */
#define ETH_HLEN 14 /* Total octets in header. */
#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 */

#define ETH_MIN_MTU 68 /* Min IPv4 MTU per RFC791 */
#define ETH_MAX_MTU 0xFFFFU /* 65535, same as IP_MAX_MTU */

/* DS bit usage
*
* TA = transmitter address
Expand Down

0 comments on commit 082bc17

Please sign in to comment.