/* Bluetooth Mesh *//* * SPDX-FileCopyrightText: 2017 Intel Corporation * SPDX-FileContributor: 2018-2021 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */#ifndef_PROXY_SERVER_H_#define_PROXY_SERVER_H_#include"net.h"#include"mesh/adapter.h"#ifdef__cplusplusextern"C"{#endif#ifCONFIG_BLE_MESH_PROXY/** * Device Name Characteristic: * 1. For iOS, when it tries to get the value of Device Name Characteristic, the PDU * "Read By Type Request" will be used, and the valid length of corresponding * response is 19 (23 - 1 - 1 - 2). * 2. For Android, when it tries to get the value of Device Name Characteristic, the * PDU "Read Request" will be used, and the valid length of corresponding response * is 22 (23 - 1). *//* ... */#defineDEVICE_NAME_SIZEMIN((BLE_MESH_GATT_DEF_MTU_SIZE-4),(BLE_MESH_GAP_ADV_MAX_LEN-2))/* ... */#else/* For Scan Response Data, the maximum length is 29 (31 - 1 - 1) currently. */#defineDEVICE_NAME_SIZE(BLE_MESH_GAP_ADV_MAX_LEN-2)/* ... */#endifstructbt_mesh_proxy_client{structbt_mesh_conn*conn;enum__attribute__((packed)){SRV_NONE,SRV_WHITELIST,SRV_BLACKLIST,SRV_PROV,}{...}filter_type;uint8_tmsg_type;#ifCONFIG_BLE_MESH_GATT_PROXY_SERVERstruct{uint16_taddr;boolproxy_client;/* Indicate if the address is the element address of Proxy Client. */}{ ... }filter[CONFIG_BLE_MESH_PROXY_FILTER_SIZE];structk_delayed_worksend_beacons;uint8_tproxy_client_type;uint8_tproxy_msg_recv:1;/* Indicate if proxy server has received a message from proxy client */#ifCONFIG_BLE_MESH_PROXY_PRIVACYuint8_tproxy_privacy;#endif/* ... */#endif/* CONFIG_BLE_MESH_GATT_PROXY_SERVER */structk_delayed_worksar_timer;structnet_buf_simplebuf;}{ ... };typedefvoid(*proxy_server_connect_cb_t)(uint8_tconn_handle);typedefvoid(*proxy_server_disconnect_cb_t)(uint8_tconn_handle,uint8_treason);intbt_mesh_set_device_name(constchar*name);constchar*bt_mesh_get_device_name(void);intbt_mesh_proxy_server_segment_send(structbt_mesh_conn*conn,uint8_ttype,structnet_buf_simple*msg);intbt_mesh_proxy_server_send(structbt_mesh_conn*conn,uint8_ttype,structnet_buf_simple*msg);intbt_mesh_proxy_server_prov_enable(void);intbt_mesh_proxy_server_prov_disable(booldisconnect);voidbt_mesh_proxy_server_set_conn_cb(proxy_server_connect_cb_tcb);voidbt_mesh_proxy_server_set_disconn_cb(proxy_server_disconnect_cb_tcb);intbt_mesh_proxy_server_gatt_enable(void);intbt_mesh_proxy_server_gatt_disable(void);voidbt_mesh_proxy_server_gatt_disconnect(void);voidbt_mesh_proxy_server_beacon_send(structbt_mesh_subnet*sub);structnet_buf_simple*bt_mesh_proxy_server_get_buf(void);int32_tbt_mesh_proxy_server_adv_start(void);voidbt_mesh_proxy_server_adv_stop(void);voidbt_mesh_proxy_server_update_net_id_rand(void);voidbt_mesh_proxy_server_update_net_id_rand_stop(void);#ifCONFIG_BLE_MESH_PRB_SRVvoidbt_mesh_proxy_server_private_identity_start(structbt_mesh_subnet*sub);voidbt_mesh_proxy_server_private_identity_stop(structbt_mesh_subnet*sub);voidbt_mesh_disable_private_gatt_proxy(void);boolbt_mesh_proxy_server_is_node_id_enable(void);intbt_mesh_proxy_private_identity_disable(void);intbt_mesh_proxy_private_identity_enable(void);/* ... */#endif/* CONFIG_BLE_MESH_PRB_SRV */voidbt_mesh_proxy_server_identity_start(structbt_mesh_subnet*sub);voidbt_mesh_proxy_server_identity_stop(structbt_mesh_subnet*sub);boolbt_mesh_proxy_server_relay(structnet_buf_simple*buf,uint16_tdst);voidbt_mesh_proxy_server_addr_add(structnet_buf_simple*buf,uint16_taddr);intbt_mesh_proxy_server_init(void);intbt_mesh_proxy_server_deinit(void);boolbt_mesh_proxy_server_find_client_by_addr(uint16_taddr);uint8_tbt_mesh_proxy_server_get_all_client_type(void);#ifdef__cplusplus}{...}#endif/* ... */#endif/* _PROXY_SERVER_H_ */
Details
Show: from
Types: Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.