dnp3

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: BSD-3-Clause, GPL-3.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FuncConfirm              = 0
	FuncRead                 = 1
	FuncWrite                = 2
	FuncSelect               = 3
	FuncOperate              = 4
	FuncDirectOperate        = 5
	FuncDirectOperateNoAck   = 6
	FuncImmediateFreeze      = 7
	FuncImmediateFreezeNoAck = 8
	FuncFreezeAndClear       = 9
	FuncFreezeAndClearNoAck  = 10
	FuncFreezeAtTime         = 11
	FuncFreezeAtTimeNoAck    = 12
	FuncColdRestart          = 13
	FuncWarmRestart          = 14
	FuncInitData             = 15
	FuncInitApplication      = 16
	FuncStartApplication     = 17
	FuncStopApplication      = 18
	FuncSaveConfiguration    = 19
	FuncEnableUnsolicited    = 20
	FuncDisableUnsolicited   = 21
	FuncAssignClass          = 22
	FuncDelayMeasurement     = 23
	FuncRecordCurrentTime    = 24
	FuncOpenFile             = 25
	FuncCloseFile            = 26
	FuncDeleteFile           = 27
	FuncGetFileInfo          = 28
	FuncAuthenticateFile     = 29
	FuncAbortFile            = 30
	FuncActivateConfig       = 31
	FuncAuthenticateReq      = 32
	FuncAuthenticateReqNoAck = 33
	FuncResponse             = 129
	FuncUnsolicitedResponse  = 130
	FuncAuthenticateResp     = 131
)

Application layer function codes, IEEE 1815 Table 4-1.

View Source
const LinkHeaderLen = linkHeaderLen

LinkHeaderLen is the size of the IEEE 1815 data link header.

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
	},

	Specificity: core.SpecificityValidated,

	CanDecode: func(client, server []byte) bool {
		return hasFrame(client) || hasFrame(server)
	},
	DeInit: func(sd *decoder.StreamDecoder) error {
		return dnp3Log.Sync()
	},
	Factory: &dnp3Reader{},
	Typ:     core.All,
}

Decoder for protocol analysis and writing audit records to disk.

Functions

func FrameLen

func FrameLen(length byte) int

FrameLen is the exported form of frameLen, for the IEC 62351 decoder's DNP3 Secure Authentication path. One implementation of this arithmetic is enough: the duplicate in that decoder was the version this one was fixed from.

func UserData

func UserData(body []byte, user int) (data []byte, ok bool)

UserData is the exported form of extractUserData.

func UserDataLen

func UserDataLen(length byte) int

UserDataLen is the exported form of userDataLen.

Types

This section is empty.

Jump to

Keyboard shortcuts

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