Skip to content

Commit bb1d039

Browse files
committed
Update Modbus stats from OT_INFO
1 parent 5d4ad3c commit bb1d039

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

include/Flow.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,7 @@ class Flow : public GenericHashEntry {
704704
u_int16_t payload_len,
705705
const struct pcap_pkthdr *h);
706706
#ifdef NTOPNG_PRO
707+
void updateOTStats(ParsedFlow *zflow);
707708
void processModbusPacket(bool is_query, const u_char *payload,
708709
u_int16_t payload_len,
709710
const struct pcap_pkthdr *h);

src/ParserInterface.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,12 @@ bool ParserInterface::processFlow(ParsedFlow *zflow) {
613613
flow->updateJA4C(zflow->getJA4cHash());
614614
}
615615

616+
#ifdef NTOPNG_PRO
617+
if (flow->isModbus()) {
618+
flow->updateOTStats(zflow);
619+
}
620+
#endif
621+
616622
if (flow->isSMTP()) {
617623
if (zflow->getSMTPMailFrom())
618624
flow->setSMTPMailFrom(zflow->getSMTPMailFrom());

0 commit comments

Comments
 (0)