28
28
#define WH_IE_MHDS_TYPE 5 /**< MHDS information for mesh routing */
29
29
#define WH_IE_VH_TYPE 6 /**< Vendor header information */
30
30
#define WH_IE_EA_TYPE 9 /**< Eapol Auhtenticator EUI-64 header information */
31
+ /* Wi-SUN FAN dfinition 1.1 */
32
+ #define WH_IE_LUTT_TYPE 10 /**< LFN Unicast Timing and Frame Type information */
33
+ #define WH_IE_LBT_TYPE 11 /**< LFN Broadcast Timing information */
34
+ #define WH_IE_NR_TYPE 12 /**< Node Role IE information */
35
+ #define WH_IE_LUS_TYPE 13 /**< LFN Unicast Schedule information */
36
+ #define WH_IE_FLUS_TYPE 14 /**< FFN for LFN unicast Schedule information */
37
+ #define WH_IE_LBS_TYPE 15 /**< LFN Broadcast Schedule information */
38
+ #define WH_IE_LND_TYPE 16 /**< LFN Network Discovery information */
39
+ #define WH_IE_LTO_TYPE 17 /**< LFN Timing information */
40
+ #define WH_IE_PANID_TYPE 18 /**< PAN Identifier information */
41
+
31
42
32
43
#define WS_WP_NESTED_IE 4 /**< WS nested Payload IE element'selement could include mltiple sub payload IE */
33
44
34
45
#define WS_WP_SUB_IE_ELEMENT_HEADER_LENGTH 2
35
46
36
47
/* Payload IE sub elements in side WS_WP_NESTED_IE */
37
- #define WP_PAYLOAD_IE_US_TYPE 1 /**< Unicast Schedule information */
38
- #define WP_PAYLOAD_IE_BS_TYPE 2 /**< Broadcast Schedule information */
39
- #define WP_PAYLOAD_IE_VP_TYPE 3 /**< Vendor Payload information */
48
+ /* Long form subID's */
49
+ #define WP_PAYLOAD_IE_US_TYPE 1 /**< Unicast Schedule information */
50
+ #define WP_PAYLOAD_IE_BS_TYPE 2 /**< Broadcast Schedule information */
51
+ #define WP_PAYLOAD_IE_VP_TYPE 3 /**< Vendor Payload information */
52
+ /* Wi-SUN FAN definition 1.1 */
53
+ #define WP_PAYLOAD_IE_LFN_CHANNEL_PLAN_TYPE 4 /**< LFN Channel Plan information*/
54
+
55
+ /* Short form subID's */
40
56
#define WP_PAYLOAD_IE_PAN_TYPE 4 /**< PAN Information */
41
57
#define WP_PAYLOAD_IE_NETNAME_TYPE 5 /**< Network Name information */
42
58
#define WP_PAYLOAD_IE_PAN_VER_TYPE 6 /**< Pan configuration version */
43
59
#define WP_PAYLOAD_IE_GTKHASH_TYPE 7 /**< GTK Hash information */
60
+ /* Wi-SUN FAN dfinition 1.1 */
61
+ #define WP_PAYLOAD_IE_PCAP_TYPE 8 /**< PHY Capability information */
62
+ #define WP_PAYLOAD_IE_LFNVER_TYPE 9 /**< LFN Version information */
63
+ #define WP_PAYLOAD_IE_LGTKHASH_TYPE 10 /**< LFN GTK Hash Information */
64
+
44
65
45
66
/* WS frame types to WH_IE_UTT_TYPE */
46
67
#define WS_FT_PAN_ADVERT 0 /**< PAN Advert */
50
71
#define WS_FT_DATA 4 /**< data type inside MPX */
51
72
#define WS_FT_ACK 5 /**< Enhanced ACK */
52
73
#define WS_FT_EAPOL 6 /**< EAPOL message inside MPX */
74
+ /* Wi-SUN FAN 1.1 */
75
+ #define WS_FT_LPA 9 /**< LFN PAN Advert */
76
+ #define WS_FT_LPAS 10 /**< LFN PAN Advert Solicit */
77
+ #define WS_FT_LPC 11 /**< LFN PAN Config */
78
+ #define WS_FT_LPCS 12 /**< LFN PAN Config Solicit */
79
+
53
80
54
81
/* WS exluded channel Control */
55
82
#define WS_EXC_CHAN_CTRL_NONE 0 /**< No excluded channels */
56
83
#define WS_EXC_CHAN_CTRL_RANGE 1 /**< Excluded channels are in 1 or multiple channel range */
57
- #define WS_EXC_CHAN_CTRL_BITMASK 2 /**< Excluded channels are marked to bitmask which length based on configured channels */
84
+ #define WS_EXC_CHAN_CTRL_BITMASK 2 /**< Excluded channels are marked to bitmask which length based on configured channels */
58
85
59
86
#define WS_EXCLUDED_MAX_RANGE_TO_SEND 3
60
87
88
+
89
+ #define WS_NR_ROLE_BR 0
90
+ #define WS_NR_ROLE_ROUTER 1
91
+ #define WS_NR_ROLE_LFN 2
92
+
61
93
/**
62
94
* @brief ws_pan_information_t PAN information
63
95
*/
@@ -68,6 +100,7 @@ typedef struct ws_pan_information_s {
68
100
bool use_parent_bs : 1 ; /**< 1 for force to follow parent broadcast schedule. 0 node may define own schedule. */
69
101
bool rpl_routing_method : 1 ; /**< 1 when RPL routing is selected and 0 when L2 routing. */
70
102
bool pan_version_set : 1 ; /**< 1 PAN version is set. */
103
+ bool lfn_window_style : 1 ; /**< 1 FFN management trasmission. */
71
104
unsigned version : 3 ; /**< Pan version support. */
72
105
} ws_pan_information_t ;
73
106
@@ -125,6 +158,104 @@ typedef struct ws_utt_ie {
125
158
uint_fast24_t ufsi ;
126
159
} ws_utt_ie_t ;
127
160
161
+ /**
162
+ * @brief ws_utt_ie_t WS LUTT-IE
163
+ */
164
+ typedef struct ws_lutt_ie {
165
+ uint8_t message_type ;
166
+ uint16_t slot_number ;
167
+ uint_fast24_t interval_offset ;
168
+ } ws_lutt_ie_t ;
169
+
170
+ /**
171
+ * @brief ws_lbt_ie_t WS LBT-IE
172
+ */
173
+ typedef struct ws_lbt_ie {
174
+ uint16_t slot_number ;
175
+ uint_fast24_t interval_offset ;
176
+ } ws_lbt_ie_t ;
177
+
178
+
179
+ /**
180
+ * @brief ws_nr_ie_t WS NR-IE
181
+ */
182
+ typedef struct ws_nr_ie {
183
+ unsigned node_role : 3 ;
184
+ uint8_t clock_drift ;
185
+ uint8_t timing_accurancy ;
186
+ uint_fast24_t listen_interval_min ;
187
+ uint_fast24_t listen_interval_max ;
188
+ } ws_nr_ie_t ;
189
+
190
+
191
+ /**
192
+ * @brief ws_lus_ie_t WS LUS-IE
193
+ */
194
+ typedef struct ws_lus_ie {
195
+ uint8_t channel_plan_tag ;
196
+ uint_fast24_t listen_interval ;
197
+ } ws_lus_ie_t ;
198
+
199
+ /**
200
+ * @brief ws_lus_ie_t WS FLUS-IE
201
+ */
202
+ typedef struct ws_flus_ie {
203
+ uint8_t channel_plan_tag ;
204
+ uint8_t dwell_interval ;
205
+ } ws_flus_ie_t ;
206
+
207
+ /**
208
+ * @brief ws_lnd_ie_t WS LND-IE
209
+ */
210
+ typedef struct ws_lnd_ie {
211
+ uint8_t response_threshold ;
212
+ uint8_t discovery_slot_time ;
213
+ uint8_t discovery_slots ;
214
+ uint16_t discovery_first_slot ;
215
+ uint_fast24_t response_delay ;
216
+ } ws_lnd_ie_t ;
217
+
218
+ /**
219
+ * @brief ws_lto_ie_t WS LTO-IE
220
+ */
221
+ typedef struct ws_lto_ie {
222
+ uint_fast24_t offset ;
223
+ uint_fast24_t adjusted_listening_interval ;
224
+ } ws_lto_ie_t ;
225
+
226
+ /**
227
+ * @brief ws_lbs_ie_t WS LBS-IE
228
+ */
229
+ typedef struct ws_lbs_ie {
230
+ uint8_t channel_plan_tag ;
231
+ uint16_t broadcast_secheduler_id ;
232
+ uint_fast24_t broadcast_interval ;
233
+ } ws_lbs_ie_t ;
234
+
235
+
236
+ /**
237
+ * @brief ws_panid_ie_t WS PANID-IE
238
+ */
239
+ typedef struct ws_panid_ie {
240
+ uint16_t panid ;
241
+ } ws_panid_ie_t ;
242
+
243
+ /**
244
+ * @brief ws_pcab_ie_t WS PCAB-IE
245
+ */
246
+ typedef struct ws_pcab_ie {
247
+ unsigned phy_type : 3 ;
248
+ uint16_t operation_mode ;
249
+ } ws_pcab_ie_t ;
250
+
251
+ /**
252
+ * @brief ws_pcab_read_ie_t WS PCAB-IE
253
+ */
254
+ typedef struct ws_pcab_read_ie {
255
+ unsigned length_of_pcab : 3 ;
256
+ uint8_t * pcab_start ;
257
+ } ws_pcab_read_ie_t ;
258
+
128
259
/**
129
260
* @brief ws_bt_ie_t WS BT-IE read
130
261
*/
@@ -141,6 +272,26 @@ typedef struct ws_fc_ie {
141
272
uint8_t rx_flow_ctrl ;
142
273
} ws_fc_ie_t ;
143
274
275
+ /**
276
+ * @brief ws_lfnver_ie_t WS LFNVER-IE element
277
+ */
278
+ typedef struct ws_lfnver_ie {
279
+ uint16_t lfn_version ;
280
+ } ws_lfnver_ie_t ;
281
+
282
+ /**
283
+ * @brief ws_lgtkhash_ie_t WS LGTKHASH-IE element
284
+ */
285
+ typedef struct ws_lgtkhash_ie {
286
+ bool lgtk0 : 1 ; /**< 1= LGTK0 in line 0 = elided */
287
+ bool lgtk1 : 1 ; /**< 1= LGTK1 in line 0 = elided */
288
+ bool lgtk2 : 1 ; /**< 1= LGTK2 in line 0 = elided */
289
+ unsigned active_lgtk_index : 2 ; /**< Indicate Active LGTK index 0-2 */
290
+ uint8_t * lgtk0_hash ; /**< LGTK0 64-bit Hash if lgtk0=1*/
291
+ uint8_t * lgtk1_hash ; /**< LGTK1 64-bit Hash if lgtk1=1*/
292
+ uint8_t * lgtk2_hash ; /**< LGTK2 64-bit Hash if lgtk2=1*/
293
+ } ws_lgtkhash_ie_t ;
294
+
144
295
/**
145
296
* @brief ws_channel_plan_zero_t WS channel plan 0 define domain and class
146
297
*/
@@ -158,6 +309,14 @@ typedef struct ws_channel_plan_one {
158
309
uint16_t number_of_channel ;
159
310
} ws_channel_plan_one_t ;
160
311
312
+ /**
313
+ * @brief ws_channel_plan_two_t WS channel plan 2 define regulator domain and chanel plan 1
314
+ */
315
+ typedef struct ws_channel_plan_two {
316
+ uint8_t regulator_domain ;
317
+ uint8_t channel_plan_id ;
318
+ } ws_channel_plan_two_t ;
319
+
161
320
/**
162
321
* @brief ws_channel_function_zero_t WS function 0 fixed channel
163
322
*/
@@ -189,6 +348,43 @@ typedef struct ws_excluded_channel_mask {
189
348
uint8_t mask_len_inline ;
190
349
} ws_excluded_channel_mask_t ;
191
350
351
+
352
+ typedef struct ws_excluded_channel_range_out {
353
+ unsigned excluded_range_length : 3 ;
354
+ ws_excluded_channel_range_data_t * exluded_range ;
355
+ } ws_excluded_channel_range_out_t ;
356
+
357
+
358
+ typedef struct ws_excluded_channel_mask_out {
359
+ uint16_t excluded_channel_count ;
360
+ uint8_t channel_mask_bytes_inline ;
361
+ uint32_t * channel_mask ;
362
+ } ws_excluded_channel_mask_out_t ;
363
+
364
+ /**
365
+ * @brief ws_generic_channel_info_t Generic Channel Info
366
+ */
367
+ typedef struct ws_generic_channel_info {
368
+ unsigned channel_plan : 3 ;
369
+ unsigned channel_function : 3 ;
370
+ unsigned excluded_channel_ctrl : 2 ;
371
+ union {
372
+ ws_channel_plan_zero_t zero ;
373
+ ws_channel_plan_one_t one ;
374
+ ws_channel_plan_two_t two ;
375
+ } plan ;
376
+ union {
377
+ ws_channel_function_zero_t zero ;
378
+ ws_channel_function_three_t three ;
379
+ } function ;
380
+ union {
381
+ ws_excluded_channel_range_out_t range ;
382
+ ws_excluded_channel_mask_out_t mask ;
383
+ ws_excluded_channel_range_t range_in ;
384
+ ws_excluded_channel_mask_t mask_in ;
385
+ } excluded_channels ;
386
+ } ws_generic_channel_info_t ;
387
+
192
388
/**
193
389
* @brief ws_us_ie_t WS US-IE read
194
390
*/
@@ -202,6 +398,7 @@ typedef struct ws_us_ie {
202
398
union {
203
399
ws_channel_plan_zero_t zero ;
204
400
ws_channel_plan_one_t one ;
401
+ ws_channel_plan_two_t two ;
205
402
} plan ;
206
403
union {
207
404
ws_channel_function_zero_t zero ;
@@ -228,6 +425,7 @@ typedef struct ws_bs_ie {
228
425
union {
229
426
ws_channel_plan_zero_t zero ;
230
427
ws_channel_plan_one_t one ;
428
+ ws_channel_plan_two_t two ;
231
429
} plan ;
232
430
union {
233
431
ws_channel_function_zero_t zero ;
0 commit comments