protocol

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

View Source
const (
	NEGOTIATION_MAGIC_OLDSTYLE = uint64(0x4e42444d41474943)
	NEGOTIATION_MAGIC_OPTION   = uint64(0x49484156454F5054)
	NEGOTIATION_MAGIC_REPLY    = uint64(0x3e889045565a9)

	NEGOTIATION_HANDSHAKE_FLAG_FIXED_NEWSTYLE = uint16(1 << 0)

	NEGOTIATION_ID_OPTION_ABORT = uint32(2)
	NEGOTIATION_ID_OPTION_LIST  = uint32(3)
	NEGOTIATION_ID_OPTION_INFO  = uint32(6)
	NEGOTIATION_ID_OPTION_GO    = uint32(7)

	NEGOTIATION_TYPE_REPLY_ACK             = uint32(1)
	NEGOTIATION_TYPE_REPLY_SERVER          = uint32(2)
	NEGOTIATION_TYPE_REPLY_INFO            = uint32(3)
	NEGOTIATION_TYPE_REPLY_ERR_UNSUPPORTED = uint32(1 | uint32(1<<31))
	NEGOTIATION_TYPE_REPLY_ERR_UNKNOWN     = uint32(6 | uint32(1<<31))

	NEGOTIATION_TYPE_INFO_EXPORT      = uint16(0)
	NEGOTIATION_TYPE_INFO_NAME        = uint16(1)
	NEGOTIATION_TYPE_INFO_DESCRIPTION = uint16(2)
	NEGOTIATION_TYPE_INFO_BLOCKSIZE   = uint16(3)
)
View Source
const (
	TRANSMISSION_MAGIC_REQUEST = uint32(0x25609513)
	TRANSMISSION_MAGIC_REPLY   = uint32(0x67446698)

	TRANSMISSION_TYPE_REQUEST_READ  = uint16(0)
	TRANSMISSION_TYPE_REQUEST_WRITE = uint16(1)
	TRANSMISSION_TYPE_REQUEST_DISC  = uint16(2)

	TRANSMISSION_ERROR_EPERM  = uint32(1)
	TRANSMISSION_ERROR_EINVAL = uint32(22)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NegotiationNewstyleHeader

type NegotiationNewstyleHeader struct {
	OldstyleMagic  uint64
	OptionMagic    uint64
	HandshakeFlags uint16
}

type NegotiationOptionHeader

type NegotiationOptionHeader struct {
	OptionMagic uint64
	ID          uint32
	Length      uint32
}

type NegotiationReplyBlockSize

type NegotiationReplyBlockSize struct {
	Type               uint16
	MinimumBlockSize   uint32
	PreferredBlockSize uint32
	MaximumBlockSize   uint32
}

type NegotiationReplyDescriptionHeader

type NegotiationReplyDescriptionHeader NegotiationReplyNameHeader

type NegotiationReplyHeader

type NegotiationReplyHeader struct {
	ReplyMagic uint64
	ID         uint32
	Type       uint32
	Length     uint32
}

type NegotiationReplyInfo

type NegotiationReplyInfo struct {
	Type              uint16
	Size              uint64
	TransmissionFlags uint16
}

type NegotiationReplyNameHeader

type NegotiationReplyNameHeader struct {
	Type uint16
}

type TransmissionReplyHeader

type TransmissionReplyHeader struct {
	ReplyMagic uint32
	Error      uint32
	Handle     uint64
}

type TransmissionRequestHeader

type TransmissionRequestHeader struct {
	RequestMagic uint32
	CommandFlags uint16
	Type         uint16
	Handle       uint64
	Offset       uint64
	Length       uint32
}

Jump to

Keyboard shortcuts

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