|
suricata
|
#include "suricata-common.h"#include "suricata.h"#include "util-unittest.h"#include "util-spm-bs.h"#include "util-enum.h"#include "app-layer.h"#include "app-layer-protos.h"#include "app-layer-parser.h"#include "app-layer-detect-proto.h"#include "app-layer-events.h"#include "app-layer-dnp3.h"#include "app-layer-dnp3-objects.h"#include "flow-util.h"#include "stream-tcp.h"
Go to the source code of this file.
Macros | |
| #define | DNP3_DEFAULT_REQ_FLOOD_COUNT 500 |
| #define | DNP3_DEFAULT_PORT "20000" |
| #define | DNP3_START_BYTE0 0x05 |
| #define | DNP3_START_BYTE1 0x64 |
| #define | DNP3_MIN_LEN 5 |
| #define | DNP3_CRC_LEN 2 |
| #define | DNP3_BLOCK_SIZE 16 |
| #define | DNP3_MAX_TRAN_SEQNO 64 |
| #define | DNP3_LINK_HDR_LEN 5 |
| #define | DNP3_OBJ_PREFIX(x) ((x >> 4) & 0x7) |
| #define | DNP3_OBJ_RANGE(x) (x & 0xf) |
| #define | NEXT_TH_SEQNO(current) ((current + 1) % DNP3_MAX_TRAN_SEQNO) |
| #define | DNP3_BANNER "DNP3" |
Enumerations | |
| enum | { DNP3_LINK_FC_CONFIRMED_USER_DATA = 3 , DNP3_LINK_FC_UNCONFIRMED_USER_DATA } |
Functions | |
| int | DNP3PrefixIsSize (uint8_t prefix_code) |
| Check if the prefix code is a size prefix. | |
| void | RegisterDNP3Parsers (void) |
| Register the DNP3 application protocol parser. | |
| void | DNP3ParserRegisterTests (void) |
Variables | |
| SCEnumCharMap | dnp3_decoder_event_table [] |
DNP3 protocol implementation
Definition in file app-layer-dnp3.c.
| #define DNP3_BANNER "DNP3" |
Definition at line 248 of file app-layer-dnp3.c.
| #define DNP3_BLOCK_SIZE 16 |
Definition at line 57 of file app-layer-dnp3.c.
| #define DNP3_CRC_LEN 2 |
Definition at line 53 of file app-layer-dnp3.c.
| #define DNP3_DEFAULT_PORT "20000" |
Definition at line 43 of file app-layer-dnp3.c.
| #define DNP3_DEFAULT_REQ_FLOOD_COUNT 500 |
Definition at line 41 of file app-layer-dnp3.c.
| #define DNP3_LINK_HDR_LEN 5 |
Definition at line 67 of file app-layer-dnp3.c.
| #define DNP3_MAX_TRAN_SEQNO 64 |
Definition at line 60 of file app-layer-dnp3.c.
| #define DNP3_MIN_LEN 5 |
Definition at line 50 of file app-layer-dnp3.c.
| #define DNP3_OBJ_PREFIX | ( | x | ) | ((x >> 4) & 0x7) |
Definition at line 83 of file app-layer-dnp3.c.
| #define DNP3_OBJ_RANGE | ( | x | ) | (x & 0xf) |
Definition at line 86 of file app-layer-dnp3.c.
| #define DNP3_START_BYTE0 0x05 |
Definition at line 46 of file app-layer-dnp3.c.
| #define DNP3_START_BYTE1 0x64 |
Definition at line 47 of file app-layer-dnp3.c.
| #define NEXT_TH_SEQNO | ( | current | ) | ((current + 1) % DNP3_MAX_TRAN_SEQNO) |
Definition at line 100 of file app-layer-dnp3.c.
| anonymous enum |
| Enumerator | |
|---|---|
| DNP3_LINK_FC_CONFIRMED_USER_DATA | |
| DNP3_LINK_FC_UNCONFIRMED_USER_DATA | |
Definition at line 70 of file app-layer-dnp3.c.
| void DNP3ParserRegisterTests | ( | void | ) |
Definition at line 2611 of file app-layer-dnp3.c.
References UtRegisterTest().
Referenced by RegisterDNP3Parsers().


| int DNP3PrefixIsSize | ( | uint8_t | prefix_code | ) |
Check if the prefix code is a size prefix.
| 1 | if the prefix_code specifies a size prefix, 0 if not. |
Definition at line 1484 of file app-layer-dnp3.c.
| void RegisterDNP3Parsers | ( | void | ) |
Register the DNP3 application protocol parser.
Definition at line 1534 of file app-layer-dnp3.c.
References ALPROTO_DNP3, AppLayerParserRegisterGetEventInfo(), AppLayerParserRegisterGetEventInfoById(), AppLayerParserRegisterGetStateProgressFunc(), AppLayerParserRegisterGetTx(), AppLayerParserRegisterGetTxCnt(), AppLayerParserRegisterGetTxIterator(), AppLayerParserRegisterParser(), AppLayerParserRegisterProtocolUnittests(), AppLayerParserRegisterStateDataFunc(), AppLayerParserRegisterStateFuncs(), AppLayerParserRegisterStateProgressCompletionStatus(), AppLayerParserRegisterTxDataFunc(), AppLayerParserRegisterTxFreeFunc(), AppLayerProtoDetectRegisterProtocol(), DNP3_DEFAULT_PORT, DNP3ParserRegisterTests(), RunmodeIsUnittests(), SCAppLayerParserConfParserEnabled(), SCAppLayerProtoDetectConfProtoDetectionEnabledDefault(), SCAppLayerProtoDetectPPParseConfPorts(), SCAppLayerProtoDetectPPRegister(), SCEnter, SCLogConfig, and SCReturn.
Referenced by AppLayerParserRegisterProtocolParsers().


| SCEnumCharMap dnp3_decoder_event_table[] |
Definition at line 89 of file app-layer-dnp3.c.