12#include "../include/mesh/mesh.h"
14enum bt_mesh_friend_pdu_type {
15 BT_MESH_FRIEND_PDU_SINGLE,
16 BT_MESH_FRIEND_PDU_PARTIAL,
17 BT_MESH_FRIEND_PDU_COMPLETE,
20bool bt_mesh_friend_match(uint16_t net_idx, uint16_t addr);
22struct bt_mesh_friend *bt_mesh_friend_find(uint16_t net_idx, uint16_t lpn_addr,
23 bool valid,
bool established);
25bool bt_mesh_friend_queue_has_space(uint16_t net_idx, uint16_t src, uint16_t dst,
26 uint64_t *seq_auth, uint8_t seg_count);
28void bt_mesh_friend_enqueue_rx(
struct bt_mesh_net_rx *rx,
29 enum bt_mesh_friend_pdu_type type,
30 uint64_t *seq_auth, uint8_t seg_count,
32bool bt_mesh_friend_enqueue_tx(
struct bt_mesh_net_tx *tx,
33 enum bt_mesh_friend_pdu_type type,
34 uint64_t *seq_auth, uint8_t seg_count,
37void bt_mesh_friend_clear_incomplete(
struct bt_mesh_subnet *sub, uint16_t src,
38 uint16_t dst, uint64_t *seq_auth);
40void bt_mesh_friend_sec_update(uint16_t net_idx);
42void bt_mesh_friends_clear(
void);
44int bt_mesh_friend_poll(
struct bt_mesh_net_rx *rx,
struct os_mbuf *buf);
45int bt_mesh_friend_req(
struct bt_mesh_net_rx *rx,
struct os_mbuf *buf);
46int bt_mesh_friend_clear(
struct bt_mesh_net_rx *rx,
struct os_mbuf *buf);
47int bt_mesh_friend_clear_cfm(
struct bt_mesh_net_rx *rx,
49int bt_mesh_friend_sub_add(
struct bt_mesh_net_rx *rx,
51int bt_mesh_friend_sub_rem(
struct bt_mesh_net_rx *rx,
54int bt_mesh_friend_init(
void);