xref: /nrf52832-nimble/packages/NimBLE-latest/nimble/host/mesh/src/proxy.h (revision 042d53a763ad75cb1465103098bb88c245d95138)
1 /*  Bluetooth Mesh */
2 
3 /*
4  * Copyright (c) 2017 Intel Corporation
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  */
8 
9 #ifndef __PROXY_H__
10 #define __PROXY_H__
11 
12 #define BT_MESH_PROXY_NET_PDU   0x00
13 #define BT_MESH_PROXY_BEACON    0x01
14 #define BT_MESH_PROXY_CONFIG    0x02
15 #define BT_MESH_PROXY_PROV      0x03
16 
17 #include "mesh/mesh.h"
18 
19 int bt_mesh_proxy_send(uint16_t conn_handle, u8_t type, struct os_mbuf *msg);
20 
21 int bt_mesh_proxy_prov_enable(void);
22 int bt_mesh_proxy_prov_disable(void);
23 
24 int bt_mesh_proxy_gatt_enable(void);
25 int bt_mesh_proxy_gatt_disable(void);
26 void bt_mesh_proxy_gatt_disconnect(void);
27 
28 void bt_mesh_proxy_beacon_send(struct bt_mesh_subnet *sub);
29 
30 struct os_mbuf *bt_mesh_proxy_get_buf(void);
31 
32 s32_t bt_mesh_proxy_adv_start(void);
33 void bt_mesh_proxy_adv_stop(void);
34 
35 void bt_mesh_proxy_identity_start(struct bt_mesh_subnet *sub);
36 void bt_mesh_proxy_identity_stop(struct bt_mesh_subnet *sub);
37 
38 bool bt_mesh_proxy_relay(struct os_mbuf *buf, u16_t dst);
39 void bt_mesh_proxy_addr_add(struct os_mbuf *buf, u16_t addr);
40 
41 int bt_mesh_proxy_init(void);
42 
43 int ble_mesh_proxy_gap_event(struct ble_gap_event *event, void *arg);
44 
45 #endif
46