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 
9 #pragma once
10 
22 #include <stdint.h>
23 
24 #include "net/netdev.h"
25 #include "net/netopt.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #define NETDEV_ETH_RX_INFO_FLAG_TIMESTAMP (0x01)
41 typedef struct {
46  uint64_t timestamp;
47  uint8_t flags;
49 
65 int netdev_eth_get(netdev_t *dev, netopt_t opt, void *value, size_t max_len);
66 
78 int netdev_eth_set(netdev_t *dev, netopt_t opt, const void *value, size_t value_len);
79 
80 #ifdef __cplusplus
81 }
82 #endif
83 
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:44
Definition of global configuration options.
Received frame status information for Ethernet devices.
Definition: eth.h:41
uint64_t timestamp
Time of the reception of the start of frame delimiter in nanoseconds since epoch.
Definition: eth.h:46
uint8_t flags
Flags e.g.
Definition: eth.h:47
Structure to hold driver state.
Definition: netdev.h:364