suricata
|
Go to the source code of this file.
Data Structures | |
struct | DNP3LinkHeader_ |
DNP3 link header. More... | |
struct | DNP3ApplicationHeader_ |
DNP3 application header. More... | |
struct | DNP3InternalInd_ |
DNP3 internal indicators. More... | |
struct | DNP3Buffer_ |
A struct used for buffering incoming data prior to reassembly. More... | |
struct | DNP3ObjHeader_ |
DNP3 application object header. More... | |
struct | DNP3Point_ |
DNP3 object point. More... | |
struct | DNP3Object_ |
Struct to hold the list of decoded objects. More... | |
struct | DNP3Transaction_ |
DNP3 transaction. More... | |
struct | DNP3State_ |
Per flow DNP3 state. More... | |
Typedefs | |
typedef uint8_t | DNP3TransportHeader |
DNP3 transport header. More... | |
typedef struct DNP3Buffer_ | DNP3Buffer |
A struct used for buffering incoming data prior to reassembly. More... | |
typedef struct DNP3Point_ | DNP3Point |
DNP3 object point. More... | |
typedef struct DNP3Object_ | DNP3Object |
Struct to hold the list of decoded objects. More... | |
typedef struct DNP3Transaction_ | DNP3Transaction |
DNP3 transaction. More... | |
typedef struct DNP3State_ | DNP3State |
Per flow DNP3 state. More... | |
Functions | |
struct DNP3LinkHeader_ | __attribute__ ((__packed__)) DNP3LinkHeader |
DNP3 link header. More... | |
struct DNP3ObjHeader_ | __attribute__ ((packed)) DNP3ObjHeader |
DNP3 application object header. More... | |
typedef | TAILQ_HEAD (DNP3PointList_, DNP3Point_) DNP3PointList |
typedef | TAILQ_HEAD (DNP3ObjectList_, DNP3Object_) DNP3ObjectList |
TAILQ_HEAD (TxListHead, DNP3Transaction_) | |
void | RegisterDNP3Parsers (void) |
Register the DNP3 application protocol parser. More... | |
void | DNP3ParserRegisterTests (void) |
int | DNP3PrefixIsSize (uint8_t) |
Check if the prefix code is a size prefix. More... | |
Variables | |
uint8_t | start_byte0 |
uint8_t | start_byte1 |
uint8_t | len |
uint8_t | control |
uint16_t | dst |
uint16_t | src |
uint16_t | crc |
uint8_t | function_code |
uint8_t | iin1 |
uint8_t | iin2 |
uint8_t | group |
uint8_t | variation |
uint8_t | qualifier |
DNP3 application layer protocol header file
Definition in file app-layer-dnp3.h.
#define DNP3_APP_CON | ( | x | ) | (x & 0x20) |
Definition at line 89 of file app-layer-dnp3.h.
#define DNP3_APP_FC_ABORT_FILE 0x1e |
Definition at line 64 of file app-layer-dnp3.h.
#define DNP3_APP_FC_ACTIVATE_CONFIG 0x1f |
Definition at line 65 of file app-layer-dnp3.h.
#define DNP3_APP_FC_ASSIGN_CLASS 0x16 |
Definition at line 56 of file app-layer-dnp3.h.
#define DNP3_APP_FC_AUTH_REQ 0x20 |
Definition at line 66 of file app-layer-dnp3.h.
#define DNP3_APP_FC_AUTH_REQ_NR 0x21 |
Definition at line 67 of file app-layer-dnp3.h.
#define DNP3_APP_FC_AUTH_RESP 0x83 |
Definition at line 72 of file app-layer-dnp3.h.
#define DNP3_APP_FC_AUTHENTICATE_FILE 0x1d |
Definition at line 63 of file app-layer-dnp3.h.
#define DNP3_APP_FC_CLOSE_FILE 0x1a |
Definition at line 60 of file app-layer-dnp3.h.
#define DNP3_APP_FC_COLD_RESTART 0x0d |
Definition at line 47 of file app-layer-dnp3.h.
#define DNP3_APP_FC_CONFIRM 0x00 |
Definition at line 34 of file app-layer-dnp3.h.
#define DNP3_APP_FC_DELAY_MEASUREMENT 0x17 |
Definition at line 57 of file app-layer-dnp3.h.
#define DNP3_APP_FC_DELETE_FILE 0x1b |
Definition at line 61 of file app-layer-dnp3.h.
#define DNP3_APP_FC_DIR_OPERATE 0x05 |
Definition at line 39 of file app-layer-dnp3.h.
#define DNP3_APP_FC_DIR_OPERATE_NR 0x06 |
Definition at line 40 of file app-layer-dnp3.h.
#define DNP3_APP_FC_DISABLE_UNSOLICITED 0x15 |
Definition at line 55 of file app-layer-dnp3.h.
#define DNP3_APP_FC_ENABLE_UNSOLICITED 0x14 |
Definition at line 54 of file app-layer-dnp3.h.
#define DNP3_APP_FC_FREEZE 0x07 |
Definition at line 41 of file app-layer-dnp3.h.
#define DNP3_APP_FC_FREEZE_AT_TIME 0x0b |
Definition at line 45 of file app-layer-dnp3.h.
#define DNP3_APP_FC_FREEZE_AT_TIME_NR 0x0c |
Definition at line 46 of file app-layer-dnp3.h.
#define DNP3_APP_FC_FREEZE_CLEAR 0x09 |
Definition at line 43 of file app-layer-dnp3.h.
#define DNP3_APP_FC_FREEZE_CLEAR_NR 0x0a |
Definition at line 44 of file app-layer-dnp3.h.
#define DNP3_APP_FC_FREEZE_NR 0x08 |
Definition at line 42 of file app-layer-dnp3.h.
#define DNP3_APP_FC_GET_FILE_INFO 0x1c |
Definition at line 62 of file app-layer-dnp3.h.
#define DNP3_APP_FC_INITIALIZE_APPLICATION 0x10 |
Definition at line 50 of file app-layer-dnp3.h.
#define DNP3_APP_FC_INITIALIZE_DATA 0x0f |
Definition at line 49 of file app-layer-dnp3.h.
#define DNP3_APP_FC_OPEN_TIME 0x19 |
Definition at line 59 of file app-layer-dnp3.h.
#define DNP3_APP_FC_OPERATE 0x04 |
Definition at line 38 of file app-layer-dnp3.h.
#define DNP3_APP_FC_READ 0x01 |
Definition at line 35 of file app-layer-dnp3.h.
#define DNP3_APP_FC_RECORD_CURRENT_TIME 0x18 |
Definition at line 58 of file app-layer-dnp3.h.
#define DNP3_APP_FC_RESPONSE 0x81 |
Definition at line 70 of file app-layer-dnp3.h.
#define DNP3_APP_FC_SAVE_CONFIGURATION 0x13 |
Definition at line 53 of file app-layer-dnp3.h.
#define DNP3_APP_FC_SELECT 0x03 |
Definition at line 37 of file app-layer-dnp3.h.
#define DNP3_APP_FC_START_APPLICATION 0x11 |
Definition at line 51 of file app-layer-dnp3.h.
#define DNP3_APP_FC_STOP_APPLICATION 0x12 |
Definition at line 52 of file app-layer-dnp3.h.
#define DNP3_APP_FC_UNSOLICITED_RESP 0x82 |
Definition at line 71 of file app-layer-dnp3.h.
#define DNP3_APP_FC_WARM_RESTART 0x0e |
Definition at line 48 of file app-layer-dnp3.h.
#define DNP3_APP_FC_WRITE 0x02 |
Definition at line 36 of file app-layer-dnp3.h.
#define DNP3_APP_FIN | ( | x | ) | (x & 0x40) |
Definition at line 88 of file app-layer-dnp3.h.
#define DNP3_APP_FIR | ( | x | ) | (x & 0x80) |
Definition at line 87 of file app-layer-dnp3.h.
#define DNP3_APP_SEQ | ( | x | ) | (x & 0x0f) |
Definition at line 91 of file app-layer-dnp3.h.
#define DNP3_APP_UNS | ( | x | ) | (x & 0x10) |
Definition at line 90 of file app-layer-dnp3.h.
Definition at line 75 of file app-layer-dnp3.h.
Definition at line 79 of file app-layer-dnp3.h.
Definition at line 77 of file app-layer-dnp3.h.
Definition at line 78 of file app-layer-dnp3.h.
Definition at line 76 of file app-layer-dnp3.h.
#define DNP3_SWAP16 | ( | x | ) | SCByteSwap16(x) |
Definition at line 96 of file app-layer-dnp3.h.
#define DNP3_SWAP32 | ( | x | ) | SCByteSwap32(x) |
Definition at line 97 of file app-layer-dnp3.h.
#define DNP3_SWAP64 | ( | x | ) | SCByteSwap64(x) |
Definition at line 98 of file app-layer-dnp3.h.
#define DNP3_TH_FIN | ( | x | ) | (x & 0x80) |
Definition at line 82 of file app-layer-dnp3.h.
#define DNP3_TH_FIR | ( | x | ) | (x & 0x40) |
Definition at line 83 of file app-layer-dnp3.h.
#define DNP3_TH_SEQ | ( | x | ) | (x & 0x3f) |
Definition at line 84 of file app-layer-dnp3.h.
typedef struct DNP3Buffer_ DNP3Buffer |
A struct used for buffering incoming data prior to reassembly.
typedef struct DNP3Object_ DNP3Object |
Struct to hold the list of decoded objects.
typedef struct DNP3Point_ DNP3Point |
DNP3 object point.
Each DNP3 object can have 0 or more points representing the values of the object.
typedef struct DNP3State_ DNP3State |
Per flow DNP3 state.
typedef struct DNP3Transaction_ DNP3Transaction |
DNP3 transaction.
typedef uint8_t DNP3TransportHeader |
DNP3 transport header.
Definition at line 130 of file app-layer-dnp3.h.
anonymous enum |
Definition at line 105 of file app-layer-dnp3.h.
struct DNP3LinkHeader_ __attribute__ | ( | (__packed__) | ) |
DNP3 link header.
DNP3 internal indicators.
DNP3 application header.
Part of the application header for responses only.
Definition at line 54 of file decode-vlan.c.
struct DNP3ObjHeader_ __attribute__ | ( | (packed) | ) |
DNP3 application object header.
Definition at line 1 of file source-erf-file.c.
void DNP3ParserRegisterTests | ( | void | ) |
Definition at line 2613 of file app-layer-dnp3.c.
References UtRegisterTest().
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 1482 of file app-layer-dnp3.c.
void RegisterDNP3Parsers | ( | void | ) |
Register the DNP3 application protocol parser.
Definition at line 1532 of file app-layer-dnp3.c.
References ALPROTO_DNP3, AppLayerProtoDetectConfProtoDetectionEnabledDefault(), AppLayerProtoDetectPPRegister(), AppLayerProtoDetectRegisterProtocol(), DNP3_DEFAULT_PORT, RunmodeIsUnittests(), and SCEnter.
typedef TAILQ_HEAD | ( | DNP3ObjectList_ | , |
DNP3Object_ | |||
) |
typedef TAILQ_HEAD | ( | DNP3PointList_ | , |
DNP3Point_ | |||
) |
TAILQ_HEAD | ( | TxListHead | , |
DNP3Transaction_ | |||
) |
uint8_t control |
Control flags.
Definition at line 3 of file app-layer-dnp3.h.
uint16_t crc |
Link header CRC.
Definition at line 6 of file app-layer-dnp3.h.
uint16_t dst |
DNP3 destination address.
Definition at line 4 of file app-layer-dnp3.h.
Referenced by AppLayerExpectationCreate(), BytesToString(), BytesToStringBuffer(), DetectPortCopySingle(), IPOnlyMatchPacket(), IPv4Set(), IPv6Set(), Md5StrSet(), MemBufferWriteRaw(), MemBufferWriteString(), PrintInet(), Sha256StrSet(), SigGroupHeadCopySigs(), StringSet(), strlcat(), strlcpy(), TestHelperBuildFlow(), UTHBuildFlow(), UTHBuildPacketIPV6Real(), UTHBuildPacketIPV6SrcDst(), UTHBuildPacketReal(), and UTHBuildPacketSrcDst().
uint8_t function_code |
Application function code.
Definition at line 1 of file app-layer-dnp3.h.
uint8_t group |
Definition at line 0 of file app-layer-dnp3.h.
Referenced by DNP3DecodeObject(), DNP3FreeObjectPoint(), SCGetGroupID(), and SCGetUserID().
uint8_t iin1 |
Definition at line 0 of file app-layer-dnp3.h.
uint8_t iin2 |
Definition at line 1 of file app-layer-dnp3.h.
uint8_t len |
Length of PDU without CRCs.
Definition at line 2 of file app-layer-dnp3.h.
Referenced by AppLayerFrameSetLength(), AppLayerFrameSetLengthById(), ByteExtractUint16(), ByteExtractUint32(), ByteExtractUint64(), DecodeARP(), DecodeCHDLC(), DecodeERSPAN(), DecodeERSPANTypeI(), DecodeEthernet(), DecodeGRE(), DecodeICMPV4(), DecodeIPV4(), DecodeNSH(), DecodeNull(), DecodePPP(), DecodePPPOEDiscovery(), DecodePPPOESession(), DecodeRaw(), DecodeSll(), DecodeTEMPLATE(), DecodeVLAN(), DecodeVNTag(), DetectByteExtractDoMatch(), DetectBytejumpDoMatch(), DetectContentParse(), DetectPcrePayloadMatch(), DetectVarStoreMatch(), DetectVarStoreMatchKeyValue(), FileGetSwfDecompressedLen(), FrameJsonLogOneFrame(), HtpBodyAppendChunk(), HTPParseContentRange(), IPv4AddressStringIsValid(), IPv6AddressStringIsValid(), JsonGetNextLineFromBuffer(), LuaPushTableKeyValueArray(), PacketDefragPktSetup(), PacketTunnelPktSetup(), PcapTranslateIPToDevice(), SCClassConfClasstypeHashFunc(), SCCreateDirectoryTree(), SCHTPGenerateNormalizedUri(), SCPidfileCreate(), SCRConfReferenceHashFunc(), SigMatchList2DataArray(), SigParseRequiredContentSize(), SRepLoadFileFromFD(), StreamTcpCreateTestPacket(), StreamTcpUTAddPayload(), StreamTcpUTAddSegmentWithByte(), StreamTcpUTAddSegmentWithPayload(), StringAsBase64(), SysFsWriteValue(), UTHCheckDataAtPosition(), and UTHCheckGapAtPosition().
uint8_t qualifier |
Definition at line 2 of file app-layer-dnp3.h.
uint16_t src |
DNP3 source address.
Definition at line 5 of file app-layer-dnp3.h.
Referenced by AppLayerExpectationCreate(), DetectPortCopySingle(), FlowQueuePrivateAppendPrivate(), IPOnlyMatchPacket(), IPv4Set(), IPv6Set(), Md5StrSet(), PrintInet(), Sha256StrSet(), SigGroupHeadCopySigs(), StringSet(), strlcat(), strlcpy(), TestHelperBuildFlow(), UTHBuildFlow(), UTHBuildPacketIPV6Real(), UTHBuildPacketIPV6SrcDst(), UTHBuildPacketReal(), and UTHBuildPacketSrcDst().
uint8_t start_byte0 |
First check byte.
Definition at line 0 of file app-layer-dnp3.h.
uint8_t start_byte1 |
Second check byte.
Definition at line 1 of file app-layer-dnp3.h.
uint8_t variation |
Definition at line 1 of file app-layer-dnp3.h.
Referenced by DNP3DecodeObject(), and DNP3FreeObjectPoint().