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.
pana_internal_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 PANA_INTERNAL_API_H_ 00019 #define PANA_INTERNAL_API_H_ 00020 #ifdef PANA 00021 #ifdef ECC 00022 #include "libX509_V3.h" 00023 #include "ecc.h" 00024 #endif 00025 #include "net_interface.h" 00026 #include "net_pana_parameters_api.h" 00027 #include "Security/Common/sec_lib_definitions.h" 00028 struct nwk_pana_params; 00029 00030 void pana_reset_values(uint16_t pan_id); 00031 int8_t pana_client_interface_init(int8_t interface_id, net_tls_cipher_e cipher_mode, uint32_t psk_key_id); 00032 void pana_reset_client_session(void); 00033 00034 00035 00036 00037 /* Allocate Pana Parameters */ 00038 struct nwk_pana_params * pana_client_parameter_allocate(void); 00039 /* Define Key material */ 00040 uint8_t *pana_key_get(const uint8_t *key); 00041 00042 void pana_common_state_machine(sec_suite_t *suite); 00043 00044 #ifdef PANA_SERVER_API 00045 00046 int8_t pana_server_process_ready_cb_set(void (*cb_fptr)(void)); 00047 00048 int8_t pana_server_interface_init(int8_t interface_id, net_tls_cipher_e cipher_mode, const uint8_t *key_material, uint32_t time_period_before_activate_key); 00049 00050 /** Request Key material */ 00051 int8_t pana_server_key_material_load(int8_t interface_id); 00052 00053 /* Get Pana server key material */ 00054 int8_t pana_network_key_get(int8_t interface_id, ns_keys_t *key); 00055 00056 /** Trig New Key Material */ 00057 int8_t pana_server_trig_new_key(int8_t interface_id); 00058 00059 /** Start Key Update Process */ 00060 int8_t pana_server_key_update(int8_t interface_id, const uint8_t *network_key_material); 00061 00062 #else 00063 #define pana_server_process_ready_cb_set(cb_fptr) -2 00064 #define pana_server_key_material_load(interface_id) -2 00065 #define pana_server_interface_init(interface_id,cipher_mode, key_material, time_period_before_activate_key) -2 00066 #define pana_network_key_get(interface_id, key) -2 00067 #define pana_server_trig_new_key(interface_id) -2 00068 #define pana_server_key_update(interface_id, network_key_material) -2 00069 #endif 00070 00071 /** TriG Pull Key Material */ 00072 int8_t pana_client_key_pull(int8_t interface_id); 00073 00074 int8_t pana_interface_certificate_chain_set(const arm_certificate_chain_entry_s *chain_info); 00075 00076 const pana_lib_parameters_s *pana_get_params_ptr(void); 00077 00078 uint32_t pana_handshake_timeout(void); 00079 00080 uint8_t pana_retry_req_max_get(void); 00081 00082 int8_t pana_set_params(const pana_lib_parameters_s *params); 00083 int8_t pana_get_params(pana_lib_parameters_s *params); 00084 uint8_t pana_ping_notify_msg_tx(uint16_t pan_id); 00085 #else 00086 #define pana_server_process_ready_cb_set(cb_fptr) -2 00087 #define pana_get_params_ptr() NULL 00088 #define pana_common_state_machine(suite) ((void)0) 00089 #define pana_reset_values(pan_id) ((void)0) 00090 #define pana_key_get(key) NULL 00091 #define pana_server_key_material_load(interface_id) -2 00092 #define pana_server_interface_init(interface_id,cipher_mode, key_material, time_period_before_activate_key) -2 00093 #define pana_client_interface_init(interface_id, cipher_mode, psk_key_id) -2 00094 #define pana_reset_client_session() ((void)0) 00095 #define pana_client_parameter_allocate() NULL 00096 #define pana_server_trig_new_key(interface_id) -2 00097 #define pana_interface_certificate_chain_set(chain_info) -2 00098 #define pana_client_key_pull(interface_id) -2 00099 #define pana_network_key_get(interface_id, key) -2 00100 #define pana_set_params(params) -2 00101 #define pana_get_params(params) -2 00102 #define pana_server_key_update(interface_id, network_key_material) -2 00103 #define pana_ping_notify_msg_tx(pan_id) 0 00104 #endif 00105 #endif /* PANA_INTERNAL_API_H_ */
Generated on Tue Jul 12 2022 12:22:16 by
