1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

net/ng_netdev: changed semantics of get function

This commit is contained in:
Hauke Petersen 2015-03-13 19:39:32 +01:00
parent 2d064614af
commit 48c41661bc

View File

@ -115,17 +115,17 @@ typedef struct {
* @param[in] dev network device descriptor
* @param[in] opt option type
* @param[out] value pointer to store the option's value in
* @param[in,out] value_len the length of @p value. Must be initialized to
* the available space in @p value on call.
* @param[in] max_len maximal amount of byte that fit into @p value
*
* @return 0 on success
* @return number of bytes written to @p value
* @return -ENODEV if @p dev is invalid
* @return -ENOTSUP if @p opt is not supported
* @return -EOVERFLOW if available space in @p value given in
* @p value_len is too small to store the option value
* @p max_len is too small to store the option value
* @return -ECANCELED if internal driver error occurred
*/
int (*get)(ng_netdev_t *dev, ng_netconf_opt_t opt,
void *value, size_t *value_len);
void *value, size_t max_len);
/**
* @brief Set an option value for a given network device
@ -135,10 +135,11 @@ typedef struct {
* @param[in] value value to set
* @param[in] value_len the length of @p value
*
* @return 0 on success
* @return number of bytes used from @p value
* @return -ENODEV if @p dev is invalid
* @return -ENOTSUP if @p opt is not supported
* @return -EINVAL if @p value is invalid
* @return -ECANCELED if internal driver error occurred
*/
int (*set)(ng_netdev_t *dev, ng_netconf_opt_t opt,
void *value, size_t value_len);