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_nvm_api.h File Reference
Library PANA NVM API for Client and Server. More...
Go to the source code of this file.
| Typedefs | |
| typedef void | wpan_params_updated (wpan_nvm_params_t *parameters) | 
| NVM memory user callback for updated parameters. | |
| typedef bool | wpan_params_get (wpan_nvm_params_t *parameters) | 
| NVM memory user for get parameter->pan_id network setup. | |
| typedef void | pana_client_session_update_cb (uint16_t pan_id, pana_client_nvm_update_process_t process) | 
| Pana client session update callback. | |
| typedef bool | pana_client_session_get_cb (uint16_t pan_id) | 
| Pana client discover session from NVM user based on pan id. | |
| typedef uint16_t | pana_server_update_cb (pana_nvm_update_process_t operation) | 
| Pana server call this when it create /Update / delete client session or update Server material. | |
| typedef bool | pana_server_session_get_cb (uint8_t *linklocal_address) | 
| Pana server call this when discover client session from NVM for given address. | |
| typedef bool | pana_server_session_get_by_id_cb (uint32_t session_id) | 
| Pana server call this when discover client session from NVM for pana session. | |
| Enumerations | |
| enum | pana_nvm_update_process_t { PANA_SERVER_MATERIAL_UPDATE, PANA_SERVER_CLIENT_SESSION_UPDATE, PANA_SERVER_CLIENT_SESSION_REMOVE_UPDATE } | 
| PANA server NVM update states.More... | |
| enum | pana_client_nvm_update_process_t { PANA_CLIENT_SESSION_UPDATE, PANA_CLIENT_SESSION_REMOVE } | 
| PANA client NVM update states.More... | |
| Functions | |
| int8_t | pana_server_nvm_callback_set (pana_server_update_cb *update_cb, pana_server_session_get_cb *nvm_get, pana_server_session_get_by_id_cb *nvm_session_get, uint8_t *nvm_static_buffer) | 
| PANA server NVM functionality initialization. | |
| int8_t | pana_server_restore_from_nvm (uint8_t *nvm_data, int8_t interface_id) | 
| PANA server base restore from NVM. | |
| int8_t | pana_server_nvm_client_session_load (uint8_t *nvm_pointer) | 
| PANA client session load from NVM API. | |
| int8_t | pana_client_nvm_callback_set (pana_client_session_update_cb *nvm_update, pana_client_session_get_cb *nvm_get, uint8_t *nvm_static_buffer) | 
| PANA client NVM functionality init. | |
| int8_t | net_nvm_data_clean (int8_t interface_id) | 
| Clean node persistent data and all PANA client sessions from the stack. | |
| int8_t | net_nvm_wpan_params_storage_enable (int8_t interface_id, wpan_params_updated *nvm_update_cb, wpan_params_get *nvm_get_cb) | 
| Enable and init network NVM parameter automatic update. | |
| int8_t | net_nvm_wpan_params_storage_reset (int8_t interface_id) | 
| Reset stored WPAN parameter's at interface . | |
| int8_t | net_nvm_wpan_params_storage_disable (int8_t interface_id) | 
| Disable stored WPAN parameter's to interface . | |
Detailed Description
Library PANA NVM API for Client and Server.
Server NVM API
- pana_server_nvm_callback_set(), Initialize PANA server NVM functionality.
- pana_server_restore_from_nvm(), Load PANA server base and security material from NVM.
- pana_server_nvm_client_session_load(), Load client session from NVM.
Client NVM API
nw_nvm.c use already this API and the application can just use net_nvm_api.h.
- pana_client_nvm_callback_set(), Initialize PANA session NVM.
Definition in file net_nvm_api.h.
Typedef Documentation
| typedef bool pana_client_session_get_cb(uint16_t pan_id) | 
Pana client discover session from NVM user based on pan id.
- Parameters:
- 
  pan_id define which pan session is 
- Returns:
- true When Session is stored to behind given session buffer
- false NVM can't detect session for given pan id
Definition at line 134 of file net_nvm_api.h.
| typedef void pana_client_session_update_cb(uint16_t pan_id, pana_client_nvm_update_process_t process) | 
Pana client session update callback.
- Parameters:
- 
  pan_id define which pan session is process PANA_CLIENT_SESSION_UPDATE or PANA_CLIENT_SESSION_REMOVE 
Definition at line 124 of file net_nvm_api.h.
| typedef bool pana_server_session_get_by_id_cb(uint32_t session_id) | 
Pana server call this when discover client session from NVM for pana session.
- Parameters:
- 
  session_id Pana session Id 
- Returns:
- true When Session is stored to behind given session buffer
- false NVM can't detect session for given session id
Definition at line 163 of file net_nvm_api.h.
| typedef bool pana_server_session_get_cb(uint8_t *linklocal_address) | 
Pana server call this when discover client session from NVM for given address.
- Parameters:
- 
  linklocal_address Link local address for sesion 
