Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
net_pana_parameters_api.h
00001 /* 00002 * Copyright (c) 2014-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 NET_PANA_PARAMETERS_API_H_ 00019 #define NET_PANA_PARAMETERS_API_H_ 00020 00021 #include "ns_types.h" 00022 00023 /** 00024 * \file net_pana_parameters_api.h 00025 * \brief An API for setting up or changing PANA library parameters. 00026 * 00027 * \section set-pana-param Setting up PANA parameters. 00028 * - net_pana_parameter_set(), A function to set up PANA library parameters. 00029 * \section check-pana-param Checking existing PANA setup. 00030 * - net_pana_parameter_read(), A function to read current PANA library setup. 00031 */ 00032 00033 /*! 00034 * \struct pana_lib_parameters_s 00035 * \brief PANA library dynamic parameters. 00036 */ 00037 /** The structure defines PANA library parameters.*/ 00038 typedef struct pana_lib_parameters_s { 00039 uint16_t PCI_IRT; /**< Initial PCI timeout in seconds, default 10. */ 00040 uint16_t PCI_MRT; /**< Max PCI timeout value in seconds, default 60. */ 00041 uint8_t PCI_MRC; /**< PCI_MRC Max PCI retransmission attempts, default 5. */ 00042 uint16_t REQ_IRT; /**< PCI_MRC Initial request timeout in seconds, default 20. */ 00043 uint16_t REQ_MRT; /**< Max request timeout value, default 60. */ 00044 uint16_t REQ_MRC; /**< Max request retransmission attempts, default 4. */ 00045 uint16_t AUTHENTICATION_TIMEOUT; /**< Max timeout for authencication, default 100 seconds. */ 00046 uint16_t KEY_UPDATE_THRESHOLD; /**< Gap in seconds before the server starts to send a new network key, default 10. */ 00047 uint8_t KEY_ID_MAX_VALUE; /**< Define resolution for key ID [1-KEY_ID_MAX_VALUE], default 255. MIN accepted value is 3.*/ 00048 uint16_t EAP_FRAGMENT_SIZE; /**< Define EAP fragment slot size. Fragmentation is activated when EAP payload is more than 920. Default 296. */ 00049 uint8_t AUTH_COUNTER_MAX; /**< Define PANA session re-authentication limit. When the MAX value is reached the server does not respond to the PANA notify request. Default 0xff. */ 00050 } pana_lib_parameters_s; 00051 00052 /** 00053 * \brief A function to set PANA library parameters. 00054 * 00055 * Note: This function should be called after net_init_core() and definitely 00056 * before creating any 6LoWPAN interface. 00057 * 00058 * For future compatibility, to support extensions to this structure, read 00059 * the current parameters using net_pana_parameter_read(), 00060 * modify known fields, then set. 00061 * 00062 * \param parameter_ptr A pointer for PANA parameters. 00063 * 00064 * \return 0, Change OK. 00065 * \return -1, Invalid values. 00066 * \return -2, PANA not supported. 00067 * 00068 */ 00069 extern int8_t net_pana_parameter_set(const pana_lib_parameters_s *parameter_ptr); 00070 00071 00072 /** 00073 * \brief A function to read existing PANA library parameters. 00074 * 00075 * \param parameter_ptr An output pointer for PANA parameters. 00076 * 00077 * \return 0, Read OK. 00078 * \return -1, PANA not supported. 00079 */ 00080 extern int8_t net_pana_parameter_read(pana_lib_parameters_s *parameter_ptr); 00081 00082 #endif /* NET_PANA_PARAMETERS_API_H_ */
Generated on Tue Jul 12 2022 12:45:36 by
