1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

gnrc: rename ng_netconf to ng_netopt

Since [NETCONF](https://tools.ietf.org/html/rfc4741) is also a network
protocol, the naming of this module already led to some issues regarding
communicating about it. This is just an initial rename commit to ask for
comments. If there is interest I will adapt the code using the types
defined here.
This commit is contained in:
Martine Lenders 2015-07-20 13:59:28 +02:00 committed by Martine Lenders
parent 06da693933
commit 6a868d5f4c

View File

@ -7,7 +7,7 @@
*/ */
/** /**
* @defgroup net_ng_netconf Configuration options for network APIs * @defgroup net_ng_netopt Configuration options for network APIs
* @ingroup net * @ingroup net
* @brief List of available configuration options for the * @brief List of available configuration options for the
* @ref net_ng_netdev and the @ref net_ng_netapi * @ref net_ng_netdev and the @ref net_ng_netapi
@ -20,8 +20,8 @@
* @author Oliver Hahm <oliver.hahm@inria.fr> * @author Oliver Hahm <oliver.hahm@inria.fr>
*/ */
#ifndef NG_NET_CONF_H_ #ifndef NG_NETOPT_H_
#define NG_NET_CONF_H_ #define NG_NETOPT_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -32,21 +32,21 @@ extern "C" {
* network stack, e.g. by netdev and netapi * network stack, e.g. by netdev and netapi
*/ */
typedef enum { typedef enum {
NETCONF_OPT_CHANNEL, /**< get/set channel as uint16_t in host NG_NETOPT_CHANNEL, /**< get/set channel as uint16_t in host
* byte order */ * byte order */
NETCONF_OPT_IS_CHANNEL_CLR, /**< check if channel is clear */ NG_NETOPT_IS_CHANNEL_CLR, /**< check if channel is clear */
NETCONF_OPT_ADDRESS, /**< get/set address in host byte order */ NG_NETOPT_ADDRESS, /**< get/set address in host byte order */
/** /**
* @brief get/set long address in host byte order * @brief get/set long address in host byte order
* *
* Examples for this include the EUI-64 in IEEE 802.15.4 * Examples for this include the EUI-64 in IEEE 802.15.4
*/ */
NETCONF_OPT_ADDRESS_LONG, NG_NETOPT_ADDRESS_LONG,
NETCONF_OPT_ADDR_LEN, /**< get the default address length a NG_NETOPT_ADDR_LEN, /**< get the default address length a
* network device expects as uint16_t in * network device expects as uint16_t in
* host byte order */ * host byte order */
NETCONF_OPT_SRC_LEN, /**< get/set the address length to choose NG_NETOPT_SRC_LEN, /**< get/set the address length to choose
* for the network device's source address * for the network device's source address
* as uint16_t in host byte order */ * as uint16_t in host byte order */
/** /**
@ -54,7 +54,7 @@ typedef enum {
* *
* Examples for this include the PAN ID in IEEE 802.15.4 * Examples for this include the PAN ID in IEEE 802.15.4
*/ */
NETCONF_OPT_NID, NG_NETOPT_NID,
/** /**
* @brief get the IPv6 interface identifier of a network interface as * @brief get the IPv6 interface identifier of a network interface as
@ -70,31 +70,31 @@ typedef enum {
* <a href="https://tools.ietf.org/html/rfc2464">RFC 2464</a> or * <a href="https://tools.ietf.org/html/rfc2464">RFC 2464</a> or
* <a href="https://tools.ietf.org/html/rfc4944">RFC 4944</a>). * <a href="https://tools.ietf.org/html/rfc4944">RFC 4944</a>).
*/ */
NETCONF_OPT_IPV6_IID, NG_NETOPT_IPV6_IID,
NETCONF_OPT_TX_POWER, /**< get/set the output power for radio NG_NETOPT_TX_POWER, /**< get/set the output power for radio
* devices in dBm as int16_t in host byte * devices in dBm as int16_t in host byte
* order */ * order */
NETCONF_OPT_MAX_PACKET_SIZE, /**< get/set the maximum packet size a NG_NETOPT_MAX_PACKET_SIZE, /**< get/set the maximum packet size a
* network module can handle as uint16_t * network module can handle as uint16_t
* in host byte order */ * in host byte order */
/** /**
* @brief en/disable preloading or read the current state. * @brief en/disable preloading or read the current state.
* *
* Preload using ng_netdev_driver_t::send_data() or ng_netapi_send() * Preload using ng_netdev_driver_t::send_data() or ng_netapi_send()
* respectively, send setting state to @ref NETCONF_STATE_TX * respectively, send setting state to @ref NG_NETOPT_STATE_TX
*/ */
NETCONF_OPT_PRELOADING, NG_NETOPT_PRELOADING,
NETCONF_OPT_PROMISCUOUSMODE, /**< en/disable promiscuous mode or read NG_NETOPT_PROMISCUOUSMODE, /**< en/disable promiscuous mode or read
* the current state */ * the current state */
NETCONF_OPT_AUTOACK, /**< en/disable link layer auto ACKs or read NG_NETOPT_AUTOACK, /**< en/disable link layer auto ACKs or read
* the current state */ * the current state */
NETCONF_OPT_RETRANS, /**< get/set the maximum number of NG_NETOPT_RETRANS, /**< get/set the maximum number of
retransmissions. */ retransmissions. */
NETCONF_OPT_PROTO, /**< get/set the protocol for the layer NG_NETOPT_PROTO, /**< get/set the protocol for the layer
* as type ng_nettype_t. */ * as type ng_nettype_t. */
NETCONF_OPT_STATE, /**< get/set the state of network devices as NG_NETOPT_STATE, /**< get/set the state of network devices as
* type ng_netconf_state_t */ * type ng_netopt_state_t */
NETCONF_OPT_RAWMODE, /**< en/disable the pre-processing of data NG_NETOPT_RAWMODE, /**< en/disable the pre-processing of data
* in a network device driver as type * in a network device driver as type
* ng_nettype_t */ * ng_nettype_t */
/** /**
@ -104,7 +104,7 @@ typedef enum {
* *
* @note not all transceivers may support this interrupt * @note not all transceivers may support this interrupt
*/ */
NETCONF_OPT_RX_START_IRQ, NG_NETOPT_RX_START_IRQ,
/** /**
* @brief en/disable the interrupt after packet reception. * @brief en/disable the interrupt after packet reception.
@ -114,7 +114,7 @@ typedef enum {
* @note in case a transceiver does not support this interrupt, the event * @note in case a transceiver does not support this interrupt, the event
* may be triggered by the driver * may be triggered by the driver
*/ */
NETCONF_OPT_RX_END_IRQ, NG_NETOPT_RX_END_IRQ,
/** /**
* @brief en/disable the interrupt right in the beginning of transmission. * @brief en/disable the interrupt right in the beginning of transmission.
@ -125,7 +125,7 @@ typedef enum {
* @note in case a transceiver does not support this interrupt, the event * @note in case a transceiver does not support this interrupt, the event
* may be triggered by the driver * may be triggered by the driver
*/ */
NETCONF_OPT_TX_START_IRQ, NG_NETOPT_TX_START_IRQ,
/** /**
* @brief en/disable the interrupt after packet transmission. * @brief en/disable the interrupt after packet transmission.
@ -134,9 +134,9 @@ typedef enum {
* *
* @note not all transceivers may support this interrupt * @note not all transceivers may support this interrupt
*/ */
NETCONF_OPT_TX_END_IRQ, NG_NETOPT_TX_END_IRQ,
NETCONF_OPT_AUTOCCA, /**< en/disable to check automatically NG_NETOPT_AUTOCCA, /**< en/disable to check automatically
before sending the channel is clear. */ * before sending the channel is clear. */
/* add more options if needed */ /* add more options if needed */
/** /**
@ -144,42 +144,42 @@ typedef enum {
* *
* @note Interfaces are not meant to respond to that. * @note Interfaces are not meant to respond to that.
*/ */
NETCONF_OPT_NUMOF, NG_NETOPT_NUMOF,
} ng_netconf_opt_t; } ng_netopt_t;
/** /**
* @brief Binary parameter for enabling and disabling options * @brief Binary parameter for enabling and disabling options
*/ */
typedef enum { typedef enum {
NETCONF_DISABLE = 0, /**< disable a given option */ NG_NETOPT_DISABLE = 0, /**< disable a given option */
NETCONF_ENABLE = 1, /**< enable a given option */ NG_NETOPT_ENABLE = 1, /**< enable a given option */
} ng_netconf_enable_t; } ng_netopt_enable_t;
/** /**
* @brief Option parameter to be used with @ref NETCONF_OPT_STATE to set or get * @brief Option parameter to be used with @ref NG_NETOPT_STATE to set or get
* the state of a network device or protocol implementation * the state of a network device or protocol implementation
*/ */
typedef enum { typedef enum {
NETCONF_STATE_OFF = 0, /**< powered off */ NG_NETOPT_STATE_OFF = 0, /**< powered off */
NETCONF_STATE_SLEEP, /**< sleep mode */ NG_NETOPT_STATE_SLEEP, /**< sleep mode */
NETCONF_STATE_IDLE, /**< idle mode, NG_NETOPT_STATE_IDLE, /**< idle mode,
* the device listens to receive packets */ * the device listens to receive packets */
NETCONF_STATE_RX, /**< receive mode, NG_NETOPT_STATE_RX, /**< receive mode,
* the device currently receives a packet */ * the device currently receives a packet */
NETCONF_STATE_TX, /**< transmit mode, NG_NETOPT_STATE_TX, /**< transmit mode,
* set: triggers transmission of a preloaded packet * set: triggers transmission of a preloaded packet
* (see *NETCONF_OPT_PRELOADING*). The resulting * (see @ref NG_NETOPT_PRELOADING*). The resulting
* state of the network device is *NETCONF_STATE_IDLE* * state of the network device is @ref NG_NETOPT_STATE_IDLE
* get: the network device is in the process of * get: the network device is in the process of
* transmitting a packet */ * transmitting a packet */
NETCONF_STATE_RESET, /**< triggers a hardware reset. The resulting NG_NETOPT_STATE_RESET, /**< triggers a hardware reset. The resulting
* state of the network device is *NETCONF_STATE_IDLE* */ * state of the network device is @ref NG_NETOPT_STATE_IDLE */
/* add other states if needed */ /* add other states if needed */
} ng_netconf_state_t; } ng_netopt_state_t;
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* NG_NET_CONF_H_ */ #endif /* NG_NETOPT_H_ */
/** @} */ /** @} */