|
Z-Wave Protocol Controller Reference
|
#include "zwave_s2_transport.h"#include "zwave_s2_keystore.h"#include "zwave_s2_process.h"#include "zwave_s2_internal.h"#include "S2.h"#include "s2_inclusion.h"#include "s2_keystore.h"#include "s2_protocol.h"#include "s2_classcmd.h"#include <stdio.h>#include <string.h>#include "zwave_controller_connection_info.h"#include "zwave_command_class_indices.h"#include "zwave_controller_internal.h"#include "zwave_controller_storage.h"#include "zwave_network_management.h"#include "zwave_rx.h"#include "zwave_tx.h"#include "zwave_tx_groups.h"#include "zwave_utils.h"#include "sys/clock.h"#include "sl_log.h"Classes | |
| struct | s2_transport_session_state |
| struct | s2_node_nls_context |
Macros | |
| #define | LOG_TAG "zwave_s2_transport" |
| #define | END_NODE_VERIFY_DELIVERY_TIMEOUT 500 |
| #define | NONCE_REP_TIME 250 |
| #define | SECURITY_2_NONCE_GET 0x01 |
| #define | SECURITY_2_COMMANDS_SUPPORTED_REPORT 0x0E |
| #define | INVALID_KEY_ID 0xFF |
| #define | S2_NONCE_REPORT_MOS_SOS_INDEX 3 |
| #define | S2_NONCE_REPORT_MOS_SOS_MASK 0x3 |
| #define | NLS_ENABLED_NODES_PER_BYTE 8 |
| #define | UNAUTHENTICATED_KEY_SLOT 0 |
| #define | AUTHENTICATED_KEY_SLOT 1 |
| #define | ACCESS_KEY_SLOT 2 |
| #define | LR_AUTHENTICATED_KEY_SLOT 3 |
| #define | LR_ACCESS_KEY_SLOT 4 |
Typedefs | |
| typedef struct s2_transport_session_state | s2_transport_session_state_t |
| typedef struct s2_node_nls_context | s2_node_nls_context_t |
Enumerations | |
| enum | zwave_s2_current_transmission_type_t { SINGLECAST , MULTICAST } |
Functions | |
| static uint8_t | encapsulation_to_class (zwave_controller_encapsulation_scheme_t encap) |
| static zwave_controller_encapsulation_scheme_t | class_to_encapsulation (uint8_t key_class) |
| static zwave_s2_keyset_t | get_s2_keyset_from_node (zwave_node_id_t node_id) |
| Finds out which keyset to use for S2 transmissions to a NodeID. More... | |
| static zwave_s2_keyset_t | get_s2_keyset_from_group (zwave_multicast_group_id_t group_id) |
| Finds out which keyset to use for S2 transmissions to a Group ID. More... | |
| static void | send_frame_callback (uint8_t status, const zwapi_tx_report_t *tx_info, void *user) |
| void | S2_get_hw_random (uint8_t *buf, uint8_t len) |
| static uint8_t | convert_lr_to_zwave_class_id (uint8_t class_id) |
| void | S2_get_commands_supported (node_t lnode, uint8_t class_id, const uint8_t **cmdClasses, uint8_t *length) |
| void | S2_send_done_event (struct S2 *ctxt, s2_tx_status_t status) |
| void | S2_msg_received_event (struct S2 *ctxt, s2_connection_t *src, uint8_t *buf, uint16_t len) |
| uint8_t | S2_send_frame (struct S2 *ctxt, const s2_connection_t *conn, uint8_t *buf, uint16_t len) |
| uint8_t | S2_send_frame_no_cb (struct S2 *ctxt, const s2_connection_t *conn, uint8_t *buf, uint16_t len) |
| uint8_t | S2_send_frame_multi (struct S2 *ctxt, s2_connection_t *conn, uint8_t *buf, uint16_t len) |
| void | S2_notify_nls_state_report (node_t srcNode, uint8_t class_id, bool nls_capability, bool nls_state) |
| void | S2_save_nls_state (void) |
| sl_status_t | compute_next_nls_enabled_node (void) |
| static uint16_t | compute_nls_enabled_node_cnt (void) |
| int8_t | S2_get_nls_node_list (node_t srcNode, bool request, bool *is_last_node, uint16_t *node_id, uint8_t *granted_keys, bool *nls_state) |
| int8_t | S2_notify_nls_node_list_report (node_t srcNode, uint16_t id_of_node, uint8_t keys_node_bitmask, bool nls_state) |
| sl_status_t | zwave_s2_send_data (const zwave_controller_connection_info_t *connection, uint16_t data_length, const uint8_t *cmd_data, const zwave_tx_options_t *tx_options, const on_zwave_tx_send_data_complete_t on_send_complete, void *user, zwave_tx_session_id_t parent_session_id) |
| Sending an S2 encapsulated frame. More... | |
| sl_status_t | zwave_s2_on_frame_received (const zwave_controller_connection_info_t *connection_info, const zwave_rx_receive_options_t *rx_options, const uint8_t *frame_data, uint16_t frame_length) |
| Entry point of S2 frames received from the PHY/radio stack. More... | |
| sl_status_t | zwave_s2_set_secure_nif (const uint8_t *nif, uint8_t nif_length) |
| Set the secure NIF. More... | |
| void | zwave_s2_transport_init () |
| Initializes the Z-Wave S2 Transport. More... | |
| void | S2_resynchronization_event (node_t remote_node, sos_event_reason_t reason, uint8_t seqno, node_t local_node) |
| void | zwave_s2_on_on_multicast_group_deleted (zwave_multicast_group_id_t group_id) |
| Asks LibS2 to erase an MPAN entry. More... | |
| sl_status_t | zwave_s2_abort_send_data (zwave_tx_session_id_t session_id) |
| Z-Wave controller transport callback function which will be triggered when S2 frame tranmission is aborted. More... | |
Variables | |
| struct S2 * | s2_ctx |
| static s2_transport_session_state_t | state = {} |
| static uint8_t | secure_nif [ZWAVE_MAX_FRAME_SIZE] |
| static uint8_t | secure_nif_length |
| static s2_node_nls_context_t | node_nls_context = {0} |
| #define ACCESS_KEY_SLOT 2 |
| #define AUTHENTICATED_KEY_SLOT 1 |
| #define END_NODE_VERIFY_DELIVERY_TIMEOUT 500 |
| #define INVALID_KEY_ID 0xFF |
| #define LOG_TAG "zwave_s2_transport" |
| #define LR_ACCESS_KEY_SLOT 4 |
| #define LR_AUTHENTICATED_KEY_SLOT 3 |
| #define NLS_ENABLED_NODES_PER_BYTE 8 |
| #define NONCE_REP_TIME 250 |
| #define S2_NONCE_REPORT_MOS_SOS_INDEX 3 |
| #define S2_NONCE_REPORT_MOS_SOS_MASK 0x3 |
| #define SECURITY_2_COMMANDS_SUPPORTED_REPORT 0x0E |
| #define SECURITY_2_NONCE_GET 0x01 |
| #define UNAUTHENTICATED_KEY_SLOT 0 |
| typedef struct s2_node_nls_context s2_node_nls_context_t |
| typedef struct s2_transport_session_state s2_transport_session_state_t |
|
static |
| sl_status_t compute_next_nls_enabled_node | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
Finds out which keyset to use for S2 transmissions to a Group ID.
| group_id | The GroupID to transmit to |
|
static |
Finds out which keyset to use for S2 transmissions to a NodeID.
| node_id | The NodeID to transmit to |
| void S2_get_commands_supported | ( | node_t | lnode, |
| uint8_t | class_id, | ||
| const uint8_t ** | cmdClasses, | ||
| uint8_t * | length | ||
| ) |
| void S2_get_hw_random | ( | uint8_t * | buf, |
| uint8_t | len | ||
| ) |
| int8_t S2_get_nls_node_list | ( | node_t | srcNode, |
| bool | request, | ||
| bool * | is_last_node, | ||
| uint16_t * | node_id, | ||
| uint8_t * | granted_keys, | ||
| bool * | nls_state | ||
| ) |
| void S2_msg_received_event | ( | struct S2 * | ctxt, |
| s2_connection_t * | src, | ||
| uint8_t * | buf, | ||
| uint16_t | len | ||
| ) |
| int8_t S2_notify_nls_node_list_report | ( | node_t | srcNode, |
| uint16_t | id_of_node, | ||
| uint8_t | keys_node_bitmask, | ||
| bool | nls_state | ||
| ) |
| void S2_notify_nls_state_report | ( | node_t | srcNode, |
| uint8_t | class_id, | ||
| bool | nls_capability, | ||
| bool | nls_state | ||
| ) |
| void S2_resynchronization_event | ( | node_t | remote_node, |
| sos_event_reason_t | reason, | ||
| uint8_t | seqno, | ||
| node_t | local_node | ||
| ) |
| void S2_save_nls_state | ( | void | ) |
| void S2_send_done_event | ( | struct S2 * | ctxt, |
| s2_tx_status_t | status | ||
| ) |
| uint8_t S2_send_frame | ( | struct S2 * | ctxt, |
| const s2_connection_t * | conn, | ||
| uint8_t * | buf, | ||
| uint16_t | len | ||
| ) |
| uint8_t S2_send_frame_multi | ( | struct S2 * | ctxt, |
| s2_connection_t * | conn, | ||
| uint8_t * | buf, | ||
| uint16_t | len | ||
| ) |
| uint8_t S2_send_frame_no_cb | ( | struct S2 * | ctxt, |
| const s2_connection_t * | conn, | ||
| uint8_t * | buf, | ||
| uint16_t | len | ||
| ) |
|
static |
|
static |
|
static |
|
static |
|
static |