Skip to content

Commit d7f7cc5

Browse files
author
Arto Kinnunen
committed
Merge branch 'release_internal' into release_external
* release_internal: (26 commits) Fix function spelling mistake in Thread Fix function spelling mistake in border_router.c Fix function spelling mistake in iphc_decompress.c Fix function spelling mistake in lowpan_context.c Fix function spelling mistake in lowpan_context.h Fixed typo 'thead' in thread_neighbor_class.h Changed nanostack API network size to be a range of values NEW API for Validation RX Unicast schedule channel. Channel Mask update ,support for excluded Channels and FHSS API pdate Start sending PAS message after EAPOL parent TX fails. Implemented 802.15.4 mode setting (#2328) Added missing configuration api empty functions Added configuration storage (#2283) Removed mbedTLS internal include file Changed certificate error message wording to be less fatal Add network property API to Nanostack (#2318) Fixed Route cost calculation Added opeation mode validation for detect unsupported values. Enabled RPL candidate list filtering and only certificate setup accept without limit. Wi-sun address registration trigger update ...
2 parents fb7413b + 132cd12 commit d7f7cc5

File tree

96 files changed

+6722
-1022
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+6722
-1022
lines changed

nanostack/fhss_config.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,12 @@ typedef struct fhss_ws_configuration {
116116
/** Broadcast fixed channel */
117117
uint8_t broadcast_fixed_channel;
118118

119-
/** Channel mask. */
119+
/** Channel mask. Wi-SUN will use this for broadcast */
120120
uint32_t channel_mask[8];
121121

122+
/** Wi-SUN specific unicast channel mask */
123+
uint32_t unicast_channel_mask[8];
124+
122125
/** Vendor defined channel function. */
123126
fhss_vendor_defined_cf *vendor_defined_cf;
124127

nanostack/fhss_ws_extension.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@
3030
extern "C" {
3131
#endif
3232

33+
/**
34+
* @brief ws_channel_mask_t WS neighbour supported channel mask
35+
*/
36+
typedef struct ws_channel_mask {
37+
uint16_t channel_count; /**<active channels at mask */
38+
uint32_t channel_mask[8]; /**< Supported channels */
39+
} ws_channel_mask_t;
40+
3341
/**
3442
* @brief unicast_timing_info Unicast timing/hopping schedule information structure.
3543
*/
@@ -64,6 +72,7 @@ typedef struct fhss_ws_neighbor_timing_info {
6472
uint8_t timing_accuracy; /**< Neighbor timing accuracy */
6573
unicast_timing_info_t uc_timing_info; /**< Neighbor unicast timing info */
6674
broadcast_timing_info_t bc_timing_info; /**< Neighbor broadcast timing info */
75+
ws_channel_mask_t uc_channel_list; /**< Neighbor Unicast channel list */
6776
uint32_t *excluded_channels; /**< Neighbor excluded channels (bit mask) */
6877
} fhss_ws_neighbor_timing_info_t;
6978

nanostack/mac_common_defines.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
#define MAC_IEEE_802_15_4_MIN_MPDU_OVERHEAD 9 /**< Minimum overhead added by MAC to MPDU */
4444
#define MAC_IEEE_802_15_4_MAX_BEACON_OVERHEAD 75 /**< Maximum overhead which is added by the MAC for beacon */
4545
#define MAC_IEEE_802_15_4_MAX_PHY_PACKET_SIZE 127 /**< Maximum number of octets PHY layer is able to receive */
46+
#define MAC_IEEE_802_15_4G_MAX_PHY_PACKET_SIZE 2047 /**< Maximum number of octets PHY layer is able to receive */
4647

4748
#define MAC_IEEE_802_15_4_MAX_BEACON_PAYLOAD_LENGTH \
4849
(MAC_IEEE_802_15_4_MAX_PHY_PACKET_SIZE - MAC_IEEE_802_15_4_MAX_BEACON_OVERHEAD) /**< Maximum size of beacon payload */

nanostack/mlme.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ typedef enum {
264264
macAutoRequestKeyIndex = 0x7b, /*<The index of the key used for automatic data*/
265265
macDefaultKeySource = 0x7c, /*<Default key source*/
266266
//NON standard extension
267+
mac802_15_4Mode = 0xf6, /*<IEEE 802.15.4 mode*/
267268
macDeviceDescriptionPanIDUpdate = 0xf7, /*<Thread pending link update case this will update device descrioton list pan-id to new one*/
268269
macTXPower = 0xf8, /*<TX output power*/
269270
macCCAThreshold = 0xf9, /*<CCA threshold*/

nanostack/platform/arm_hal_phy.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ typedef enum {
7979
PHY_EXTENSION_SET_RF_CONFIGURATION, /**< Set RF configuration using phy_rf_channel_configuration_s structure */
8080
PHY_EXTENSION_FILTERING_SUPPORT, /**< Return filtering modes that can be supported by the PHY driver. See phy_link_filters_e */
8181
PHY_EXTENSION_SET_TX_POWER, /**< Set TX output power which is given as percentage of maximum. 0 is the lowest possible TX power and 100 is the highest possible TX power */
82-
PHY_EXTENSION_SET_CCA_THRESHOLD /**< Set CCA threshold which is given as percentage of maximum threshold. 0 is the lowest(strictest) possible threshold and 100 is the highest possible threshold */
82+
PHY_EXTENSION_SET_CCA_THRESHOLD, /**< Set CCA threshold which is given as percentage of maximum threshold. 0 is the lowest(strictest) possible threshold and 100 is the highest possible threshold */
83+
PHY_EXTENSION_SET_802_15_4_MODE /**< Set IEEE 802.15.4 mode as defined by phy_802_15_4_mode_t*/
8384
} phy_extension_type_e;
8485

8586
/** Address types */
@@ -172,6 +173,15 @@ typedef enum {
172173
MODULATION_INDEX_UNDEFINED ///< Modulation index undefined
173174
} phy_modulation_index_e;
174175

176+
/**
177+
* @brief enum phy_802_15_4_mode_t IEEE 802.15.4 mode
178+
*
179+
*/
180+
typedef enum {
181+
IEEE_802_15_4_2011, /**<IEEE 802.15.4-2011*/
182+
IEEE_802_15_4G_2012 /**<IEEE 802.15.4g-2012*/
183+
} phy_802_15_4_mode_t;
184+
175185
/** Channel configuration */
176186
typedef struct phy_rf_channel_configuration_s {
177187
uint32_t channel_0_center_frequency; ///< Center frequency

nanostack/socket_api.h

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -694,27 +694,29 @@ static inline int8_t socket_read_session_address(int8_t socket, ns_address_t *ad
694694
*
695695
* IPv6 socket options summary
696696
*
697-
* | opt_name / cmsg_type | Data type | set/getsockopt | sendmsg | recvmsg |
698-
* | :--------------------------: | :--------------: | :-------------: | :-----: | :-------------------------------: |
699-
* | SOCKET_IPV6_TCLASS | int16_t | Yes | Yes | If enabled with RECVTCLASS |
700-
* | SOCKET_IPV6_UNICAST_HOPS | int16_t | Yes | No | No |
701-
* | SOCKET_IPV6_MULTICAST_HOPS | int16_t | Yes | No | No |
702-
* | SOCKET_IPV6_ADDR_PREFERENCES | int | Yes | No | No |
703-
* | SOCKET_IPV6_USE_MIN_MTU | int8_t | Yes | Yes | No |
704-
* | SOCKET_IPV6_DONTFRAG | int8_t | Yes | Yes | No |
705-
* | SOCKET_IPV6_FLOW_LABEL | int32_t | Yes | No | No |
706-
* | SOCKET_IPV6_HOPLIMIT | int16_t | No | Yes | If enabled with RECVHOPLIMIT |
707-
* | SOCKET_IPV6_PKTINFO | ns_in6_pktinfo_t | No | Yes | If enabled with RECVPKTINFO |
708-
* | SOCKET_IPV6_RECVPKTINFO | bool | Yes | No | No |
709-
* | SOCKET_IPV6_RECVHOPLIMIT | bool | Yes | No | No |
710-
* | SOCKET_IPV6_RECVTCLASS | bool | Yes | No | No |
711-
* | SOCKET_IPV6_MULTICAST_IF | int8_t | Yes | No | No |
712-
* | SOCKET_IPV6_MULTICAST_LOOP | bool | Yes | Yes | No |
713-
* | SOCKET_IPV6_JOIN_GROUP | ns_ipv6_mreq_t | Set only | No | No |
714-
* | SOCKET_IPV6_LEAVE_GROUP | ns_ipv6_mreq_t | Set only | No | No |
715-
* | SOCKET_BROADCAST_PAN | int8_t | Yes | No | No |
716-
* | SOCKET_LINK_LAYER_SECURITY | int8_t | Yes | No | No |
717-
* | SOCKET_INTERFACE_SELECT | int8_t | Yes | No | No |
697+
* | opt_name / cmsg_type | Data type | set/getsockopt | sendmsg | recvmsg |
698+
* | :--------------------------: | :---------- ----: | :-------------: | :-----: | :-------------------------------: |
699+
* | SOCKET_IPV6_TCLASS | int16_t | Yes | Yes | If enabled with RECVTCLASS |
700+
* | SOCKET_IPV6_UNICAST_HOPS | int16_t | Yes | No | No |
701+
* | SOCKET_IPV6_MULTICAST_HOPS | int16_t | Yes | No | No |
702+
* | SOCKET_IPV6_ADDR_PREFERENCES | int | Yes | No | No |
703+
* | SOCKET_IPV6_USE_MIN_MTU | int8_t | Yes | Yes | No |
704+
* | SOCKET_IPV6_DONTFRAG | int8_t | Yes | Yes | No |
705+
* | SOCKET_IPV6_FLOW_LABEL | int32_t | Yes | No | No |
706+
* | SOCKET_IPV6_HOPLIMIT | int16_t | No | Yes | If enabled with RECVHOPLIMIT |
707+
* | SOCKET_IPV6_PKTINFO | ns_in6_pktinfo_t | No | Yes | If enabled with RECVPKTINFO |
708+
* | SOCKET_IPV6_RECVPKTINFO | bool | Yes | No | No |
709+
* | SOCKET_IPV6_RECVHOPLIMIT | bool | Yes | No | No |
710+
* | SOCKET_IPV6_RECVTCLASS | bool | Yes | No | No |
711+
* | SOCKET_IPV6_MULTICAST_IF | int8_t | Yes | No | No |
712+
* | SOCKET_IPV6_MULTICAST_LOOP | bool | Yes | Yes | No |
713+
* | SOCKET_IPV6_JOIN_GROUP | ns_ipv6_mreq_t | Set only | No | No |
714+
* | SOCKET_IPV6_LEAVE_GROUP | ns_ipv6_mreq_t | Set only | No | No |
715+
* | SOCKET_BROADCAST_PAN | int8_t | Yes | No | No |
716+
* | SOCKET_LINK_LAYER_SECURITY | int8_t | Yes | No | No |
717+
* | SOCKET_INTERFACE_SELECT | int8_t | Yes | No | No |
718+
* | SOCKET_LATENCY | ns_ipv6_latency_t | Get only | No | No |
719+
* | SOCKET_STAGGER | ns_ipv6_stagger_t | Get only | No | No |
718720
*
719721
*/
720722

@@ -753,6 +755,10 @@ static inline int8_t socket_read_session_address(int8_t socket, ns_address_t *ad
753755
#define SOCKET_IPV6_JOIN_GROUP 15
754756
/** Leave a multicast group, using ns_ipv6_mreq_t */
755757
#define SOCKET_IPV6_LEAVE_GROUP 16
758+
/** Read estimated latency to reach destination */
759+
#define SOCKET_LATENCY 17
760+
/** Read estimated stagger value that can be used as initial delay after bootstrap or firmware update. */
761+
#define SOCKET_STAGGER 18
756762

757763
#define SOCKET_BROADCAST_PAN 0xfc /**< Internal use - transmit with IEEE 802.15.4 broadcast PAN ID */
758764
#define SOCKET_LINK_LAYER_SECURITY 0xfd /**< Not standard enable or disable socket security at link layer (For 802.15.4). */
@@ -765,6 +771,20 @@ typedef struct ns_ipv6_mreq {
765771
int8_t ipv6mr_interface; /**< interface id */
766772
} ns_ipv6_mreq_t;
767773

774+
/** Latency request used for getsockopt() */
775+
typedef struct {
776+
uint8_t dest_addr[16]; /**< [IN] IPv6 destination address */
777+
uint32_t latency; /**< [OUT] estimated latency value in milliseconds */
778+
} ns_ipv6_latency_t;
779+
780+
/** Stagger request used for getsockopt() */
781+
typedef struct {
782+
uint8_t dest_addr[16]; /**< [IN] IPv6 destination address */
783+
uint16_t data_amount; /**< [IN] Amount of data in kilobytes */
784+
uint16_t stagger_min; /**< [OUT] Minimum stagger value in seconds */
785+
uint16_t stagger_max; /**< [OUT] Maximum stagger value in seconds */
786+
uint16_t stagger_rand; /**< [OUT] Randomized stagger value in seconds */
787+
} ns_ipv6_stagger_t;
768788
/**
769789
* \brief Set an option for a socket
770790
*
@@ -804,6 +824,7 @@ int8_t socket_setsockopt(int8_t socket, uint8_t level, uint8_t opt_name, const v
804824
* \return 0 on success.
805825
* \return -1 invalid socket ID.
806826
* \return -2 invalid/unsupported option.
827+
* \return -3 data can't be retrieved.
807828
*/
808829
int8_t socket_getsockopt(int8_t socket, uint8_t level, uint8_t opt_name, void *opt_value, uint16_t *opt_len);
809830

nanostack/ws_bbr_api.h

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ int ws_bbr_start(int8_t interface_id, int8_t backbone_interface_id);
5252
#define BBR_GUA_ROUTE 0x0002 /**< More specific route is added for GUA prefix */
5353
#define BBR_BB_WAIT 0x0004 /**< Wait backbone availability before starting Wi-SUN network */
5454
#define BBR_DEFAULT_ROUTE 0x0008 /**< Add default route parameter to DIO */
55+
#define BBR_REQUIRE_DAO_REFRESH 0x0010 /**< Do not increment PAN version number when active forces DAO update from nodes*/
5556

5657
/**
5758
* Configure border router features.
@@ -158,4 +159,88 @@ int ws_bbr_eapol_node_limit_set(int8_t interface_id, uint16_t limit);
158159
*/
159160
int ws_bbr_ext_certificate_validation_set(int8_t interface_id, uint8_t validation);
160161

162+
/**
163+
* Sets RPL parameters
164+
*
165+
* Sets RPL DIO trickle parameters.
166+
*
167+
* \param interface_id Network interface ID.
168+
* \param dio_interval_min DIO trickle timer Imin parameter.
169+
* \param dio_interval_doublings DIO trickle timer Imax parameter as doublings of Imin
170+
* \param dio_redundancy_constant DIO trickle timer redundancy constant.
171+
*
172+
* \return 0, RPL parameters set.
173+
* \return <0 Node RPL parameters set failed.
174+
*/
175+
int ws_bbr_rpl_parameters_set(int8_t interface_id, uint8_t dio_interval_min, uint8_t dio_interval_doublings, uint8_t dio_redundancy_constant);
176+
177+
/**
178+
* Gets RPL parameters
179+
*
180+
* Gets RPL DIO trickle parameters.
181+
*
182+
* \param interface_id Network interface ID.
183+
* \param dio_interval_min DIO trickle timer Imin parameter.
184+
* \param dio_interval_doublings DIO trickle timer Imax parameter as doublings of Imin
185+
* \param dio_redundancy_constant DIO trickle timer redundancy constant.
186+
*
187+
* \return 0, RPL parameters get.
188+
* \return <0 Node RPL parameters get failed.
189+
*/
190+
int ws_bbr_rpl_parameters_get(int8_t interface_id, uint8_t *dio_interval_min, uint8_t *dio_interval_doublings, uint8_t *dio_redundancy_constant);
191+
192+
/**
193+
* Validate RPL parameters
194+
*
195+
* Validates RPL DIO trickle parameters.
196+
*
197+
* \param interface_id Network interface ID.
198+
* \param dio_interval_min DIO trickle timer Imin parameter.
199+
* \param dio_interval_doublings DIO trickle timer Imax parameter as doublings of Imin
200+
* \param dio_redundancy_constant DIO trickle timer redundancy constant.
201+
*
202+
* \return 0, RPL parameters validated.
203+
* \return <0 Node RPL parameters validation failed.
204+
*/
205+
int ws_bbr_rpl_parameters_validate(int8_t interface_id, uint8_t dio_interval_min, uint8_t dio_interval_doublings, uint8_t dio_redundancy_constant);
206+
207+
/**
208+
* Sets PAN configuration
209+
*
210+
* Sets PAN configuration parameters.
211+
*
212+
* \param interface_id Network interface ID.
213+
* \param pan_id PAN ID; 0xffff default, generate the PAN ID.
214+
*
215+
* \return 0, PAN configuration set.
216+
* \return <0 PAN configuration set failed.
217+
*/
218+
int ws_bbr_pan_configuration_set(int8_t interface_id, uint16_t pan_id);
219+
220+
/**
221+
* Gets PAN configuration
222+
*
223+
* Gets PAN configuration parameters.
224+
*
225+
* \param interface_id Network interface ID.
226+
* \param pan_id PAN ID; 0xffff default
227+
*
228+
* \return 0, PAN configuration get.
229+
* \return <0 PAN configuration get failed.
230+
*/
231+
int ws_bbr_pan_configuration_get(int8_t interface_id, uint16_t *pan_id);
232+
233+
/**
234+
* Validates PAN configuration
235+
*
236+
* Validates PAN configuration parameters.
237+
*
238+
* \param interface_id Network interface ID.
239+
* \param pan_id PAN ID.
240+
*
241+
* \return 0, PAN configuration validated.
242+
* \return <0 PAN configuration validation failed.
243+
*/
244+
int ws_bbr_pan_configuration_validate(int8_t interface_id, uint16_t pan_id);
245+
161246
#endif /* WS_BBR_API_H_ */

0 commit comments

Comments
 (0)