- Returns:
- true When Session is stored to behind given session buffer
- false NVM can't detect session for given address
Definition at line 153 of file net_nvm_api.h.
| typedef uint16_t pana_server_update_cb(pana_nvm_update_process_t operation) | 
Pana server call this when it create /Update / delete client session or update Server material.
- Parameters:
- 
  operation Pana server NVM update 
- Returns:
- session offset . Requirement for operation PANA_SERVER_CLIENT_SESSION_UPDATE
Definition at line 143 of file net_nvm_api.h.
| typedef bool wpan_params_get(wpan_nvm_params_t *parameters) | 
NVM memory user for get parameter->pan_id network setup.
- Parameters:
- 
  parameters Pointer for request parameters parameter->pan_id is configured for proper setup 
- Returns:
- true when configure is loaded to buffer
- false when there is no proper data for current wpan
Definition at line 116 of file net_nvm_api.h.
| typedef void wpan_params_updated(wpan_nvm_params_t *parameters) | 
NVM memory user callback for updated parameters.
- Parameters:
- 
  parameters Updated wpan parameters 
Definition at line 106 of file net_nvm_api.h.
Enumeration Type Documentation
PANA client NVM update states.
- Enumerator:
- PANA_CLIENT_SESSION_UPDATE - PANA client session update. - PANA_CLIENT_SESSION_REMOVE - PANA client session remove. 
Definition at line 86 of file net_nvm_api.h.
PANA server NVM update states.
- Enumerator:
- PANA_SERVER_MATERIAL_UPDATE - PANA server security material update. - PANA_SERVER_CLIENT_SESSION_UPDATE - PANA client session update. - PANA_SERVER_CLIENT_SESSION_REMOVE_UPDATE - PANA client session remove. 
Definition at line 76 of file net_nvm_api.h.
Function Documentation
| int8_t net_nvm_data_clean | ( | int8_t | interface_id ) | 
| int8_t net_nvm_wpan_params_storage_disable | ( | int8_t | interface_id ) | 
| int8_t net_nvm_wpan_params_storage_enable | ( | int8_t | interface_id, | 
| wpan_params_updated * | nvm_update_cb, | ||
| wpan_params_get * | nvm_get_cb | ||
| ) | 
Enable and init network NVM parameter automatic update.
This function enables MAC and MLE protocol critical components update process to NVM memory user.
- Parameters:
- 
  interface_id Interface ID. nvm_update_cb Function pointer for update NVM nvm_get_cb Function for stack to request setup from NVM. 
- Returns:
- 0, Init OK.
- -1, Unknown Interface.
- -2, Memory allocation fail.
| int8_t net_nvm_wpan_params_storage_reset | ( | int8_t | interface_id ) | 
| int8_t pana_client_nvm_callback_set | ( | pana_client_session_update_cb * | nvm_update, | 
| pana_client_session_get_cb * | nvm_get, | ||
| uint8_t * | nvm_static_buffer | ||
| ) | 
PANA client NVM functionality init.
- Parameters:
- 
  nvm_update A function pointer to NVM update process. nvm_get A function pointer for discover session from NVM for given Pan-id nvm_static_buffer A pointer to application allocated static memory, minimum size for session 86 bytes + 16-bit pan-id. 
- Returns:
- 0, Init OK.
- -1, Null parameter detect.
Definition at line 1124 of file pana_client.c.
| int8_t pana_server_nvm_callback_set | ( | pana_server_update_cb * | update_cb, | 
| pana_server_session_get_cb * | nvm_get, | ||
| pana_server_session_get_by_id_cb * | nvm_session_get, | ||
| uint8_t * | nvm_static_buffer | ||
| ) | 
PANA server NVM functionality initialization.
- Parameters:
- 
  update_cb A function pointer to NVM update process. nvm_get A function pointer for discover session data from NVM by link local address nvm_session_get A function pointer for discover session data from NVM by pana session id nvm_static_buffer A pointer to application allocated static memory, minimum size PANA_SERVER_CLIENT_NVM_SESSION_BUF_SIZE (116 bytes). 
- Returns:
- 0, Init OK.
- -1, Null parameter detect.
Definition at line 1720 of file pana_server.c.
| int8_t pana_server_nvm_client_session_load | ( | uint8_t * | nvm_pointer ) | 
PANA client session load from NVM API.
- Parameters:
- 
  nvm_pointer A pointer PANA client session. 
- Returns:
- 0, Restore OK.
- -1, Memory allocation fail.
Definition at line 1727 of file pana_server.c.
| int8_t pana_server_restore_from_nvm | ( | uint8_t * | nvm_data, | 
| int8_t | interface_id | ||
| ) | 
PANA server base restore from NVM.
- Parameters:
- 
  nvm_data A pointer to PANA server base data. interface_id Interface ID. 
- Returns:
- 0, Restore OK.
- -1, Memory allocation fail.
Definition at line 1733 of file pana_server.c.
Generated on Tue Jul 12 2022 12:46:31 by
 1.7.2
 1.7.2