mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-15 22:20:59 +00:00
mesh: delete dead code
This commit is contained in:
parent
3609ec5369
commit
17164a95e1
@ -302,12 +302,7 @@ static void mesh_upper_transport_validate_unsegmented_message_ccm(void * arg){
|
||||
mesh_network_pdu_t * network_pdu = (mesh_network_pdu_t *) arg;
|
||||
|
||||
uint8_t * lower_transport_pdu = mesh_network_pdu_data(network_pdu);
|
||||
int seg = lower_transport_pdu[0] >> 7;
|
||||
uint8_t trans_mic_len = 4;
|
||||
if (seg) {
|
||||
uint8_t szmic = lower_transport_pdu[1] >> 7;
|
||||
trans_mic_len = szmic ? 8 : 4;
|
||||
}
|
||||
|
||||
// store TransMIC
|
||||
uint8_t trans_mic[8];
|
||||
@ -394,7 +389,6 @@ static void mesh_upper_transport_validate_segmented_message_ccm(void * arg){
|
||||
static void mesh_upper_transport_validate_unsegmented_message(mesh_network_pdu_t * network_pdu){
|
||||
uint8_t * lower_transport_pdu = &network_pdu_in_validation->data[9];
|
||||
uint8_t lower_transport_pdu_len = network_pdu_in_validation->len - 9;
|
||||
int seg = lower_transport_pdu[0] >> 7;
|
||||
|
||||
const mesh_application_key_t * message_key;
|
||||
|
||||
@ -419,24 +413,12 @@ static void mesh_upper_transport_validate_unsegmented_message(mesh_network_pdu_t
|
||||
network_pdu->appkey_index = message_key->index;
|
||||
|
||||
// unsegmented message have TransMIC of 32 bit
|
||||
// segmenteed messages have SZMIC flag tthat indicates 64 bit TransMIC
|
||||
uint8_t trans_mic_len = 4;
|
||||
if (seg) {
|
||||
uint8_t szmic = lower_transport_pdu[1] >> 7;
|
||||
trans_mic_len = szmic ? 8 : 4;
|
||||
}
|
||||
|
||||
printf("%s Access message with TransMIC len %u\n", seg ? "Segmented" : "Unsegmented", trans_mic_len);
|
||||
printf("Unsegmented Access message with TransMIC len 4");
|
||||
|
||||
uint8_t * upper_transport_pdu_data = &network_pdu_in_validation->data[10];
|
||||
uint8_t upper_transport_pdu_len = lower_transport_pdu_len - 1 - trans_mic_len;
|
||||
|
||||
// segemented messages have a 3 byte header
|
||||
if (seg){
|
||||
upper_transport_pdu_data += 3;
|
||||
upper_transport_pdu_len -= 3;
|
||||
}
|
||||
|
||||
mesh_print_hex("EncAccessPayload", upper_transport_pdu_data, upper_transport_pdu_len);
|
||||
|
||||
// decrypt ccm
|
||||
|
Loading…
x
Reference in New Issue
Block a user