Bluetooth: Mesh: Add return value for opcode callback
``` 3.7.3.4 Message error procedure When receiving a message that is not understood by an element, it shall ignore the message. Note: A message can be falsely identified as a valid message, passing the NetMIC and TransMIC authentication using a known network key and application key even though that message was sent using different keys. The decryption of that message using the wrong keys would result in a message that is not understood by the element. The probability of such a situation occurring is small but not insignificant. A message that is not understood includes messages that have one or more of the following conditions: • The application opcode is unknown by the receiving element. • The access message size for the application opcode is incorrect. • The application parameters contain values that are currently Prohibited. Note: An element that sends an acknowledged message that is not understood by a peer node will not receive any response message. ``` Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
This commit is contained in:
parent
cd881e0562
commit
b9422ea9f3
6 changed files with 541 additions and 418 deletions
|
@ -175,10 +175,12 @@ struct bt_mesh_model_op {
|
|||
* @param ctx Message context for the message.
|
||||
* @param buf Message buffer containing the message payload, not
|
||||
* including the opcode.
|
||||
*
|
||||
* @return Zero on success or (negative) error code otherwise.
|
||||
*/
|
||||
void (*const func)(struct bt_mesh_model *model,
|
||||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf);
|
||||
int (*const func)(struct bt_mesh_model *model,
|
||||
struct bt_mesh_msg_ctx *ctx,
|
||||
struct net_buf_simple *buf);
|
||||
};
|
||||
|
||||
#define BT_MESH_MODEL_OP_1(b0) (b0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue