dtx

package
v0.0.0-...-acb1afa Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MethodInvocationWithExpectedReply    = 0x3
	MethodinvocationWithoutExpectedReply = 0x2
	Ack                                  = 0x0
)
View Source
const (
	DtxMessageMagic uint32 = 0x795B3D1F
	DtxHeaderLength uint32 = 32
	DtxReservedBits uint32 = 0x0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuxiliaryHeader

type AuxiliaryHeader struct {
	BufferSize    uint32
	Unknown       uint32
	AuxiliarySize uint32
	Unknown2      uint32
}

This header can actually be completely ignored. We do not need to care about the buffer size And we already know the AuxiliarySize. The other two ints seem to be always 0 anyway. Could also be that Buffer and Aux Size are Uint64

func (AuxiliaryHeader) String

func (a AuxiliaryHeader) String() string

type DtxMessage

type DtxMessage struct {
	Fragments         uint16
	FragmentIndex     uint16
	MessageLength     int
	Identifier        int
	ConversationIndex int
	ChannelCode       int
	ExpectsReply      bool
	PayloadHeader     DtxPayloadHeader
	Payload           []interface{}
	AuxiliaryHeader   AuxiliaryHeader
	Auxiliary         DtxPrimitiveDictionary
	// contains filtered or unexported fields
}

func Decode

func Decode(messageBytes []byte) (DtxMessage, []byte, error)

func (DtxMessage) HasAuxiliary

func (d DtxMessage) HasAuxiliary() bool

func (DtxMessage) HasPayload

func (d DtxMessage) HasPayload() bool

func (DtxMessage) IsFirstFragment

func (d DtxMessage) IsFirstFragment() bool

This message is only 32 bytes long

func (DtxMessage) IsFragment

func (d DtxMessage) IsFragment() bool

func (DtxMessage) IsLastFragment

func (d DtxMessage) IsLastFragment() bool

func (DtxMessage) MessageIsFirstFragmentFor

func (d DtxMessage) MessageIsFirstFragmentFor(otherMessage DtxMessage) bool

Indicates whether the message you call this on, is the first part of a fragmented message, and if otherMessage is a subsequent fragment

func (DtxMessage) PayloadLength

func (d DtxMessage) PayloadLength() int

func (DtxMessage) String

func (d DtxMessage) String() string

func (DtxMessage) StringDebug

func (d DtxMessage) StringDebug() string

type DtxPayloadHeader

type DtxPayloadHeader struct {
	MessageType        int
	AuxiliaryLength    int
	TotalPayloadLength int
	Flags              int
}

16 Bytes

type DtxPrimitiveDictionary

type DtxPrimitiveDictionary struct {
	// contains filtered or unexported fields
}

That is by far the weirdest concept I have ever seen. Looking at disassembled code you can see this is a custom dictionary type only used for DTX. In practice however, the keys are always null and the values are used as a simple array containing the method arguments for the method this message is invoking. (The payload object usually contains method names or returnvalues)

func (DtxPrimitiveDictionary) String

func (d DtxPrimitiveDictionary) String() string

type DtxPrimitiveKeyValuePair

type DtxPrimitiveKeyValuePair struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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