Definitions for netdev common ethernet code. More...

Detailed Description

Definitions for netdev common ethernet code.

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

Definition in file eth.h.

#include <stdint.h>
#include "net/netdev.h"
#include "net/netopt.h"
+ Include dependency graph for eth.h:

Go to the source code of this file.

Functions

int netdev_eth_get (netdev_t *dev, netopt_t opt, void *value, size_t max_len)
 Fallback function for netdev ethernet devices' _get function. More...
 
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. More...
 

Function Documentation

◆ netdev_eth_get()

int netdev_eth_get ( netdev_t dev,
netopt_t  opt,
void *  value,
size_t  max_len 
)

Fallback function for netdev ethernet devices' _get function.

Supposed to be used by netdev drivers as default case.

Warning
Driver MUST implement NETOPT_ADDRESS case!
Parameters
[in]devnetwork device descriptor
[in]optoption type
[out]valuepointer to store the option's value in
[in]max_lenmaximal amount of byte that fit into value
Returns
number of bytes written to value
<0 on error

◆ netdev_eth_set()

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.

Parameters
[in]devnetwork device descriptor
[in]optoption type
[in]valuevalue to set
[in]value_lenthe length of value
Returns
number of bytes used from value
<0 on error