l2cap_signaling: add invalid PDU for testing

This commit is contained in:
Milanka Ringwald 2021-06-16 12:59:02 +02:00
parent d7c9cb2b80
commit 15f09267f5
2 changed files with 6 additions and 0 deletions

View File

@ -77,6 +77,9 @@ static uint16_t l2cap_create_signaling_internal(uint8_t * acl_buffer, hci_con_ha
"22222", // 0x15 le credit based connection respone: dest cid, mtu, mps, initial credits, result
"22", // 0x16 le flow control credit: source cid, credits
#endif
#ifdef UNIT_TEST
"M", // invalid format for unit testing
#endif
};
static const unsigned int num_l2cap_commands = sizeof(l2cap_signaling_commands_format) / sizeof(const char *);

View File

@ -70,6 +70,9 @@ typedef enum {
LE_CREDIT_BASED_CONNECTION_REQUEST,
LE_CREDIT_BASED_CONNECTION_RESPONSE,
LE_FLOW_CONTROL_CREDIT,
#ifdef UNIT_TEST
COMMAND_WITH_INVALID_FORMAT,
#endif
COMMAND_REJECT_LE = 0x1F // internal to BTstack
} L2CAP_SIGNALING_COMMANDS;