netopt.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015 Freie Universität Berlin
3  * 2015 Kaspar Schleiser <kaspar@schleiser.de>
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
25 #ifndef NET_NETOPT_H
26 #define NET_NETOPT_H
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
38 #define NETOPT_MAX_PACKET_SIZE NETOPT_MAX_PDU_SIZE
39 
50 typedef enum {
74 
101 
106 
125 
258 
268 
279 
288 
302 
311 
320 
331 
340 
349 
359 
368 
375 
380 
397 
405 
413 
418 
425 
442 
452 
462 
471 
476 
481 
490 
495 
500 
507 
514 
521 
526 
531 
536 
541 
546 
553 
560 
569 
576 
583 
591 
596 
601 
610 
616 
622 
627 
632 
638 
644 
649 
654 
659 
664 
671 
676 
681 
686 
691 
696 
701 
706 
711 
716 
721 
728 
733 
734  /* add more options if needed */
735 
740 
745 
750 
758 
769 
791 } netopt_t;
792 
796 typedef enum {
800 
805 typedef enum {
822  /* add other states if needed */
824 
828 typedef enum {
834 
842 const char *netopt2str(netopt_t opt);
843 
844 #ifdef __cplusplus
845 }
846 #endif
847 
848 #endif /* NET_NETOPT_H */
849 
NETOPT_IPV6_ADDR_FLAGS
@ NETOPT_IPV6_ADDR_FLAGS
(array of uint8_t) get the flags to the addresses returned by NETOPT_IPV6_ADDR as array
Definition: netopt.h:153
NETOPT_IPV6_IID
@ NETOPT_IPV6_IID
(eui64_t) get the IPv6 interface identifier of a network interface
Definition: netopt.h:124
NETOPT_LORAWAN_APPKEY
@ NETOPT_LORAWAN_APPKEY
(uint8_t*) LoRaWAN application key (16 bytes length)
Definition: netopt.h:600
NETOPT_IS_CHANNEL_CLR
@ NETOPT_IS_CHANNEL_CLR
(netopt_enable_t) check whether the network medium is clear
Definition: netopt.h:61
netopt_t
netopt_t
Global list of configuration options available throughout the network stack, e.g.
Definition: netopt.h:50
NETOPT_LORAWAN_PUBLIC_NETWORK
@ NETOPT_LORAWAN_PUBLIC_NETWORK
(netopt_enable_t) LoRaWAN public network
Definition: netopt.h:631
NETOPT_ACK_PENDING
@ NETOPT_ACK_PENDING
(netopt_enable_t) frame pending bit of ACKs
Definition: netopt.h:226
NETOPT_PROTO
@ NETOPT_PROTO
(gnrc_nettype_t) the protocol for the layer
Definition: netopt.h:241
NETOPT_SYNCWORD
@ NETOPT_SYNCWORD
(uint8_t*) phy layer syncword
Definition: netopt.h:720
NETOPT_MR_OFDM_MCS
@ NETOPT_MR_OFDM_MCS
(uint8_t) MR-OFDM PHY Modulation and Coding Scheme (Values: 0-6)
Definition: netopt.h:690
NETOPT_MR_OFDM_OPTION
@ NETOPT_MR_OFDM_OPTION
(uint8_t) MR-OFDM PHY Option (Values: 1-4)
Definition: netopt.h:685
netopt_enable_t
netopt_enable_t
Binary parameter for enabling and disabling options.
Definition: netopt.h:796
NETOPT_PREAMBLE_LENGTH
@ NETOPT_PREAMBLE_LENGTH
(uint16_t) preamble length
Definition: netopt.h:475
NETOPT_DEMOD_MARGIN
@ NETOPT_DEMOD_MARGIN
(uint8_t) Get the demodulation margin of the last Link Check request.
Definition: netopt.h:744
NETOPT_L2FILTER
@ NETOPT_L2FILTER
(l2filter_t) add an address to a link layer filter list
Definition: netopt.h:451
NETOPT_IPV6_ADDR_REMOVE
@ NETOPT_IPV6_ADDR_REMOVE
(ipv6_addr_t) Removes an IPv6 address from an interface
Definition: netopt.h:144
NETOPT_RX_TIMEOUT
@ NETOPT_RX_TIMEOUT
(uint32_t) reception timeout of a frame
Definition: netopt.h:513
NETOPT_CCA_THRESHOLD
@ NETOPT_CCA_THRESHOLD
(int8_t) CCA threshold for the radio transceiver
Definition: netopt.h:396
NETOPT_ENCRYPTION
@ NETOPT_ENCRYPTION
(netopt_enable_t) link layer encryption.
Definition: netopt.h:417
NETOPT_ADDRESS
@ NETOPT_ADDRESS
(byte array, see below) link layer address in network byte order
Definition: netopt.h:73
NETOPT_MAC_NO_SLEEP
@ NETOPT_MAC_NO_SLEEP
(netopt_enable_t) block transceiver sleep
Definition: netopt.h:358
NETOPT_STATE
@ NETOPT_STATE
(netopt_state_t) state of network device
Definition: netopt.h:245
NETOPT_LAST_ED_LEVEL
@ NETOPT_LAST_ED_LEVEL
(int8_t) Energy level during the last performed CCA or RX frame
Definition: netopt.h:470
NETOPT_DISABLE
@ NETOPT_DISABLE
disable a given option
Definition: netopt.h:797
NETOPT_LINK
@ NETOPT_LINK
(netopt_enable_t) network interface link status.
Definition: netopt.h:310
NETOPT_MR_FSK_FEC
@ NETOPT_MR_FSK_FEC
(uint8_t) MR-FSK PHY Forward Error Correction
Definition: netopt.h:710
NETOPT_CHANNEL_PAGE
@ NETOPT_CHANNEL_PAGE
(uint16_t) channel page as defined by IEEE 802.15.4
Definition: netopt.h:379
NETOPT_RF_TESTMODE_CTX_CW
@ NETOPT_RF_TESTMODE_CTX_CW
carrier wave continuous tx mode
Definition: netopt.h:831
NETOPT_IPV6_FORWARDING
@ NETOPT_IPV6_FORWARDING
(netopt_enable_t) IPv6 forwarding state
Definition: netopt.h:176
NETOPT_IPV6_GROUP
@ NETOPT_IPV6_GROUP
(ipv6_addr_t) get IPv6 multicast groups of an interface as array of ipv6_addr_t or join an IPv6 multi...
Definition: netopt.h:168
NETOPT_ENCRYPTION_KEY
@ NETOPT_ENCRYPTION_KEY
(byte array) set encryption key
Definition: netopt.h:424
NETOPT_INTEGRITY_CHECK
@ NETOPT_INTEGRITY_CHECK
(netopt_enable_t) frame integrity check (e.g CRC)
Definition: netopt.h:480
NETOPT_LORAWAN_DEVICE_CLASS
@ NETOPT_LORAWAN_DEVICE_CLASS
(uint8_t) LoRaWAN device class (A, B, C)
Definition: netopt.h:615
NETOPT_RSSI
@ NETOPT_RSSI
(int8_t) Received Signal Strength Indicator (RSSI)
Definition: netopt.h:768
NETOPT_CSMA_MAXBE
@ NETOPT_CSMA_MAXBE
(uint8_t) maximum backoff exponent for the CSMA-CA algorithm
Definition: netopt.h:339
NETOPT_MR_FSK_MODULATION_ORDER
@ NETOPT_MR_FSK_MODULATION_ORDER
(uint8_t) MR-FSK Modulation Order
Definition: netopt.h:700
NETOPT_RF_TESTMODE
@ NETOPT_RF_TESTMODE
(netopt_rf_testmode_t) Test mode for the radio, e.g.
Definition: netopt.h:441
NETOPT_LORAWAN_NWKSKEY
@ NETOPT_LORAWAN_NWKSKEY
(uint8_t*) LoRaWAN network session key (16 bytes length)
Definition: netopt.h:605
NETOPT_RX_START_IRQ
@ NETOPT_RX_START_IRQ
(netopt_enable_t) trigger interrupt at reception start
Definition: netopt.h:257
NETOPT_TX_RETRIES_NEEDED
@ NETOPT_TX_RETRIES_NEEDED
(uint8_t) retry amount from missing ACKs of the last transmission
Definition: netopt.h:568
NETOPT_PDU_SIZE
@ NETOPT_PDU_SIZE
(uint16_t) protocol data unit size
Definition: netopt.h:204
NETOPT_TX_END_IRQ
@ NETOPT_TX_END_IRQ
(netopt_enable_t) trigger interrupt after frame transmission
Definition: netopt.h:287
NETOPT_TX_POWER
@ NETOPT_TX_POWER
(int16_t) transmit power for radio devices in dBm
Definition: netopt.h:184
NETOPT_FIXED_HEADER
@ NETOPT_FIXED_HEADER
(netopt_enable_t) fixed header mode
Definition: netopt.h:540
NETOPT_IPV6_SND_RTR_ADV
@ NETOPT_IPV6_SND_RTR_ADV
(netopt_enable_t) sending of IPv6 router advertisements
Definition: netopt.h:180
NETOPT_IPV6_ADDR
@ NETOPT_IPV6_ADDR
(ipv6_addr_t[]) get IPv6 addresses of an interface as array of ipv6_addr_t or add an IPv6 address as ...
Definition: netopt.h:140
NETOPT_ADDR_LEN
@ NETOPT_ADDR_LEN
(uint16_t) get the default address length a network device expects
Definition: netopt.h:89
NETOPT_PHY_BUSY
@ NETOPT_PHY_BUSY
(netopt_enable_t) enable busy mode
Definition: netopt.h:590
NETOPT_STATE_RX
@ NETOPT_STATE_RX
receive mode, the device currently receives a packet
Definition: netopt.h:810
NETOPT_PRELOADING
@ NETOPT_PRELOADING
(netopt_enable_t) frame preloading
Definition: netopt.h:211
netopt_state_t
netopt_state_t
Option parameter to be used with NETOPT_STATE to set or get the state of a network device or protocol...
Definition: netopt.h:805
NETOPT_CHANNEL_HOP_PERIOD
@ NETOPT_CHANNEL_HOP_PERIOD
(uint8_t) channel hopping period
Definition: netopt.h:499
NETOPT_NUM_GATEWAYS
@ NETOPT_NUM_GATEWAYS
(uint8_t) Get the number of gateways of the last Link Check request.
Definition: netopt.h:749
NETOPT_CSMA_MINBE
@ NETOPT_CSMA_MINBE
(uint8_t) minimum backoff exponent for the CSMA-CA algorithm
Definition: netopt.h:348
NETOPT_LORAWAN_DR
@ NETOPT_LORAWAN_DR
(uint8_t) LoRaWAN datarate
Definition: netopt.h:621
NETOPT_MR_FSK_SRATE
@ NETOPT_MR_FSK_SRATE
(uint8_t) MR-FSK PHY Symbol Rate (kHz)
Definition: netopt.h:705
NETOPT_6LO
@ NETOPT_6LO
(netopt_enable_t) 6Lo support
Definition: netopt.h:552
NETOPT_RF_TESTMODE_IDLE
@ NETOPT_RF_TESTMODE_IDLE
idle mode, radio off
Definition: netopt.h:829
NETOPT_LORAWAN_TX_PORT
@ NETOPT_LORAWAN_TX_PORT
(uint8_t) LoRaWAN TX application port
Definition: netopt.h:637
NETOPT_STATS
@ NETOPT_STATS
(netstats_t*) get statistics about sent and received packets and data of the device or protocol
Definition: netopt.h:412
NETOPT_LORAWAN_ADR
@ NETOPT_LORAWAN_ADR
(netopt_enable_t) LoRaWAN adaptive datarate
Definition: netopt.h:626
NETOPT_CSMA_RETRIES
@ NETOPT_CSMA_RETRIES
(uint8_t) maximum number of CSMA retries
Definition: netopt.h:330
NETOPT_CHANNEL_HOP
@ NETOPT_CHANNEL_HOP
(netopt_enable_t) channel hopping
Definition: netopt.h:494
NETOPT_RANDOM
@ NETOPT_RANDOM
(uint32_t) Get a random value from the device
Definition: netopt.h:727
NETOPT_ENABLE
@ NETOPT_ENABLE
enable a given option
Definition: netopt.h:798
NETOPT_RF_TESTMODE_CRX
@ NETOPT_RF_TESTMODE_CRX
continuous rx mode
Definition: netopt.h:830
NETOPT_CCA_MODE
@ NETOPT_CCA_MODE
(uint8_t) CCA mode for the radio transceiver
Definition: netopt.h:404
NETOPT_STATE_RESET
@ NETOPT_STATE_RESET
triggers a hardware reset.
Definition: netopt.h:818
NETOPT_BLE_CTX
@ NETOPT_BLE_CTX
(netdev_ble_ctx_t) set BLE radio context (channel, CRC, AA)
Definition: netopt.h:575
NETOPT_LORAWAN_RX2_FREQ
@ NETOPT_LORAWAN_RX2_FREQ
(uint32_t) LoRaWAN frequency used for second RX window
Definition: netopt.h:648
NETOPT_RX_END_IRQ
@ NETOPT_RX_END_IRQ
(netopt_enable_t) trigger interrupt after frame reception
Definition: netopt.h:267
NETOPT_MR_OQPSK_RATE
@ NETOPT_MR_OQPSK_RATE
(uint8_t) MR-O-QPSK Rate Mode
Definition: netopt.h:680
NETOPT_6LO_IPHC
@ NETOPT_6LO_IPHC
(netopt_enable_t) header compression
Definition: netopt.h:559
NETOPT_CSMA
@ NETOPT_CSMA
(netopt_enable_t) CSMA/CA support
Definition: netopt.h:319
netopt_rf_testmode_t
netopt_rf_testmode_t
Option parameter to be used with NETOPT_RF_TESTMODE.
Definition: netopt.h:828
NETOPT_STATE_IDLE
@ NETOPT_STATE_IDLE
idle mode, the device listens to receive packets
Definition: netopt.h:808
NETOPT_LORAWAN_APPEUI
@ NETOPT_LORAWAN_APPEUI
(uint8_t*) LoRaWAN application EUI (8 bytes length)
Definition: netopt.h:595
NETOPT_PROMISCUOUSMODE
@ NETOPT_PROMISCUOUSMODE
(netopt_enable_t) promiscuous mode
Definition: netopt.h:215
NETOPT_STATE_STANDBY
@ NETOPT_STATE_STANDBY
standby mode.
Definition: netopt.h:820
NETOPT_TX_TIMEOUT
@ NETOPT_TX_TIMEOUT
(uint32_t) transmission timeout of a frame
Definition: netopt.h:520
NETOPT_L2_GROUP_LEAVE
@ NETOPT_L2_GROUP_LEAVE
(array of byte arrays) Leave an link layer multicast group
Definition: netopt.h:784
NETOPT_OTAA
@ NETOPT_OTAA
(netopt_enable_t) Enable or disable OTAA activation (LoRaWAN)
Definition: netopt.h:739
NETOPT_MR_OQPSK_CHIPS
@ NETOPT_MR_OQPSK_CHIPS
(uint8_t) MR-O-QPSK Chip Rate (kchip/s)
Definition: netopt.h:675
NETOPT_L2_GROUP
@ NETOPT_L2_GROUP
(array of byte array) get link layer multicast groups as array of byte arrays (length of each byte ar...
Definition: netopt.h:780
NETOPT_LINK_CHECK
@ NETOPT_LINK_CHECK
(netopt_enable_t) Perform a Link Check request (LoRaWAN)
Definition: netopt.h:757
NETOPT_SRC_LEN
@ NETOPT_SRC_LEN
(uint16_t) address length to use for the link layer source address
Definition: netopt.h:93
NETOPT_LORAWAN_APPSKEY
@ NETOPT_LORAWAN_APPSKEY
(uint8_t*) LoRaWAN application session key (16 bytes length)
Definition: netopt.h:609
NETOPT_MAX_PDU_SIZE
@ NETOPT_MAX_PDU_SIZE
(uint16_t) maximum protocol data unit
Definition: netopt.h:188
NETOPT_SINGLE_RECEIVE
@ NETOPT_SINGLE_RECEIVE
(netopt_enable_t) single frame reception
Definition: netopt.h:506
NETOPT_IQ_INVERT
@ NETOPT_IQ_INVERT
(netopt_enable_t) IQ inverted
Definition: netopt.h:545
NETOPT_HOP_LIMIT
@ NETOPT_HOP_LIMIT
(uint8_t) hop limit
Definition: netopt.h:105
NETOPT_STATE_TX
@ NETOPT_STATE_TX
transmit mode, set: triggers transmission of a preloaded packet (see NETOPT_PRELOADING*).
Definition: netopt.h:812
NETOPT_CODING_RATE
@ NETOPT_CODING_RATE
(uint8_t) radio coding rate
Definition: netopt.h:535
NETOPT_MR_FSK_MODULATION_INDEX
@ NETOPT_MR_FSK_MODULATION_INDEX
(uint8_t) MR-FSK PHY Modulation Index (x 64)
Definition: netopt.h:695
NETOPT_CHANNEL_FREQUENCY
@ NETOPT_CHANNEL_FREQUENCY
(uint32_t) channel center frequency
Definition: netopt.h:489
NETOPT_IPV6_GROUP_LEAVE
@ NETOPT_IPV6_GROUP_LEAVE
(ipv6_addr_t) Leave an IPv6 multicast group on an interface
Definition: netopt.h:172
NETOPT_IS_WIRED
@ NETOPT_IS_WIRED
(netopt_enable_t) read-only check for a wired interface.
Definition: netopt.h:367
NETOPT_LORAWAN_RX2_DR
@ NETOPT_LORAWAN_RX2_DR
(loramac_dr_idx_t) LoRaWAN datarate for second RX window
Definition: netopt.h:643
NETOPT_STATE_SLEEP
@ NETOPT_STATE_SLEEP
sleep mode
Definition: netopt.h:807
NETOPT_RAWMODE
@ NETOPT_RAWMODE
(netopt_enable_t) when enabled, bypass protocol processing of incoming frames
Definition: netopt.h:249
NETOPT_RF_TESTMODE_CTX_PRBS9
@ NETOPT_RF_TESTMODE_CTX_PRBS9
PRBS9 continuous tx mode.
Definition: netopt.h:832
NETOPT_BANDWIDTH
@ NETOPT_BANDWIDTH
(uint8_t) radio modulation bandwidth
Definition: netopt.h:525
NETOPT_L2FILTER_RM
@ NETOPT_L2FILTER_RM
(l2filter_t) remove an address from a link layer filter list
Definition: netopt.h:461
NETOPT_STATE_OFF
@ NETOPT_STATE_OFF
powered off
Definition: netopt.h:806
NETOPT_AUTOACK
@ NETOPT_AUTOACK
(netopt_enable_t) automatic link layer ACKs
Definition: netopt.h:219
NETOPT_NUMOF
@ NETOPT_NUMOF
maximum number of options defined here.
Definition: netopt.h:790
NETOPT_CHANNEL
@ NETOPT_CHANNEL
(uint16_t) channel number
Definition: netopt.h:54
NETOPT_CHANNEL_SPACING
@ NETOPT_CHANNEL_SPACING
(uint8_t) PHY Channel Spacing (kHz)
Definition: netopt.h:715
NETOPT_SPREADING_FACTOR
@ NETOPT_SPREADING_FACTOR
(uint8_t) radio spreading factor
Definition: netopt.h:530
NETOPT_IEEE802154_PHY
@ NETOPT_IEEE802154_PHY
(uint8_t) 802.15.4 PHY mode
Definition: netopt.h:663
NETOPT_AUTOCCA
@ NETOPT_AUTOCCA
(netopt_enable_t) perform channel clear assessment before transmitting
Definition: netopt.h:301
NETOPT_LORAWAN_MAX_RX_ERROR
@ NETOPT_LORAWAN_MAX_RX_ERROR
(uint32_t) LoRaWAN maximum system overall timing error (ms)
Definition: netopt.h:653
NETOPT_RETRANS
@ NETOPT_RETRANS
(uint8_t) maximum number of retransmissions
Definition: netopt.h:237
NETOPT_LORAWAN_MIN_RX_SYMBOL
@ NETOPT_LORAWAN_MIN_RX_SYMBOL
(uint8_t) LoRaWAN maximum system overall timing error (symbols)
Definition: netopt.h:658
NETOPT_OQPSK_RATE
@ NETOPT_OQPSK_RATE
(uint8_t) legacy O-QPSK proprietary mode Allows to select higher data rates than standard 250 kbit/s ...
Definition: netopt.h:670
NETOPT_DEVICE_TYPE
@ NETOPT_DEVICE_TYPE
(uint16_t) device type
Definition: netopt.h:374
NETOPT_TX_START_IRQ
@ NETOPT_TX_START_IRQ
(netopt_enable_t) trigger interrupt at transmission start
Definition: netopt.h:278
NETOPT_NID
@ NETOPT_NID
(uint16_t) network ID
Definition: netopt.h:100
NETOPT_RX_SYMBOL_TIMEOUT
@ NETOPT_RX_SYMBOL_TIMEOUT
(uint8_t) Get or set the number of PHY symbols before assuming there's no data
Definition: netopt.h:732
NETOPT_CHECKSUM
@ NETOPT_CHECKSUM
(netopt_enable_t) enable hardware checksumming
Definition: netopt.h:582
NETOPT_ADDRESS_LONG
@ NETOPT_ADDRESS_LONG
(byte array, see below) long link layer address in network byte order
Definition: netopt.h:85
NETOPT_ACK_REQ
@ NETOPT_ACK_REQ
(netopt_enable_t) acknowledgement request on outgoing frames
Definition: netopt.h:233
netopt2str
const char * netopt2str(netopt_t opt)
Get a string ptr corresponding to opt, for debugging.