mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ble_mesh: Expose header parsing outside net
This commit is contained in:
parent
865434e6de
commit
906fb9d6e3
@ -1308,6 +1308,17 @@ done:
|
||||
|
||||
#endif /* CONFIG_BLE_MESH_NODE */
|
||||
|
||||
void bt_mesh_net_header_parse(struct net_buf_simple *buf,
|
||||
struct bt_mesh_net_rx *rx)
|
||||
{
|
||||
rx->old_iv = (IVI(buf->data) != (bt_mesh.iv_index & 0x01));
|
||||
rx->ctl = CTL(buf->data);
|
||||
rx->ctx.recv_ttl = TTL(buf->data);
|
||||
rx->seq = SEQ(buf->data);
|
||||
rx->ctx.addr = SRC(buf->data);
|
||||
rx->ctx.recv_dst = DST(buf->data);
|
||||
}
|
||||
|
||||
int bt_mesh_net_decode(struct net_buf_simple *data, enum bt_mesh_net_if net_if,
|
||||
struct bt_mesh_net_rx *rx, struct net_buf_simple *buf)
|
||||
{
|
||||
|
@ -365,6 +365,8 @@ u32_t bt_mesh_next_seq(void);
|
||||
void bt_mesh_net_start(void);
|
||||
|
||||
void bt_mesh_net_init(void);
|
||||
void bt_mesh_net_header_parse(struct net_buf_simple *buf,
|
||||
struct bt_mesh_net_rx *rx);
|
||||
|
||||
/* Friendship Credential Management */
|
||||
struct friend_cred {
|
||||
|
Loading…
Reference in New Issue
Block a user