diff --git a/sys/include/net/netopt.h b/sys/include/net/netopt.h index 6385e68145..e94842dd90 100644 --- a/sys/include/net/netopt.h +++ b/sys/include/net/netopt.h @@ -299,6 +299,16 @@ typedef enum { */ NETOPT_LINK, + /** + * @brief (@ref netopt_enable_t) network interface status. + * + * This option is used check state or to enable/disable the interface, + * regardless of link status. + * + * @note On error this option should return a negative number. + */ + NETOPT_ACTIVE, + /** * @brief (@ref netopt_enable_t) CSMA/CA support * diff --git a/sys/net/crosslayer/netopt/netopt.c b/sys/net/crosslayer/netopt/netopt.c index 9c66cbc0b4..bfadebe8b6 100644 --- a/sys/net/crosslayer/netopt/netopt.c +++ b/sys/net/crosslayer/netopt/netopt.c @@ -63,6 +63,7 @@ static const char *_netopt_strmap[] = { [NETOPT_MAC_NO_SLEEP] = "NETOPT_MAC_NO_SLEEP", [NETOPT_IS_WIRED] = "NETOPT_IS_WIRED", [NETOPT_LINK] = "NETOPT_LINK", + [NETOPT_ACTIVE] = "NETOPT_ACTIVE", [NETOPT_DEVICE_TYPE] = "NETOPT_DEVICE_TYPE", [NETOPT_CHANNEL_PAGE] = "NETOPT_CHANNEL_PAGE", [NETOPT_CCA_THRESHOLD] = "NETOPT_CCA_THRESHOLD",