NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
friend.h
1/* Bluetooth Mesh */
2
3/*
4 * Copyright (c) 2017 Intel Corporation
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
9#ifndef __FRIEND_H__
10#define __FRIEND_H__
11
12#include "../include/mesh/mesh.h"
13
14enum bt_mesh_friend_pdu_type {
15 BT_MESH_FRIEND_PDU_SINGLE,
16 BT_MESH_FRIEND_PDU_PARTIAL,
17 BT_MESH_FRIEND_PDU_COMPLETE,
18};
19
20bool bt_mesh_friend_match(uint16_t net_idx, uint16_t addr);
21
22struct bt_mesh_friend *bt_mesh_friend_find(uint16_t net_idx, uint16_t lpn_addr,
23 bool valid, bool established);
24
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);
27
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,
31 struct os_mbuf *sbuf);
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,
35 struct os_mbuf *sbuf);
36
37void bt_mesh_friend_clear_incomplete(struct bt_mesh_subnet *sub, uint16_t src,
38 uint16_t dst, uint64_t *seq_auth);
39
40void bt_mesh_friend_sec_update(uint16_t net_idx);
41
42void bt_mesh_friends_clear(void);
43
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,
48 struct os_mbuf *buf);
49int bt_mesh_friend_sub_add(struct bt_mesh_net_rx *rx,
50 struct os_mbuf *buf);
51int bt_mesh_friend_sub_rem(struct bt_mesh_net_rx *rx,
52 struct os_mbuf *buf);
53
54int bt_mesh_friend_init(void);
55
56#endif
Definition subnet.h:35
Definition os_mbuf.h:86