Update s7comm.c
This commit is contained in:
@@ -23,13 +23,12 @@
|
|||||||
#include "ndpi_protocol_ids.h"
|
#include "ndpi_protocol_ids.h"
|
||||||
#include "ndpi_api.h"
|
#include "ndpi_api.h"
|
||||||
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_S7COMM
|
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_S7COMM
|
||||||
#define S7_COMMON_PORT 102
|
|
||||||
void ndpi_search_s7comm_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
void ndpi_search_s7comm_tcp(struct ndpi_detection_module_struct *ndpi_struct,
|
||||||
struct ndpi_flow_struct *flow) {
|
struct ndpi_flow_struct *flow) {
|
||||||
struct ndpi_packet_struct *packet = &flow->packet
|
struct ndpi_packet_struct *packet = &flow->packet;
|
||||||
;
|
|
||||||
NDPI_LOG_DBG(ndpi_struct, "search S7\n");
|
NDPI_LOG_DBG(ndpi_struct, "search S7\n");
|
||||||
u_int16_t s7comm_port = htons(S7_COMMON_PORT);
|
u_int16_t s7comm_port = htons(102);
|
||||||
if(packet->tcp) {
|
if(packet->tcp) {
|
||||||
|
|
||||||
if((packet->payload[0]==0x03)&&(packet->payload[1]==0x00)&&((packet->tcp->dest == s7comm_port) || (packet->tcp->source == s7comm_port))) {
|
if((packet->payload[0]==0x03)&&(packet->payload[1]==0x00)&&((packet->tcp->dest == s7comm_port) || (packet->tcp->source == s7comm_port))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user