Detailed Description

Files

file  eth.h
 Definitions for netdev common ethernet code.
 

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