1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-16 10:03:50 +01:00

netopt: Add link status option

This commit is contained in:
Koen Zandberg 2018-02-20 12:05:50 +01:00
parent 6a112bdf51
commit 831e7635de
No known key found for this signature in database
GPG Key ID: BA1718B37D79F51C
2 changed files with 13 additions and 0 deletions

View File

@ -270,6 +270,18 @@ typedef enum {
*/ */
NETOPT_IS_WIRED, NETOPT_IS_WIRED,
/**
* @brief (@ref netopt_enable_t) Phy link status.
*
* Returns NETOPT_ENABLE when the the link of the interface is up,
* NETOPT_DISABLE when the link is down. If the interface is wireless or
* doesn't support link status detection this function will return
* -ENOTSUP.
*
* @note Setting this option will always return -ENOTSUP.
*/
NETOPT_LINK_CONNECTED,
/** /**
* @brief get a device's "type", e.g., ethernet, 802.15.4, ... * @brief get a device's "type", e.g., ethernet, 802.15.4, ...
*/ */

View File

@ -61,6 +61,7 @@ static const char *_netopt_strmap[] = {
[NETOPT_CSMA_MINBE] = "NETOPT_CSMA_MINBE", [NETOPT_CSMA_MINBE] = "NETOPT_CSMA_MINBE",
[NETOPT_MAC_NO_SLEEP] = "NETOPT_MAC_NO_SLEEP", [NETOPT_MAC_NO_SLEEP] = "NETOPT_MAC_NO_SLEEP",
[NETOPT_IS_WIRED] = "NETOPT_IS_WIRED", [NETOPT_IS_WIRED] = "NETOPT_IS_WIRED",
[NETOPT_LINK_CONNECTED] = "NETOPT_LINK_CONNECTED",
[NETOPT_DEVICE_TYPE] = "NETOPT_DEVICE_TYPE", [NETOPT_DEVICE_TYPE] = "NETOPT_DEVICE_TYPE",
[NETOPT_CHANNEL_PAGE] = "NETOPT_CHANNEL_PAGE", [NETOPT_CHANNEL_PAGE] = "NETOPT_CHANNEL_PAGE",
[NETOPT_CCA_THRESHOLD] = "NETOPT_CCA_THRESHOLD", [NETOPT_CCA_THRESHOLD] = "NETOPT_CCA_THRESHOLD",