@@ -6,9 +6,8 @@
|
||||
*/
|
||||
|
||||
#include "ndpi_protocol_ids.h"
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DNP3
|
||||
#include "ndpi_api.h"
|
||||
|
||||
void ndpi_search_dnp3_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow) {
|
||||
|
||||
@@ -558,6 +558,14 @@ static void check_http_payload(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
|
||||
/* ************************************************************* */
|
||||
|
||||
#ifdef NDPI_ENABLE_DEBUG_MESSAGES
|
||||
static uint8_t non_ctrl(uint8_t c) {
|
||||
return c < 32 ? '.':c;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ************************************************************* */
|
||||
|
||||
/**
|
||||
* Functions to check whether the packet begins with a valid http request
|
||||
* @param ndpi_struct
|
||||
@@ -589,8 +597,10 @@ static u_int16_t http_request_url_offset(struct ndpi_detection_module_struct *nd
|
||||
int i;
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "====>>>> HTTP: %c%c%c%c [len: %u]\n",
|
||||
non_ctrl(packet->payload[0]), non_ctrl(packet->payload[1]),
|
||||
non_ctrl(packet->payload[2]), non_ctrl(packet->payload[3]),
|
||||
packet->payload_packet_len > 0 ? non_ctrl(packet->payload[0]) : '.',
|
||||
packet->payload_packet_len > 1 ? non_ctrl(packet->payload[1]) : '.',
|
||||
packet->payload_packet_len > 2 ? non_ctrl(packet->payload[2]) : '.',
|
||||
packet->payload_packet_len > 3 ? non_ctrl(packet->payload[3]) : '.',
|
||||
packet->payload_packet_len);
|
||||
|
||||
/* Check first char */
|
||||
|
||||
@@ -25,9 +25,8 @@
|
||||
*/
|
||||
|
||||
#include "ndpi_protocol_ids.h"
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_IEC60870
|
||||
#include "ndpi_api.h"
|
||||
|
||||
void ndpi_search_iec60870_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow) {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*
|
||||
*/
|
||||
#include "ndpi_protocol_ids.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MINING
|
||||
#include "ndpi_api.h"
|
||||
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -24,9 +24,8 @@
|
||||
|
||||
|
||||
#include "ndpi_protocol_ids.h"
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MODBUS
|
||||
#include "ndpi_api.h"
|
||||
|
||||
void ndpi_search_modbus_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow) {
|
||||
|
||||
@@ -79,7 +79,11 @@ void ndpi_search_mqtt (struct ndpi_detection_module_struct *ndpi_struct,
|
||||
}
|
||||
|
||||
NDPI_LOG_DBG2(ndpi_struct, "====>>>> Mqtt header: %4x%4x%4x%4x [len: %u]\n",
|
||||
packet->payload[0], packet->payload[1], packet->payload[2], packet->payload[3], packet->payload_packet_len);
|
||||
packet->payload_packet_len > 0 ? packet->payload[0] : '.',
|
||||
packet->payload_packet_len > 1 ? packet->payload[1] : '.',
|
||||
packet->payload_packet_len > 2 ? packet->payload[2] : '.',
|
||||
packet->payload_packet_len > 3 ? packet->payload[3] : '.',
|
||||
packet->payload_packet_len);
|
||||
if (packet->payload_packet_len < 2) {
|
||||
NDPI_LOG_DBG(ndpi_struct, "Excluding Mqtt .. mandatory header not found!\n");
|
||||
NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_MQTT);
|
||||
|
||||
@@ -20,9 +20,8 @@
|
||||
*/
|
||||
|
||||
#include "ndpi_protocol_ids.h"
|
||||
#include "ndpi_api.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_NATS
|
||||
#include "ndpi_api.h"
|
||||
|
||||
static const char* commands[] =
|
||||
{
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
*
|
||||
*/
|
||||
#include "ndpi_protocol_ids.h"
|
||||
#include "ndpi_api.h"
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_S7COMM
|
||||
#include "ndpi_api.h"
|
||||
|
||||
void ndpi_search_s7comm_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||
struct ndpi_flow_struct *flow) {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
*
|
||||
*/
|
||||
#include "ndpi_protocol_ids.h"
|
||||
|
||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_SMBV23
|
||||
#include "ndpi_api.h"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user