eth.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Kaspar Schleiser <kaspar@schleiser.de>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser General
5  * Public License v2.1. See the file LICENSE in the top level directory for
6  * more details.
7  */
8 
20 #ifndef NET_NETDEV_ETH_H
21 #define NET_NETDEV_ETH_H
22 
23 #include <stdint.h>
24 
25 #include "net/netdev.h"
26 #include "net/netopt.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 #define NETDEV_ETH_RX_INFO_FLAG_TIMESTAMP (0x01)
42 typedef struct {
47  uint64_t timestamp;
48  uint8_t flags;
50 
66 int netdev_eth_get(netdev_t *dev, netopt_t opt, void *value, size_t max_len);
67 
79 int netdev_eth_set(netdev_t *dev, netopt_t opt, const void *value, size_t value_len);
80 
81 #ifdef __cplusplus
82 }
83 #endif
84 
85 #endif /* NET_NETDEV_ETH_H */
Definitions low-level network driver interface.
int netdev_eth_get(netdev_t *dev, netopt_t opt, void *value, size_t max_len)
Fallback function for netdev ethernet devices' _get function.
int netdev_eth_set(netdev_t *dev, netopt_t opt, const void *value, size_t value_len)
Fallback function for netdev ethernet devices' _set function.
netopt_t
Global list of configuration options available throughout the network stack, e.g.
Definition: netopt.h:45
Definition of global configuration options.
Received frame status information for Ethernet devices.
Definition: eth.h:42
uint64_t timestamp
Time of the reception of the start of frame delimiter in nanoseconds since epoch.
Definition: eth.h:47
uint8_t flags
Flags e.g.
Definition: eth.h:48
Structure to hold driver state.
Definition: netdev.h:365