1 /*
2  * Copyright (c) 2021 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 struct op_agg_ctx {
8 	/** Context is initialized. */
9 	bool initialized;
10 	/** NetKey Index of the subnet to send the message on. */
11 	uint16_t net_idx;
12 	/** AppKey Index to encrypt the message with. */
13 	uint16_t app_idx;
14 	/** Remote element address. */
15 	uint16_t addr;
16 	/** Aggregated message buffer. */
17 	struct net_buf_simple *sdu;
18 };
19 
20 int bt_mesh_op_agg_encode_msg(struct net_buf_simple *msg, struct net_buf_simple *buf);
21 int bt_mesh_op_agg_decode_msg(struct net_buf_simple *msg, struct net_buf_simple *buf);
22 int bt_mesh_op_agg_cli_send(const struct bt_mesh_model *model, struct net_buf_simple *msg);
23 int bt_mesh_op_agg_cli_accept(struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf);
24 int bt_mesh_op_agg_srv_send(const struct bt_mesh_model *model, struct net_buf_simple *msg);
25 int bt_mesh_op_agg_srv_accept(struct bt_mesh_msg_ctx *ctx, struct net_buf_simple *buf);
26 bool bt_mesh_op_agg_is_op_agg_msg(struct net_buf_simple *buf);
27