1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include/net/ethernet.h

57 lines
1.4 KiB
C
Raw Normal View History

2015-03-11 18:26:07 +01:00
/*
* Copyright (C) 2015 Martine Lenders <mlenders@inf.fu-berlin.de>
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License v2.1. See the file LICENSE in the top level directory for
* more details.
*/
/**
2015-08-07 07:39:02 +02:00
* @defgroup net_ethernet Ethernet
2015-03-11 18:26:07 +01:00
* @ingroup net
* @brief Provides Ethernet header and helper functions
2015-03-11 18:26:07 +01:00
* @{
*
* @file
* @brief Definitions for Ethernet
*
* @author Martine Lenders <mlenders@inf.fu-berlin.de>
*/
#ifndef NET_ETHERNET_H
#define NET_ETHERNET_H
2015-03-11 18:26:07 +01:00
2015-06-03 16:26:28 +02:00
#include <stdint.h>
2015-08-07 07:39:02 +02:00
#include "net/ethernet/hdr.h"
2015-06-03 16:26:28 +02:00
#include "net/eui64.h"
2015-03-11 18:26:07 +01:00
#ifdef __cplusplus
extern "C" {
#endif
2015-08-07 07:39:02 +02:00
#define ETHERNET_DATA_LEN (1500) /**< maximum number of bytes in payload */
#define ETHERNET_FCS_LEN (4) /**< number of bytes in the FCS
2015-03-11 18:26:07 +01:00
* (frame check sequence) */
/**
* @brief maximum number of bytes in an ethernet frame (without FCS)
*/
2015-08-07 07:39:02 +02:00
#define ETHERNET_FRAME_LEN (ETHERNET_DATA_LEN + sizeof(ethernet_hdr_t))
#define ETHERNET_MIN_LEN (64) /**< minimum number of bytes in an
2015-03-11 18:26:07 +01:00
* ethernet frame (with FCF) */
/**
* @brief maximum number of bytes in an ethernet frame (with FCF)
*/
2015-08-07 07:39:02 +02:00
#define ETHERNET_MAX_LEN (ETHERNET_FRAME_LEN + ETHERNET_FCS_LEN)
2015-03-11 18:26:07 +01:00
#ifdef __cplusplus
}
#endif
#endif /* NET_ETHERNET_H */
2015-03-11 18:26:07 +01:00
/**
* @}
*/