fix indent code and int type to keep conformity of the rest of the code (u_intxx instead uintxx)
This commit is contained in:
@@ -44,7 +44,7 @@ void ndpi_search_smpp_tcp(struct ndpi_detection_module_struct* ndpi_struct,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// get PDU length
|
// get PDU length
|
||||||
uint32_t pdu_l = ntohl(get_u_int32_t(packet->payload, 0));
|
u_int32_t pdu_l = ntohl(get_u_int32_t(packet->payload, 0));
|
||||||
|
|
||||||
NDPI_LOG(NDPI_PROTOCOL_SMPP,
|
NDPI_LOG(NDPI_PROTOCOL_SMPP,
|
||||||
ndpi_struct,
|
ndpi_struct,
|
||||||
@@ -61,9 +61,9 @@ void ndpi_search_smpp_tcp(struct ndpi_detection_module_struct* ndpi_struct,
|
|||||||
// verify PDU length
|
// verify PDU length
|
||||||
if(pdu_l != packet->payload_packet_len) {
|
if(pdu_l != packet->payload_packet_len) {
|
||||||
// check if multiple PDUs included
|
// check if multiple PDUs included
|
||||||
uint32_t total_pdu_l = pdu_l;
|
u_int32_t total_pdu_l = pdu_l;
|
||||||
uint32_t tmp_pdu_l = 0;
|
u_int32_t tmp_pdu_l = 0;
|
||||||
uint16_t pdu_c = 1;
|
u_int16_t pdu_c = 1;
|
||||||
// loop PDUs (check if lengths are valid)
|
// loop PDUs (check if lengths are valid)
|
||||||
while(total_pdu_l < packet->payload_packet_len) {
|
while(total_pdu_l < packet->payload_packet_len) {
|
||||||
// get next PDU length
|
// get next PDU length
|
||||||
@@ -90,7 +90,7 @@ void ndpi_search_smpp_tcp(struct ndpi_detection_module_struct* ndpi_struct,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// *** check PDU type ***
|
// *** check PDU type ***
|
||||||
uint32_t pdu_type = ntohl(get_u_int32_t(packet->payload, 4));
|
u_int32_t pdu_type = ntohl(get_u_int32_t(packet->payload, 4));
|
||||||
// first byte of PDU type is either 0x00 of 0x80
|
// first byte of PDU type is either 0x00 of 0x80
|
||||||
if(!(packet->payload[4] == 0x00 || packet->payload[4] == 0x80)) {
|
if(!(packet->payload[4] == 0x00 || packet->payload[4] == 0x80)) {
|
||||||
NDPI_LOG(NDPI_PROTOCOL_SMPP, ndpi_struct, NDPI_LOG_DEBUG, "SMPP excluded\n");
|
NDPI_LOG(NDPI_PROTOCOL_SMPP, ndpi_struct, NDPI_LOG_DEBUG, "SMPP excluded\n");
|
||||||
@@ -98,7 +98,7 @@ void ndpi_search_smpp_tcp(struct ndpi_detection_module_struct* ndpi_struct,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// remove 0x80, get request type pdu
|
// remove 0x80, get request type pdu
|
||||||
uint32_t pdu_req = pdu_type & 0x00FFFFFF;
|
u_int32_t pdu_req = pdu_type & 0x00FFFFFF;
|
||||||
// list of known PDU types
|
// list of known PDU types
|
||||||
if((pdu_req >= 0x00000000 && pdu_req <= 0x00000009) ||
|
if((pdu_req >= 0x00000000 && pdu_req <= 0x00000009) ||
|
||||||
(pdu_req == 0x0000000B || pdu_req == 0x00000015 ||
|
(pdu_req == 0x0000000B || pdu_req == 0x00000015 ||
|
||||||
|
|||||||
Reference in New Issue
Block a user