Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mle_service_api.h Source File

mle_service_api.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2015-2017, Arm Limited and affiliates.
00003  * SPDX-License-Identifier: Apache-2.0
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef MLE_SERVICE_API_H_
00019 #define MLE_SERVICE_API_H_
00020 
00021 #include <ns_types.h>
00022 #include "ns_list.h"
00023 #include "ccmLIB.h"
00024 
00025 #define MLE_STANDARD_RESPONSE_DELAY 10
00026 #define MLE_HALF_SECOND_MAX_DELAY 5
00027 #define MLE_NO_DELAY 0
00028 #define MLE_TOKEN_DELAY 10
00029 #define MLE_TOKEN_BUFFER_MAX_NBR 10
00030 #define MLE_TOKEN_BUFFER_MIN_NBR -10
00031 
00032 /**
00033  * \file mle_service_api.h
00034  * \brief Mle service API for multiple MLE protocol user.
00035  *
00036  * MLE service interface configuration API
00037  *
00038  * - mle_service_interface_register(), Register interface for first user service will open socket
00039  * - mle_service_interface_unregister(), Unregister service after last user call socket will be closed
00040  * - mle_service_interface_registeration_validate(), Validate has interface registered service already
00041  * - mle_service_interface_receiver_handler_update(), Update registered message handler to new one
00042  * - mle_service_interface_tx_queue_clean(), Free interface active queued messages
00043  * - mle_service_interface_token_bucket_settings_set(), Sets token bucket settings
00044  *
00045  * MLE Security configuration API
00046  *
00047  * - mle_service_security_init(), allocate security class for interface
00048  * - mle_service_security_set_security_key(), Set security key to security class
00049  * - mle_service_security_set_frame_counter(), Update security class frame counter
00050  * - mle_service_security_key_trig() Indicate mle security class to switch default key
00051  *
00052  * MLE Security class get API
00053  *
00054  * - mle_service_security_default_key_get(). Get default key pointer
00055  * - mle_service_security_default_key_id_get(), Get default key id
00056  * - mle_service_security_next_key_get(), Get secondary or pending key pointer
00057  * - mle_service_security_next_key_id_get(), Get secondary or pending key id
00058  * - mle_service_security_level_get(), Get configured security level
00059  *
00060  * MLE message Data flow API
00061  *
00062  * - mle_service_msg_allocate(), Allocate message buffer and set default security params based on configuration
00063  * - mle_service_msg_free(), Release allocated buffer
00064  * - mle_service_message_tail_get(), Get more space for message end
00065  * - mle_service_get_data_pointer(), Get messages data pointer DO NOT USE FOR WRITE
00066  * - mle_service_get_payload_length(), Get messages payload length
00067  * - mle_service_get_payload_start_point(), Get pointer to message payload start
00068  * - mle_service_update_length(), Update messages data length by given number of added bytes
00069  * - mle_service_update_length_by_ptr(), Update messages data length by updated data pointer
00070  * - mle_service_msg_update_security_params(), Change messages default setup
00071  * - mle_service_set_msg_response_true(), Mark message response status when you know that
00072  * - mle_service_check_msg_response(), Verify messages response status (typically called at timeout call back)
00073  * - mle_service_trasnaction_buffer_get_for_response(), Validate received response for interface request
00074  * - mle_service_check_msg_sent(), Check if message has been sent to socket
00075  *
00076  * Messages TX API
00077  * - mle_service_set_packet_callback(), Set messages timeout call back
00078  * - mle_service_get_msg_destination_address_pointer(), Get messages destination address pointer for verify or write
00079  * - mle_service_set_msg_destination_address(), Set messages IPv6 destination address
00080  * - mle_service_set_msg_timeout_parameters(), Update messages timeout and delay parameters
00081  * - mle_service_send_message(), Send builded message with given timeout parameters
00082  * - mle_service_reject_message_build(), Build and send MLE link reject message to given destination address
00083  * - mle_service_set_msg_token_bucket_priority(), Sets message a priority over token bucket restrictions
00084  *
00085  * Service Messages timeout API
00086  * - mle_service_timer_tick(), This need to be call periodically and give time in 100ms ticks
00087  *
00088  */
00089 
00090 typedef struct mle_security_header {
00091     unsigned securityLevel:3;
00092     unsigned KeyIdMode:2;
00093     uint32_t frameCounter;
00094     uint8_t Keysource[8];
00095     uint8_t KeyIndex;
00096     bool invalid_frame_counter;
00097 } mle_security_header_t;
00098 
00099 
00100 typedef enum mle_security_event  {
00101     MLE_SEC_MAX_FRAME_COUNTER_REACHED  = 0, /*!< MLE security counter reach max 0xffffffff value when device can't use same key anymore */
00102     MLE_SEC_KEY_UPDATE_NOTIFY , /*!< MLE security have trigger new default key */
00103     MLE_SEC_UNKNOWN_KEY  /*!< MLE security have detect unknown key id*/
00104 } mle_security_event_t;
00105 
00106 #define MLE_ALLOCATED_PORT 19788    /* Mesh Link Establishment - draft */
00107 
00108 /*
00109  * When MLE service receives MLE message it will parse Generic MLE header
00110  *
00111  */
00112 typedef struct {
00113     uint8_t message_type; /*!< MLE message type */
00114     uint8_t *packet_src_address; /*!< Packet Source address */
00115     uint8_t *packet_dst_address; /*!< Packet Destination address */
00116     uint8_t *data_ptr; /*!< Data pointer */
00117     uint16_t data_length; /*!< Data Length */
00118     uint16_t src_pan_id;  /*!< Link source Pan-id */
00119     uint16_t dst_pan_id; /*!< Link destination Pan-id */
00120     uint8_t lqi; /*!< Received Link quality*/
00121     int8_t dbm; /*!< Received RSSI */
00122 } mle_message_t;
00123 
00124 /*
00125  * MLE message timeout and re transmission parameters
00126  *
00127  */
00128 typedef struct {
00129 uint16_t timeout_init; /*!< Define start timeout in seconds */
00130 uint16_t timeout_max; /*!< Define max timeout time in seconds */
00131 uint8_t retrans_max; /*!< Define max packet TX count */
00132 uint8_t delay; /*!< 100ms Ticks for random delay */
00133 } mle_message_timeout_params_t;
00134 
00135 /**
00136  *  MLE service message receiver handler call back function pointer
00137  *
00138  *  All service user need to register this function pointer.
00139  *
00140  *  \param interface_id define interface id for receiver
00141  *  \param mle_msg mle message structure
00142  *  \param security_headers indicate messages security parameters
00143  */
00144 typedef void (mle_service_receive_cb)(int8_t interface_id, mle_message_t *mle_msg, mle_security_header_t *security_headers);
00145 
00146 /**
00147  *  MLE service security bypass message receiver handler call back function pointer
00148  *
00149  *  All service user need to register this function pointer.
00150  *
00151  *  \param interface_id define interface id for receiver
00152  *  \param mle_msg mle message structure
00153  */
00154 typedef void (mle_service_receive_security_bypass_cb)(int8_t interface_id, mle_message_t *mle_msg);
00155 
00156 /**
00157  *  MLE service security key request by 32-bit key source
00158  *
00159  *  All service user need to register this function pointer if they support 32-bit key source.
00160  *
00161  *  \param interface_id define interface id for receiver
00162  *  \param keyId key identifier
00163  *  \param keySequnce 32-bit key source
00164  */
00165 typedef uint8_t * (mle_service_key_request_by_counter_cb)(int8_t interface_id, uint8_t keyId, uint32_t keySequnce);
00166 
00167 /**
00168  *  MLE service security event notify
00169  *
00170  *  \param interface_id define interface id for receiver
00171  *  \param event
00172  *  \param keyId key identifier
00173  *
00174  */
00175 typedef uint8_t * (mle_service_security_notify_cb)(int8_t interface_id, mle_security_event_t event, uint8_t keyId);
00176 
00177 /**
00178  *  MLE service message timeout call back
00179  *
00180  *  This function will be called when msg timeout happen
00181  *
00182  *  \param interface_id define interface id for receiver
00183  *  \param msgId key identifier
00184  *  \param usedAllRetries false when
00185  *
00186  *  \return true Continue packet retry
00187  *  \return false Stop TX process and
00188  *
00189  */
00190 typedef bool (mle_service_message_timeout_cb)(int8_t interface_id, uint16_t msgId, bool usedAllRetries);
00191 
00192 /*
00193  * Initialise server instance.
00194  * Creates and shares socket for other mle services.
00195  *
00196  * \param interface_id Registered services interface Id.
00197  * \param receive_cb Message RX handler.
00198  * \param mac64 Interface 64-bit MAC.
00199  * \param challengeLength challenge length
00200  * Return values
00201  * 0, Register OK.
00202  */
00203 int mle_service_interface_register(int8_t interface_id, mle_service_receive_cb *receive_cb, uint8_t *mac64, uint8_t challengeLength);
00204 
00205 /*
00206 * Deletes server instance.
00207 * Removes all data related to this instance
00208 *
00209 * \param interface_id interface Id.
00210 *
00211 */
00212 void mle_service_interface_unregister(int8_t interface_id);
00213 
00214 /*
00215 * Validate is this interface register service already.
00216 *
00217 * \param interface_id interface Id.
00218 *
00219 * \return true when register ready
00220 * \return false when register not ready
00221 *
00222 */
00223 bool mle_service_interface_registeration_validate(int8_t interface_id);
00224 
00225 /*
00226 * Update Interface packet handler.
00227 *
00228 * Usefully function to switch message handler based on state machine
00229 *
00230 * \param interface_id interface Id.
00231 * \param receive_cb new message handler function pointer
00232 *
00233 * \return 0 register OK
00234 * \return < 0 Register fail
00235 *
00236 */
00237 int mle_service_interface_receiver_handler_update(int8_t interface_id, mle_service_receive_cb *receive_cb);
00238 
00239 /*
00240 * Update Interface security by pass handler.
00241 *
00242 * Usefully function to switch message handler based on state machine
00243 *
00244 * \param interface_id interface Id.
00245 * \param receive_cb new message handler function pointer
00246 *
00247 * \return 0 register OK
00248 * \return < 0 Register fail
00249 *
00250 */
00251 int mle_service_interface_receiver_bypass_handler_update(int8_t interface_id, mle_service_receive_security_bypass_cb *receive_cb);
00252 
00253 /**
00254 * Delete and free all activated Transaction.
00255 *
00256 * \param interface_id interface Id.
00257 *
00258 */
00259 void mle_service_interface_tx_queue_clean(int8_t interface_id);
00260 
00261 /**
00262 * count all activated Transactions.
00263 *
00264 * \param interface_id interface Id.
00265 *
00266 * \return count of active buffers
00267 *
00268 */
00269 
00270 int mle_service_reset_frame_counters(int8_t interfaceId);
00271 
00272 uint16_t mle_service_interface_tx_queue_size(int8_t interface_id);
00273 
00274 /**
00275 * Sets MLE token bucket settings
00276 *
00277 * Using of message tokens is optional.
00278 *
00279 * \param size Bucket size, 0 to 255, 0 means not in use
00280 * \param rate Token rate, 0 to 255, 0 means not in use
00281 * \param count, 0 to 255, 0 means not in use
00282 *
00283 * \return 0 Set is OK
00284 * \return -1 Unknown interface id
00285 * \return -2 Other error
00286 */
00287 int mle_service_interface_token_bucket_settings_set(int8_t interface_id, uint8_t size, uint8_t rate, uint8_t count);
00288 
00289 /*
00290  * MLE service interface security init.
00291  *
00292  * \param interface_id Id of registered server.
00293  * \param security_level valid values below:
00294  *  - AES_NO_SECURITY
00295  *  - AES_SECURITY_LEVEL_MIC32
00296  *  - AES_SECURITY_LEVEL_MIC64
00297  *  - AES_SECURITY_LEVEL_MIC128
00298  *  - AES_SECURITY_LEVEL_ENC
00299  *  - AES_SECURITY_LEVEL_ENC_MIC32
00300  *  - AES_SECURITY_LEVEL_ENC_MIC64
00301  *  - AES_SECURITY_LEVEL_ENC_MIC128
00302  *  \param security_frame_counter MLE security frame counter init value
00303  *  \param key_counter_req function pointer for request key by when key source is 32-bit
00304  *  \param notify function pointer for service notify security events
00305  *
00306  *  \return 0 Init OK
00307  *  \return -1 Unknown interface id
00308  *  \return -2 Un supported security level
00309  *
00310  */
00311 int mle_service_security_init(int8_t interfaceId, uint8_t security_level,uint32_t security_frame_counter, mle_service_key_request_by_counter_cb * key_counter_req, mle_service_security_notify_cb *notify);
00312 
00313 /*
00314  * SET MLE service interfac primary or pending primary security key.
00315  *
00316  * \param interface_id Id of registered server.
00317  * \param security_key pointer to 128-bit key
00318  * \param keyId key id.
00319  * \param primary true when set new primary and
00320  *
00321  */
00322 
00323 bool mle_service_security_set_security_key(int8_t interfaceId, const uint8_t *security_key, uint8_t keyId, bool primary);
00324 
00325 /*
00326  * SET MLE security frame counter
00327  *
00328  * \param interface_id Id of registered server.
00329  * \param frame_counter new frame counter
00330  *
00331  */
00332 bool mle_service_security_set_frame_counter(int8_t interfaceId, uint32_t frame_counter);
00333 /*
00334  * GET MLE security frame counter
00335  *
00336  * \param interface_id Id of registered server.
00337  *
00338  * \return Current frame counter
00339  *
00340  */
00341 uint32_t mle_service_security_get_frame_counter(int8_t interfaceId);
00342 
00343 
00344 /*
00345  * Notify MLE service interface for switch default security key.
00346  *
00347  * \param interface_id Id of registered server.
00348  * \param keyId Trigged key id.
00349  *
00350  */
00351 bool mle_service_security_key_trig(int8_t interfaceId, uint8_t keyId);
00352 
00353 /*
00354  * GET MLE security default key
00355  *
00356  * \param interface_id Id of registered server.
00357  *
00358  * \return > 0 Key pointer
00359  * \return NULL No key available
00360  */
00361 uint8_t * mle_service_security_default_key_get(int8_t interfaceId);
00362 
00363 /*
00364  * GET MLE security default key id
00365  *
00366  * \param interface_id Id of registered server.
00367  *
00368  * \return > 0 Key id
00369  * \return 0 not key id available or interface is not regostred
00370  */
00371 uint8_t  mle_service_security_default_key_id_get(int8_t interfaceId);
00372 
00373 /*
00374  * GET MLE security coming key pointer
00375  *
00376  * \param interface_id Id of registered server.
00377  *
00378  * \return > 0 Key id
00379  * \return 0 no available
00380  */
00381 uint8_t * mle_service_security_next_key_get(int8_t interfaceId);
00382 
00383 /**
00384  * GET MLE security coming key id
00385  *
00386  * \param interface_id Id of registered server.
00387  *
00388  * \return > 0 Pointer to key
00389  * \return NULL no available
00390  */
00391 uint8_t  mle_service_security_next_key_id_get(int8_t interfaceId);
00392 
00393 /*
00394  * GET MLE security security level
00395  *
00396  * \param interface_id Id of registered server.
00397  *
00398  * \return Security level
00399  */
00400 uint8_t  mle_service_security_level_get(int8_t interfaceId);
00401 
00402 /**
00403 * Allocate MLE transaction buffer and set default security parameters to buffer.
00404 *
00405 * Configured security params from interface
00406 *  * security level
00407 *  * key id mode MAC_KEY_ID_MODE_IDX
00408 * Service will automatically set next params
00409 *  * Key id
00410 *  * security frame counter
00411 *
00412 * \param interface_id interface Id.
00413 * \param data_length Payload max length
00414 * \param challengeAllocate True allocate challenge and write that to message automatically
00415 * \param type message type
00416 *
00417 * \return > 0 Message id
00418 * \return 0 Allocate fail
00419 *
00420 */
00421 uint16_t mle_service_msg_allocate(int8_t interface_id, uint16_t data_length, bool challengeAllocate, uint8_t type);
00422 
00423 /**
00424 * Free message.
00425 *
00426 * \param msgId buffer Id.
00427 *
00428 * \return  0 Free Valid
00429 * \return -1 Unknown Id
00430 *
00431 */
00432 int mle_service_msg_free(uint16_t msgId);
00433 
00434 /**
00435 * Set new security level and Key id mode.
00436 *
00437 *
00438 * \param msgId message id for update.
00439 * \param security_level valid values below:
00440 *  - AES_NO_SECURITY
00441 *  - AES_SECURITY_LEVEL_MIC32
00442 *  - AES_SECURITY_LEVEL_MIC64
00443 *  - AES_SECURITY_LEVEL_MIC128
00444 *  - AES_SECURITY_LEVEL_ENC
00445 *  - AES_SECURITY_LEVEL_ENC_MIC32
00446 *  - AES_SECURITY_LEVEL_ENC_MIC64
00447 *  - AES_SECURITY_LEVEL_ENC_MIC128
00448 *
00449 * \param key_id_mode valid values below:
00450 * - MAC_KEY_ID_MODE_IDX
00451 * - MAC_KEY_ID_MODE_SRC4_IDX
00452 *
00453 * \return 0 Set OK
00454 * \return -1 Unknown message id
00455 * \return -2 Not supported parameters
00456 *
00457 */
00458 int mle_service_msg_update_security_params(uint16_t msgId, uint8_t security_level, uint8_t key_id_mode, uint32_t keysequence);
00459 
00460 /**
00461 * MLE message tail get for new payload.
00462 *
00463 * \param msgId message id.
00464 * \param tail_length define messages new need tail length
00465 *
00466 * \return 0 tail allocated  OK
00467 * \return -1 tail allocate fail
00468 * \return -2 unknown message id
00469 *
00470 */
00471 int mle_service_message_tail_get(uint16_t msgId, uint16_t tail_length);
00472 
00473 /**
00474 * Get MLE message data pointer for write.
00475 *
00476 * \param msgId message id.
00477 *
00478 * \return >0 Valid pointer for write
00479 * \return NULL Not valid message id
00480 *
00481 */
00482 uint8_t * mle_service_get_data_pointer(uint16_t msgId);
00483 
00484 /**
00485 * Get MLE message pointer to message start
00486 *
00487 * \param msgId message id.
00488 *
00489 * \return >0 Valid pointer for read or verify
00490 * \return NULL Not valid message id
00491 *
00492 */
00493 uint8_t * mle_service_get_payload_start_point(uint16_t msgId);
00494 
00495 /**
00496 * Get MLE message payload length
00497 *
00498 * \param msgId message id.
00499 *
00500 * \return length of payload
00501 *
00502 */
00503 uint16_t  mle_service_get_payload_length(uint16_t msgId);
00504 
00505 /**
00506 * Set MLE message end point by new tail.
00507 *
00508 * \param msgId message id.
00509 * \param tail_length how many new byte added to message end
00510 *
00511 * \return 0 Length Update OK
00512 * \return -1 Unknown message id
00513 * \return -2 buffer overflow
00514 *
00515 */
00516 int mle_service_update_length(uint16_t msgId, uint16_t tail_length);
00517 
00518 /**
00519 * Set MLE message end point by new data end pointer.
00520 *
00521 * \param msgId message id.
00522 * \param data_end_ptr new message end pointer
00523 *
00524 * \return 0 Length Update OK
00525 * \return -1 Unknown message id
00526 * \return -2 buffer overflow
00527 *
00528 */
00529 int mle_service_update_length_by_ptr(uint16_t msgId, uint8_t *data_end_ptr);
00530 
00531 /**
00532 * Get MLE message destination address pointer for write purpose.
00533 *
00534 * \param msgId message id.
00535 *
00536 * \return >0 Pointer get OK
00537 * \return NULL message id not valid
00538 *
00539 */
00540 uint8_t * mle_service_get_msg_destination_address_pointer(uint16_t msgId);
00541 
00542 
00543 /**
00544 * Set MLE message destination address
00545 *
00546 * \param msgId message id.
00547 * \param dstAddress message destination address
00548 *
00549 * \return 0 Set OK
00550 * \return -1 message id not valid
00551 * \return -2 address pointer is NULL
00552 *
00553 */
00554 int mle_service_set_msg_destination_address(uint16_t msgId, const uint8_t *dstAddress);
00555 
00556 /**
00557 * Set Messages link PAN
00558 *
00559 * \param msgId message id.
00560 * \param panid Link pan-id for this packet
00561 *
00562 * \return 0 Set OK
00563 * \return -1 message id not valid
00564 *
00565 */
00566 int mle_service_set_msg_panid(uint16_t msgId, uint16_t panid);
00567 
00568 /**
00569 * Set messages timeout parameters.
00570 *
00571 * Messages timeout parameters define messages TX count and init timeout and max timeout values is messages delayed.
00572 * Delayed message will affect random time between 100-900ms
00573 *
00574 * \param msgId Message Id.
00575 * \param timeout_params messages transmission parameters
00576 */
00577 int mle_service_set_msg_timeout_parameters(uint16_t msgId, mle_message_timeout_params_t *timeout_params);
00578 
00579 int mle_service_set_msg_rf_channel(uint16_t msgId, uint8_t channel);
00580 
00581 int mle_service_set_msg_link_layer_security_mode(uint16_t msgId, bool use_key_id_mode_2);
00582 
00583 
00584 /**
00585 * Set MLE message response received state
00586 *
00587 * \param msgId message id.
00588 *
00589 * \return 0 Set OK
00590 * \return -1 Unknown Id
00591 *
00592 */
00593 int mle_service_set_msg_response_true(uint16_t msgId);
00594 
00595 /**
00596 * Check MLE message response received state
00597 *
00598 * Usefully function at message timeout call back to check response status
00599 *
00600 * \param msgId message id.
00601 *
00602 * \return true message has received response
00603 * \return false no response or unknow message id
00604 *
00605 */
00606 bool mle_service_check_msg_response(uint16_t msgId);
00607 
00608 /*
00609 * MLE active  transaction buffer id get by challenge data.
00610 *
00611 * \param responseData
00612 * \param responseData True allocate challenge and write that to message automatically
00613 * \param msgId pointer where message id can be saved
00614 *
00615 * \return true Response is valid and tied to this msgId
00616 * \return false No active Tx buffer available for this response
00617 *
00618 */
00619 bool mle_service_transaction_buffer_get_for_response(uint8_t *responseData, uint16_t length, uint16_t *msgId);
00620 
00621 /**
00622 * Check if message has been sent to socket.
00623 *
00624 * Function can be used whether message has been sent to socket or
00625 * has been rejected by token bucket.
00626 *
00627 * \param msgId message id.
00628 *
00629 * \return true message has been sent
00630 * \return false message has not been sent
00631 *
00632 */
00633 bool mle_service_check_msg_sent(uint16_t msgId);
00634 
00635 /**
00636 * MLE message timeout handler set.
00637 *
00638 * \param msgId message id.
00639 * \param cb message timeout call back
00640 *
00641 * \return 0 Callback set OK
00642 * \return < 0 unknown message id
00643 *
00644 */
00645 int mle_service_set_packet_callback(uint16_t msgId, mle_service_message_timeout_cb *cb);
00646 
00647 
00648 /**
00649 * Sends MLE message.
00650 *
00651 * \param msgId Message Id.
00652 */
00653 int mle_service_send_message(uint16_t msgId);
00654 
00655 /**
00656  * Timer tick function.
00657  *
00658  * should be called in 100ms intervals if more time passes before call amount in 100ms units.
00659  *
00660  */
00661 bool mle_service_timer_tick(uint16_t ticks);
00662 
00663 /**
00664 * Build and send standard link reject message.
00665 *
00666 * \param msgId Message Id.
00667 * \param dstIpv6 rejected link
00668 * \param force_unsecure true force force disbale security
00669 */
00670 int mle_service_reject_message_build(int8_t interfaceId, uint8_t *dstIpv6, bool force_unsecure);
00671 
00672 /**
00673 * Sets message a priority over token bucket restrictions.
00674 *
00675 * \param msgId Message Id.
00676 *
00677 * \return 0 priority set OK
00678 * \return < 0 unknown message id
00679 */
00680 int mle_service_set_msg_token_bucket_priority(uint16_t msgId);
00681 
00682 /**
00683 * Activates MLE Frame counter checking for the interface.
00684 *
00685 * \param value set true for check activation.
00686 *
00687 */
00688 void mle_service_set_frame_counter_check(bool value);
00689 
00690 /**
00691 * Set 802.15.4 security option for fragmented MLE messages
00692 *
00693 * \param value set true to force security for fragmented packets.
00694 * \param value set false to use default security for fragmented packets.
00695 *
00696 */
00697 void mle_service_set_fragmented_msg_ll_security(bool value);
00698 
00699 /**
00700 * Commands MLE service to accept message with invalid MLE frame counter.
00701 *
00702 * \param value set true to accept invalid frame counters
00703 *
00704 */
00705 void mle_service_set_accept_invalid_frame_counter(bool value);
00706 
00707 #endif /* MLE_SERVICE_API_H_ */