dnp3

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2026 License: BSD-3-Clause, GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FuncConfirm              = 0x00
	FuncRead                 = 0x01
	FuncWrite                = 0x02
	FuncSelect               = 0x03
	FuncOperate              = 0x04
	FuncDirectOperate        = 0x05
	FuncDirectOperateNoAck   = 0x06
	FuncImmediateFreeze      = 0x07
	FuncImmediateFreezeNoAck = 0x08
	FuncFreezeAndClear       = 0x09
	FuncFreezeAndClearNoAck  = 0x0A
	FuncFreezeAtTime         = 0x0B
	FuncFreezeAtTimeNoAck    = 0x0C
	FuncColdRestart          = 0x0D
	FuncWarmRestart          = 0x0E
	FuncInitData             = 0x0F
	FuncInitApplication      = 0x10
	FuncStartApplication     = 0x11
	FuncStopApplication      = 0x12
	FuncSaveConfiguration    = 0x13
	FuncEnableUnsolicited    = 0x14
	FuncDisableUnsolicited   = 0x15
	FuncAssignClass          = 0x16
	FuncDelayMeasurement     = 0x17
	FuncRecordCurrentTime    = 0x18
	FuncOpenFile             = 0x19
	FuncCloseFile            = 0x1A
	FuncDeleteFile           = 0x1B
	FuncGetFileInfo          = 0x1C
	FuncAuthenticate         = 0x1D
	FuncAbortFile            = 0x1E
	FuncResponse             = 0x81
	FuncUnsolicitedResponse  = 0x82
)

DNP3 Function Codes

Variables

View Source
var Decoder = &decoder.StreamDecoder{
	Type:        types.Type_NC_DNP3,
	Name:        serviceDNP3,
	Description: "Distributed Network Protocol 3 (DNP3) is used for ICS/SCADA communications",
	PostInit: func(d *decoder.StreamDecoder) error {
		var err error
		dnp3Log, _, err = logging.InitZapLogger(
			decoderconfig.Instance.Out,
			"dnp3",
			decoderconfig.Instance.Debug,
		)
		return err
	},
	CanDecode: func(client, server []byte) bool {

		return (len(client) >= 10 && client[0] == dnp3StartByte1 && client[1] == dnp3StartByte2) ||
			(len(server) >= 10 && server[0] == dnp3StartByte1 && server[1] == dnp3StartByte2)
	},
	DeInit: func(sd *decoder.StreamDecoder) error {
		return dnp3Log.Sync()
	},
	Factory: &dnp3Reader{},
	Typ:     core.TCP,
}

Decoder for protocol analysis and writing audit records to disk.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL