smb2

package
v0.0.0-...-bc8e97d Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAGIC  = "\xfeSMB"
	MAGIC2 = "\xfdSMB"
)
View Source
const (
	SMB2_NEGOTIATE = iota
	SMB2_SESSION_SETUP
	SMB2_LOGOFF
	SMB2_TREE_CONNECT
	SMB2_TREE_DISCONNECT
	SMB2_CREATE
	SMB2_CLOSE
	SMB2_FLUSH
	SMB2_READ
	SMB2_WRITE
	SMB2_LOCK
	SMB2_IOCTL
	SMB2_CANCEL
	SMB2_ECHO
	SMB2_QUERY_DIRECTORY
	SMB2_CHANGE_NOTIFY
	SMB2_QUERY_INFO
	SMB2_SET_INFO
	SMB2_OPLOCK_BREAK
)

Command

View Source
const (
	SMB2_FLAGS_SERVER_TO_REDIR = 1 << iota
	SMB2_FLAGS_ASYNC_COMMAND
	SMB2_FLAGS_RELATED_OPERATIONS
	SMB2_FLAGS_SIGNED

	SMB2_FLAGS_PRIORITY_MASK     = 0x70
	SMB2_FLAGS_DFS_OPERATIONS    = 0x10000000
	SMB2_FLAGS_REPLAY_OPERATIONS = 0x20000000
)

Flags

View Source
const (
	SMB2_NEGOTIATE_SIGNING_ENABLED = 1 << iota
	SMB2_NEGOTIATE_SIGNING_REQUIRED
)

SecurityMode

View Source
const (
	SMB2_GLOBAL_CAP_DFS = 1 << iota
	SMB2_GLOBAL_CAP_LEASING
	SMB2_GLOBAL_CAP_LARGE_MTU
	SMB2_GLOBAL_CAP_MULTI_CHANNEL
	SMB2_GLOBAL_CAP_PERSISTENT_HANDLES
	SMB2_GLOBAL_CAP_DIRECTORY_LEASING
	SMB2_GLOBAL_CAP_ENCRYPTION
)

Capabilities

View Source
const (
	UnknownSMB = 0x0
	SMB2       = 0x2FF
	SMB202     = 0x202
	SMB210     = 0x210
	SMB300     = 0x300
	SMB302     = 0x302
	SMB311     = 0x311
)

Dialects

View Source
const (
	SMB2_PREAUTH_INTEGRITY_CAPABILITIES = 1 << iota
	SMB2_ENCRYPTION_CAPABILITIES
)

ContextType

View Source
const (
	AES128CCM = 1 << iota
	AES128GCM
)

Ciphers

View Source
const (
	SMB2_SESSION_FLAG_IS_GUEST = 1 << iota
	SMB2_SESSION_FLAG_IS_NULL
	SMB2_SESSION_FLAG_ENCRYPT_DATA
)

SessionFlags

View Source
const (
	SMB2_SHARE_TYPE_DISK = 1 + iota
	SMB2_SHARE_TYPE_PIPE
	SMB2_SHARE_TYPE_PRINT
)

ShareType

View Source
const (
	SMB2_SHAREFLAG_MANUAL_CACHING              = 0x0
	SMB2_SHAREFLAG_AUTO_CACHING                = 0x10
	SMB2_SHAREFLAG_VDO_CACHING                 = 0x20
	SMB2_SHAREFLAG_NO_CACHING                  = 0x30
	SMB2_SHAREFLAG_DFS                         = 0x1
	SMB2_SHAREFLAG_DFS_ROOT                    = 0x2
	SMB2_SHAREFLAG_RESTRICT_EXCLUSIVE_OPENS    = 0x100
	SMB2_SHAREFLAG_FORCE_SHARED_DELETE         = 0x200
	SMB2_SHAREFLAG_ALLOW_NAMESPACE_CACHING     = 0x400
	SMB2_SHAREFLAG_ACCESS_BASED_DIRECTORY_ENUM = 0x800
	SMB2_SHAREFLAG_FORCE_LEVELII_OPLOCK        = 0x1000
	SMB2_SHAREFLAG_ENABLE_HASH_V1              = 0x2000
	SMB2_SHAREFLAG_ENABLE_HASH_V2              = 0x4000
	SMB2_SHAREFLAG_ENCRYPT_DATA                = 0x8000
)

ShareFlags

View Source
const (
	SMB2_SHARE_CAP_DFS = 0x8 << iota
	SMB2_SHARE_CAP_CONTINUOUS_AVAILABILITY
	SMB2_SHARE_CAP_SCALEOUT
	SMB2_SHARE_CAP_CLUSTER
	SMB2_SHARE_CAP_ASYMMETRIC
)

Capabilities

View Source
const (
	SMB2_OPLOCK_LEVEL_NONE      = 0x0
	SMB2_OPLOCK_LEVEL_II        = 0x1
	SMB2_OPLOCK_LEVEL_EXCLUSIVE = 0x8
	SMB2_OPLOCK_LEVEL_BATCH     = 0x9
	SMB2_OPLOCK_LEVEL_LEASE     = 0xff
)

RequestedOplockLevel

View Source
const (
	Anonymous = iota
	Identification
	Impersonation
	Delegate
)

ImpersonationLevel

View Source
const (
	// for file, pipe, printer
	FILE_READ_DATA = 1 << iota
	FILE_WRITE_DATA
	FILE_APPEND_DATA
	FILE_READ_EA
	FILE_WRITE_EA
	FILE_EXECUTE
	FILE_DELETE_CHILD
	FILE_READ_ATTRIBUTES
	FILE_WRITE_ATTRIBUTES

	// for directory
	FILE_LIST_DIRECTORY = 1 << iota
	FILE_ADD_FILE
	FILE_ADD_SUBDIRECTORY

	FILE_TRAVERSE

	// common
	DELETE                 = 0x10000
	READ_CONTROL           = 0x20000
	WRITE_DAC              = 0x40000
	WRITE_OWNER            = 0x80000
	SYNCHRONIZE            = 0x100000
	ACCESS_SYSTEM_SECURITY = 0x1000000
	MAXIMUM_ALLOWED        = 0x2000000
	GENERIC_ALL            = 0x10000000
	GENERIC_EXECUTE        = 0x20000000
	GENERIC_WRITE          = 0x40000000
	GENERIC_READ           = 0x80000000
)

DesiredAccess

View Source
const (
	FILE_SHARE_READ = 1 << iota
	FILE_SHARE_WRITE
	FILE_SHARE_DELETE
)

ShareAccess

View Source
const (
	FILE_SUPERSEDE = iota
	FILE_OPEN
	FILE_CREATE
	FILE_OPEN_IF
	FILE_OVERWRITE
	FILE_OVERWRITE_IF
)

CreateDisposition

View Source
const (
	FILE_DIRECTORY_FILE = 1 << iota
	FILE_WRITE_THROUGH
	FILE_SEQUENTIAL_ONLY
	FILE_NO_INTERMEDIATE_BUFFERING
	FILE_SYNCHRONOUS_IO_ALERT
	FILE_SYNCHRONOUS_IO_NONALERT
	FILE_NON_DIRECTORY_FILE

	FILE_COMPLETE_IF_OPLOCKED
	FILE_NO_EA_KNOWLEDGE
	FILE_OPEN_REMOTE_INSTANCE
	FILE_RANDOM_ACCESS
	FILE_DELETE_ON_CLOSE
	FILE_OPEN_BY_FILE_ID
	FILE_OPEN_FOR_BACKUP_INTENT
	FILE_NO_COMPRESSION
	FILE_OPEN_REQUIRING_OPLOCK
	FILE_DISALLOW_EXCLUSIVE

	FILE_RESERVE_OPFILTER
	FILE_OPEN_REPARSE_POINT
	FILE_OPEN_NO_RECALL
	FILE_OPEN_FOR_FREE_SPACE_QUERY
)

CreateOptions

View Source
const (
	SMB2_CHANNEL_NONE = iota
	SMB2_CHANNEL_RDMA_V1
	SMB2_CHANNEL_RDMA_V1_INVALIDATE
)

Channel

View Source
const (
	SMB2_WRITEFLAG_WRITE_THROUGH = 1 << iota
	SMB2_WRITEFLAG_WRITE_UNBUFFERED
)

Flags

View Source
const (
	RESTART_SCANS = 1 << iota
	RETURN_SINGLE_ENTRY
	INDEX_SPECIFIED

	REOPEN
)

Flags

View Source
const (
	INFO_FILE = 1 + iota
	INFO_FILESYSTEM
	INFO_SECURITY
	INFO_QUOTA
)

InfoType

View Source
const (
	OWNER_SECURITY_INFORMATION = 1 << iota
	GROUP_SECUIRTY_INFORMATION
	DACL_SECUIRTY_INFORMATION
	SACL_SECUIRTY_INFORMATION
	LABEL_SECUIRTY_INFORMATION
	ATTRIBUTE_SECUIRTY_INFORMATION
	SCOPE_SECUIRTY_INFORMATION

	BACKUP_SECUIRTY_INFORMATION = 0x10000
)

AdditionalInformation

View Source
const (
	SL_RESTART_SCAN = 1 << iota
	SL_RETURN_SINGLE_ENTRY
	SL_INDEX_SPECIFIED
)

Flags

View Source
const (
	SMB2_0_INFO_FILE = 1 + iota
	SMB2_0_INFO_FILESYSTEM
	SMB2_0_INFO_SECURITY
	SMB2_0_INFO_QUOTA
)

InfoType

View Source
const (
	IO_REPARSE_TAG_RESERVED_ZERO   = 0x00000000
	IO_REPARSE_TAG_RESERVED_ONE    = 0x00000001
	IO_REPARSE_TAG_MOUNT_POINT     = 0xA0000003
	IO_REPARSE_TAG_HSM             = 0xC0000004
	IO_REPARSE_TAG_HSM2            = 0x80000006
	IO_REPARSE_TAG_DRIVER_EXTENDER = 0x80000005
	IO_REPARSE_TAG_SIS             = 0x80000007
	IO_REPARSE_TAG_DFS             = 0x8000000A
	IO_REPARSE_TAG_DFSR            = 0x80000012
	IO_REPARSE_TAG_FILTER_MANAGER  = 0x8000000B
	IO_REPARSE_TAG_SYMLINK         = 0xA000000C
)
View Source
const (
	FSCTL_DFS_GET_REFERRALS            = 0x00060194
	FSCTL_PIPE_PEEK                    = 0x0011400C
	FSCTL_PIPE_WAIT                    = 0x00110018
	FSCTL_PIPE_TRANSCEIVE              = 0x0011C017
	FSCTL_SRV_COPYCHUNK                = 0x001440F2
	FSCTL_SRV_ENUMERATE_SNAPSHOTS      = 0x00144064
	FSCTL_SRV_REQUEST_RESUME_KEY       = 0x00140078
	FSCTL_SRV_READ_HASH                = 0x001441bb
	FSCTL_SRV_COPYCHUNK_WRITE          = 0x001480F2
	FSCTL_LMR_REQUEST_RESILIENCY       = 0x001401D4
	FSCTL_QUERY_NETWORK_INTERFACE_INFO = 0x001401FC
	FSCTL_GET_REPARSE_POINT            = 0x000900A8
	FSCTL_SET_REPARSE_POINT            = 0x000900A4
	FSCTL_DFS_GET_REFERRALS_EX         = 0x000601B0
	FSCTL_FILE_LEVEL_TRIM              = 0x00098208
	FSCTL_VALIDATE_NEGOTIATE_INFO      = 0x00140204
)
View Source
const (
	FILE_ATTRIBUTE_ARCHIVE             = 0x20
	FILE_ATTRIBUTE_COMPRESSED          = 0x800
	FILE_ATTRIBUTE_DIRECTORY           = 0x10
	FILE_ATTRIBUTE_ENCRYPTED           = 0x4000
	FILE_ATTRIBUTE_HIDDEN              = 0x2
	FILE_ATTRIBUTE_NORMAL              = 0x80
	FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x2000
	FILE_ATTRIBUTE_OFFLINE             = 0x1000
	FILE_ATTRIBUTE_READONLY            = 0x1
	FILE_ATTRIBUTE_REPARSE_POINT       = 0x400
	FILE_ATTRIBUTE_SPARSE_FILE         = 0x200
	FILE_ATTRIBUTE_SYSTEM              = 0x4
	FILE_ATTRIBUTE_TEMPORARY           = 0x100
	FILE_ATTRIBUTE_INTEGRITY_STREAM    = 0x8000
	FILE_ATTRIBUTE_NO_SCRUB_DATA       = 0x20000
)
View Source
const (
	FileDirectoryInformation     = 1 + iota // 1
	FileFullDirectoryInformation            // 2
	FileBothDirectoryInformation            // 3
	FileBasicInformation                    // 4
	FileStandardInformation                 // 5
	FileInternalInformation                 // 6
	FileEaInformation                       // 7
	FileAccessInformation                   // 8
	FileNameInformation                     // 9
	FileRenameInformation                   // 10
	FileLinkInformation                     // 11
	FileNamesInformation                    // 12
	FileDispositionInformation              // 13
	FilePositionInformation                 // 14
	FileFullEaInformation                   // 15
	FileModeInformation                     // 16
	FileAlignmentInformation                // 17
	FileAllInformation                      // 18
	FileAllocationInformation               // 19
	FileEndOfFileInformation                // 20
	FileAlternateNameInformation            // 21
	FileStreamInformation                   // 22
	FilePipeInformation                     // 23
	FilePipeLocalInformation                // 24
	FilePipeRemoteInformation               // 25
	FileMailslotQueryInformation            // 26
	FileMailslotSetInformation              // 27
	FileCompressionInformation              // 28
	FileObjectIdInformation                 // 29

	FileMoveClusterInformation     // 31
	FileQuotaInformation           // 32
	FileReparsePointInformation    // 33
	FileNetworkOpenInformation     // 34
	FileAttributeTagInformation    // 35
	FileTrackingInformation        // 36
	FileIdBothDirectoryInformation // 37
	FileIdFullDirectoryInformation // 38
	FileValidDataLengthInformation // 39
	FileShortNameInformation       // 40

	FileSfioReserveInformation // 44
	FileSfioVolumeInformation  // 45
	FileHardLinkInformation    // 46

	FileNormalizedNameInformation // 48

	FildIdGlobalTxDirectoryInformation // 50

	FileStardardLinkInformation // 54
)
View Source
const (
	FileFsVolumeInformation = 1 + iota
	FileFsLabelInformation
	FileFsSizeInformation
	FileFsDeviceInformation
	FileFsAttributeInformation
	FileFsControlInformation
	FileFsFullSizeInformation
	FileFsObjectIdInformation
	FileFsDriverPathInformation
	FileFsVolumeFlagsInformation
	FileFsSectorSizeInformation
)
View Source
const (
	Encrypted = 1 << iota
)

Flags

View Source
const (
	SHA512 = 0x1
)

HashAlgorithms

View Source
const (
	SMB2_0_IOCTL_IS_FSCTL = 0x1
)

Flags

View Source
const (
	SMB2_CLOSE_FLAG_POSTQUERY_ATTRIB = 1 << iota
)

Flags

View Source
const (
	SMB2_CREATE_FLAG_REPARSEPOINT = 1 << iota
)

Flags

View Source
const (
	SMB2_ENCRYPTION_AES128_CCM = 1 << iota
)

EncryptionAlgorithm

View Source
const (
	SMB2_ERROR_ID_DEFAULT = 0x0
)

ErrorId

View Source
const (
	SMB2_READFLAG_READ_UNBUFFERED = 1 << iota
)

Flags

View Source
const (
	SMB2_SESSION_FLAG_BINDING = 0x1
)

Flags

View Source
const (
	SMB2_TREE_CONNECT_FLAG_CLUSTER_RECONNECT = 0x1
)

Flags

View Source
const (
	SYMLINK_FLAG_RELATIVE = 0x1
)

Flags

Variables

This section is empty.

Functions

func Roundup

func Roundup(x, align int) int

func UTF16FromString

func UTF16FromString(s string) []uint16

func UTF16ToString

func UTF16ToString(s []uint16) string

Types

type CancelRequest

type CancelRequest struct {
	PacketHeader
}

func (*CancelRequest) Encode

func (c *CancelRequest) Encode(pkt []byte)

func (*CancelRequest) Header

func (c *CancelRequest) Header() *PacketHeader

func (*CancelRequest) Size

func (c *CancelRequest) Size() int

type CancelRequestDecoder

type CancelRequestDecoder []byte

func (CancelRequestDecoder) IsInvalid

func (r CancelRequestDecoder) IsInvalid() bool

func (CancelRequestDecoder) StructureSize

func (r CancelRequestDecoder) StructureSize() uint16

type CipherContext

type CipherContext struct {
	Ciphers []uint16
}

func (*CipherContext) Encode

func (c *CipherContext) Encode(p []byte)

func (*CipherContext) Size

func (c *CipherContext) Size() int

type CipherContextDataDecoder

type CipherContextDataDecoder []byte

func (CipherContextDataDecoder) CipherCount

func (c CipherContextDataDecoder) CipherCount() uint16

func (CipherContextDataDecoder) Ciphers

func (c CipherContextDataDecoder) Ciphers() []uint16

func (CipherContextDataDecoder) IsInvalid

func (c CipherContextDataDecoder) IsInvalid() bool

type CloseRequest

type CloseRequest struct {
	PacketHeader

	Flags  uint16
	FileId *FileId
}

func (*CloseRequest) Encode

func (c *CloseRequest) Encode(pkt []byte)

func (*CloseRequest) Header

func (c *CloseRequest) Header() *PacketHeader

func (*CloseRequest) Size

func (c *CloseRequest) Size() int

type CloseRequestDecoder

type CloseRequestDecoder []byte

func (CloseRequestDecoder) FileId

func (CloseRequestDecoder) Flags

func (r CloseRequestDecoder) Flags() uint16

func (CloseRequestDecoder) IsInvalid

func (r CloseRequestDecoder) IsInvalid() bool

func (CloseRequestDecoder) StructureSize

func (r CloseRequestDecoder) StructureSize() uint16

type CloseResponse

type CloseResponse struct {
	PacketHeader

	Flags          uint16
	CreationTime   *Filetime
	LastAccessTime *Filetime
	LastWriteTime  *Filetime
	ChangeTime     *Filetime
	AllocationSize int64
	EndofFile      int64
	FileAttributes uint32
}

func (*CloseResponse) Encode

func (c *CloseResponse) Encode(pkt []byte)

func (*CloseResponse) Header

func (c *CloseResponse) Header() *PacketHeader

func (*CloseResponse) Size

func (c *CloseResponse) Size() int

type CloseResponseDecoder

type CloseResponseDecoder []byte

func (CloseResponseDecoder) AllocationSize

func (r CloseResponseDecoder) AllocationSize() int64

func (CloseResponseDecoder) ChangeTime

func (r CloseResponseDecoder) ChangeTime() FiletimeDecoder

func (CloseResponseDecoder) CreationTime

func (r CloseResponseDecoder) CreationTime() FiletimeDecoder

func (CloseResponseDecoder) EndofFile

func (r CloseResponseDecoder) EndofFile() int64

func (CloseResponseDecoder) FileAttributes

func (r CloseResponseDecoder) FileAttributes() uint32

func (CloseResponseDecoder) Flags

func (r CloseResponseDecoder) Flags() uint16

func (CloseResponseDecoder) IsInvalid

func (r CloseResponseDecoder) IsInvalid() bool

func (CloseResponseDecoder) LastAccessTime

func (r CloseResponseDecoder) LastAccessTime() FiletimeDecoder

func (CloseResponseDecoder) LastWriteTime

func (r CloseResponseDecoder) LastWriteTime() FiletimeDecoder

func (CloseResponseDecoder) StructureSize

func (r CloseResponseDecoder) StructureSize() uint16

type CreateRequest

type CreateRequest struct {
	PacketHeader

	SecurityFlags        uint8
	RequestedOplockLevel uint8
	ImpersonationLevel   uint32
	SmbCreateFlags       uint64
	DesiredAccess        uint32
	FileAttributes       uint32
	ShareAccess          uint32
	CreateDisposition    uint32
	CreateOptions        uint32
	Name                 string

	Contexts []Encoder
}

func (*CreateRequest) Encode

func (c *CreateRequest) Encode(pkt []byte)

func (*CreateRequest) Header

func (c *CreateRequest) Header() *PacketHeader

func (*CreateRequest) Size

func (c *CreateRequest) Size() int

type CreateRequestDecoder

type CreateRequestDecoder []byte

func (CreateRequestDecoder) CreateContextsLength

func (r CreateRequestDecoder) CreateContextsLength() uint32

func (CreateRequestDecoder) CreateContextsOffset

func (r CreateRequestDecoder) CreateContextsOffset() uint32

func (CreateRequestDecoder) CreateDisposition

func (r CreateRequestDecoder) CreateDisposition() uint32

func (CreateRequestDecoder) CreateOptions

func (r CreateRequestDecoder) CreateOptions() uint32

func (CreateRequestDecoder) DesiredAccess

func (r CreateRequestDecoder) DesiredAccess() uint32

func (CreateRequestDecoder) FileAttributes

func (r CreateRequestDecoder) FileAttributes() uint32

func (CreateRequestDecoder) ImpersonationLevel

func (r CreateRequestDecoder) ImpersonationLevel() uint32

func (CreateRequestDecoder) IsInvalid

func (r CreateRequestDecoder) IsInvalid() bool

func (CreateRequestDecoder) NameLength

func (r CreateRequestDecoder) NameLength() uint16

func (CreateRequestDecoder) NameOffset

func (r CreateRequestDecoder) NameOffset() uint16

func (CreateRequestDecoder) RequestedOplockLevel

func (r CreateRequestDecoder) RequestedOplockLevel() uint8

func (CreateRequestDecoder) SecurityFlags

func (r CreateRequestDecoder) SecurityFlags() uint8

func (CreateRequestDecoder) ShareAccess

func (r CreateRequestDecoder) ShareAccess() uint32

func (CreateRequestDecoder) SmbCreateFlags

func (r CreateRequestDecoder) SmbCreateFlags() uint64

func (CreateRequestDecoder) StructureSize

func (r CreateRequestDecoder) StructureSize() uint16

type CreateResponse

type CreateResponse struct {
	PacketHeader

	OplockLevel    uint8
	Flags          uint8
	CreateAction   uint32
	CreationTime   *Filetime
	LastAccessTime *Filetime
	LastWriteTime  *Filetime
	ChangeTime     *Filetime
	AllocationSize int64
	EndofFile      int64
	FileAttributes uint32
	FileId         *FileId

	Contexts []Encoder
}

func (*CreateResponse) Encode

func (c *CreateResponse) Encode(pkt []byte)

func (*CreateResponse) Header

func (c *CreateResponse) Header() *PacketHeader

func (*CreateResponse) Size

func (c *CreateResponse) Size() int

type CreateResponseDecoder

type CreateResponseDecoder []byte

func (CreateResponseDecoder) AllocationSize

func (r CreateResponseDecoder) AllocationSize() int64

func (CreateResponseDecoder) ChangeTime

func (r CreateResponseDecoder) ChangeTime() FiletimeDecoder

func (CreateResponseDecoder) CreateAction

func (r CreateResponseDecoder) CreateAction() uint32

func (CreateResponseDecoder) CreateContexts

func (r CreateResponseDecoder) CreateContexts() []byte

func (CreateResponseDecoder) CreateContextsLength

func (r CreateResponseDecoder) CreateContextsLength() uint32

func (CreateResponseDecoder) CreateContextsOffset

func (r CreateResponseDecoder) CreateContextsOffset() uint32

func (CreateResponseDecoder) CreationTime

func (r CreateResponseDecoder) CreationTime() FiletimeDecoder

func (CreateResponseDecoder) EndofFile

func (r CreateResponseDecoder) EndofFile() int64

func (CreateResponseDecoder) FileAttributes

func (r CreateResponseDecoder) FileAttributes() uint32

func (CreateResponseDecoder) FileId

func (CreateResponseDecoder) Flags

func (r CreateResponseDecoder) Flags() uint8

func (CreateResponseDecoder) IsInvalid

func (r CreateResponseDecoder) IsInvalid() bool

func (CreateResponseDecoder) LastAccessTime

func (r CreateResponseDecoder) LastAccessTime() FiletimeDecoder

func (CreateResponseDecoder) LastWriteTime

func (r CreateResponseDecoder) LastWriteTime() FiletimeDecoder

func (CreateResponseDecoder) OplockLevel

func (r CreateResponseDecoder) OplockLevel() uint8

func (CreateResponseDecoder) StructureSize

func (r CreateResponseDecoder) StructureSize() uint16

type Decoder

type Decoder interface {
	IsInvalid() bool
}

bytes based implementation; for decoding responses

type Encoder

type Encoder interface {
	Size() int
	Encode(b []byte)
}

struct based implementation; for encoding requests

type ErrorContextListResponse

type ErrorContextListResponse []*ErrorContextResponse

func (ErrorContextListResponse) Encode

func (c ErrorContextListResponse) Encode(p []byte)

func (ErrorContextListResponse) Size

func (c ErrorContextListResponse) Size() int

type ErrorContextResponse

type ErrorContextResponse struct {
	ErrorId uint32

	ErrorData Encoder
}

func (*ErrorContextResponse) Encode

func (c *ErrorContextResponse) Encode(p []byte)

func (*ErrorContextResponse) Size

func (c *ErrorContextResponse) Size() int

type ErrorContextResponseDecoder

type ErrorContextResponseDecoder []byte

func (ErrorContextResponseDecoder) ErrorContextData

func (ctx ErrorContextResponseDecoder) ErrorContextData() []byte

func (ErrorContextResponseDecoder) ErrorDataLength

func (ctx ErrorContextResponseDecoder) ErrorDataLength() uint32

func (ErrorContextResponseDecoder) ErrorId

func (ctx ErrorContextResponseDecoder) ErrorId() uint32

func (ErrorContextResponseDecoder) IsInvalid

func (ctx ErrorContextResponseDecoder) IsInvalid() bool

func (ErrorContextResponseDecoder) Next

func (ctx ErrorContextResponseDecoder) Next() int

type ErrorResponse

type ErrorResponse struct {
	PacketHeader

	ErrorData Encoder // ErrorContextListResponse | (SymbolicLinkErrorResponse | SmallBufferErrorResponse)
}

func (*ErrorResponse) Encode

func (c *ErrorResponse) Encode(pkt []byte)

it doesn't handle Command property, set it yourself

func (*ErrorResponse) Header

func (c *ErrorResponse) Header() *PacketHeader

func (*ErrorResponse) Size

func (c *ErrorResponse) Size() int

type ErrorResponseDecoder

type ErrorResponseDecoder []byte

func (ErrorResponseDecoder) ByteCount

func (r ErrorResponseDecoder) ByteCount() uint32

func (ErrorResponseDecoder) ErrorContextCount

func (r ErrorResponseDecoder) ErrorContextCount() uint8

func (ErrorResponseDecoder) ErrorData

func (r ErrorResponseDecoder) ErrorData() []byte

func (ErrorResponseDecoder) IsInvalid

func (r ErrorResponseDecoder) IsInvalid() bool

func (ErrorResponseDecoder) StructureSize

func (r ErrorResponseDecoder) StructureSize() uint16

type FileAccessInformationDecoder

type FileAccessInformationDecoder []byte

func (FileAccessInformationDecoder) AccessFlags

func (c FileAccessInformationDecoder) AccessFlags() uint32

func (FileAccessInformationDecoder) IsInvalid

func (c FileAccessInformationDecoder) IsInvalid() bool

type FileAlignmentInformationDecoder

type FileAlignmentInformationDecoder []byte

func (FileAlignmentInformationDecoder) AlignmentRequirement

func (c FileAlignmentInformationDecoder) AlignmentRequirement() uint32

func (FileAlignmentInformationDecoder) IsInvalid

func (c FileAlignmentInformationDecoder) IsInvalid() bool

type FileAllInformationDecoder

type FileAllInformationDecoder []byte

func (FileAllInformationDecoder) AccessInformation

func (FileAllInformationDecoder) AlignmentInformation

func (FileAllInformationDecoder) BasicInformation

func (FileAllInformationDecoder) EaInformation

func (FileAllInformationDecoder) InternalInformation

func (FileAllInformationDecoder) IsInvalid

func (c FileAllInformationDecoder) IsInvalid() bool

func (FileAllInformationDecoder) ModeInformation

func (FileAllInformationDecoder) NameInformation

func (FileAllInformationDecoder) PositionInformation

func (FileAllInformationDecoder) StandardInformation

type FileBasicInformationDecoder

type FileBasicInformationDecoder []byte

func (FileBasicInformationDecoder) ChangeTime

func (FileBasicInformationDecoder) CreationTime

func (FileBasicInformationDecoder) FileAttributes

func (c FileBasicInformationDecoder) FileAttributes() uint32

func (FileBasicInformationDecoder) IsInvalid

func (c FileBasicInformationDecoder) IsInvalid() bool

func (FileBasicInformationDecoder) LastAccessTime

func (c FileBasicInformationDecoder) LastAccessTime() FiletimeDecoder

func (FileBasicInformationDecoder) LastWriteTime

func (c FileBasicInformationDecoder) LastWriteTime() FiletimeDecoder

type FileBasicInformationEncoder

type FileBasicInformationEncoder struct {
	CreationTime   *Filetime
	LastAccessTime *Filetime
	LastWriteTime  *Filetime
	ChangeTime     *Filetime
	FileAttributes uint32
}

func (*FileBasicInformationEncoder) Encode

func (c *FileBasicInformationEncoder) Encode(p []byte)

func (*FileBasicInformationEncoder) Size

func (c *FileBasicInformationEncoder) Size() int

type FileDirectoryInformationDecoder

type FileDirectoryInformationDecoder []byte

func (FileDirectoryInformationDecoder) AllocationSize

func (c FileDirectoryInformationDecoder) AllocationSize() int64

func (FileDirectoryInformationDecoder) ChangeTime

func (FileDirectoryInformationDecoder) CreationTime

func (FileDirectoryInformationDecoder) EndOfFile

func (c FileDirectoryInformationDecoder) EndOfFile() int64

func (FileDirectoryInformationDecoder) FileAttributes

func (c FileDirectoryInformationDecoder) FileAttributes() uint32

func (FileDirectoryInformationDecoder) FileIndex

func (FileDirectoryInformationDecoder) FileName

func (FileDirectoryInformationDecoder) FileNameLength

func (c FileDirectoryInformationDecoder) FileNameLength() uint32

func (FileDirectoryInformationDecoder) IsInvalid

func (c FileDirectoryInformationDecoder) IsInvalid() bool

func (FileDirectoryInformationDecoder) LastAccessTime

func (FileDirectoryInformationDecoder) LastWriteTime

func (FileDirectoryInformationDecoder) NextEntryOffset

func (c FileDirectoryInformationDecoder) NextEntryOffset() uint32

type FileDispositionInformationEncoder

type FileDispositionInformationEncoder struct {
	DeletePending uint8
}

func (*FileDispositionInformationEncoder) Encode

func (c *FileDispositionInformationEncoder) Encode(p []byte)

func (*FileDispositionInformationEncoder) Size

type FileEaInformationDecoder

type FileEaInformationDecoder []byte

func (FileEaInformationDecoder) EaSize

func (c FileEaInformationDecoder) EaSize() uint32

func (FileEaInformationDecoder) IsInvalid

func (c FileEaInformationDecoder) IsInvalid() bool

type FileEndOfFileInformationDecoder

type FileEndOfFileInformationDecoder []byte

func (FileEndOfFileInformationDecoder) EndOfFile

func (c FileEndOfFileInformationDecoder) EndOfFile() int64

func (FileEndOfFileInformationDecoder) IsInvalid

func (c FileEndOfFileInformationDecoder) IsInvalid() bool

type FileEndOfFileInformationEncoder

type FileEndOfFileInformationEncoder struct {
	EndOfFile int64
}

func (*FileEndOfFileInformationEncoder) Encode

func (c *FileEndOfFileInformationEncoder) Encode(p []byte)

func (*FileEndOfFileInformationEncoder) Size

type FileFsFullSizeInformationDecoder

type FileFsFullSizeInformationDecoder []byte

func (FileFsFullSizeInformationDecoder) ActualAvailableAllocationUnits

func (c FileFsFullSizeInformationDecoder) ActualAvailableAllocationUnits() int64

func (FileFsFullSizeInformationDecoder) BytesPerSector

func (c FileFsFullSizeInformationDecoder) BytesPerSector() uint32

func (FileFsFullSizeInformationDecoder) CallerAvailableAllocationUnits

func (c FileFsFullSizeInformationDecoder) CallerAvailableAllocationUnits() int64

func (FileFsFullSizeInformationDecoder) IsInvalid

func (c FileFsFullSizeInformationDecoder) IsInvalid() bool

func (FileFsFullSizeInformationDecoder) SectorsPerAllocationUnit

func (c FileFsFullSizeInformationDecoder) SectorsPerAllocationUnit() uint32

func (FileFsFullSizeInformationDecoder) TotalAllocationUnits

func (c FileFsFullSizeInformationDecoder) TotalAllocationUnits() int64

type FileId

type FileId struct {
	Persistent [8]byte
	Volatile   [8]byte
}

func (*FileId) Encode

func (fd *FileId) Encode(p []byte)

func (*FileId) IsZero

func (fd *FileId) IsZero() bool

func (*FileId) Size

func (fd *FileId) Size() int

type FileIdDecoder

type FileIdDecoder []byte

func (FileIdDecoder) Decode

func (fd FileIdDecoder) Decode() *FileId

func (FileIdDecoder) Persistent

func (fd FileIdDecoder) Persistent() []byte

func (FileIdDecoder) Volatile

func (fd FileIdDecoder) Volatile() []byte

type FileInternalInformationDecoder

type FileInternalInformationDecoder []byte

func (FileInternalInformationDecoder) IndexNumber

func (c FileInternalInformationDecoder) IndexNumber() int64

func (FileInternalInformationDecoder) IsInvalid

func (c FileInternalInformationDecoder) IsInvalid() bool

type FileLinkInformationType2Encoder

type FileLinkInformationType2Encoder struct {
	ReplaceIfExists uint8
	RootDirectory   uint64
	FileName        string
}

func (*FileLinkInformationType2Encoder) Encode

func (c *FileLinkInformationType2Encoder) Encode(p []byte)

func (*FileLinkInformationType2Encoder) Size

type FileModeInformationDecoder

type FileModeInformationDecoder []byte

func (FileModeInformationDecoder) IsInvalid

func (c FileModeInformationDecoder) IsInvalid() bool

func (FileModeInformationDecoder) Mode

type FileNameInformationDecoder

type FileNameInformationDecoder []byte

func (FileNameInformationDecoder) FileName

func (c FileNameInformationDecoder) FileName() string

func (FileNameInformationDecoder) FileNameLength

func (c FileNameInformationDecoder) FileNameLength() uint32

func (FileNameInformationDecoder) IsInvalid

func (c FileNameInformationDecoder) IsInvalid() bool

type FilePositionInformationDecoder

type FilePositionInformationDecoder []byte

func (FilePositionInformationDecoder) CurrentByteOffset

func (c FilePositionInformationDecoder) CurrentByteOffset() int64

func (FilePositionInformationDecoder) IsInvalid

func (c FilePositionInformationDecoder) IsInvalid() bool

type FilePositionInformationEncoder

type FilePositionInformationEncoder struct {
	CurrentByteOffset int64
}

func (*FilePositionInformationEncoder) Encode

func (c *FilePositionInformationEncoder) Encode(p []byte)

func (*FilePositionInformationEncoder) Size

type FileQuotaInformationDecoder

type FileQuotaInformationDecoder []byte

func (FileQuotaInformationDecoder) ChangeTime

func (FileQuotaInformationDecoder) IsInvalid

func (c FileQuotaInformationDecoder) IsInvalid() bool

func (FileQuotaInformationDecoder) NextEntryOffset

func (c FileQuotaInformationDecoder) NextEntryOffset() uint32

func (FileQuotaInformationDecoder) QuotaLimit

func (c FileQuotaInformationDecoder) QuotaLimit() int64

func (FileQuotaInformationDecoder) QuotaThreshold

func (c FileQuotaInformationDecoder) QuotaThreshold() int64

func (FileQuotaInformationDecoder) QuotaUsed

func (c FileQuotaInformationDecoder) QuotaUsed() int64

func (FileQuotaInformationDecoder) Sid

func (FileQuotaInformationDecoder) SidLength

func (c FileQuotaInformationDecoder) SidLength() uint32

type FileRenameInformationType2Encoder

type FileRenameInformationType2Encoder struct {
	ReplaceIfExists uint8
	RootDirectory   uint64
	FileName        string
}

func (*FileRenameInformationType2Encoder) Encode

func (c *FileRenameInformationType2Encoder) Encode(p []byte)

func (*FileRenameInformationType2Encoder) Size

type FileStandardInformationDecoder

type FileStandardInformationDecoder []byte

func (FileStandardInformationDecoder) AllocationSize

func (c FileStandardInformationDecoder) AllocationSize() int64

func (FileStandardInformationDecoder) DeletePending

func (c FileStandardInformationDecoder) DeletePending() uint8

func (FileStandardInformationDecoder) Directory

func (c FileStandardInformationDecoder) Directory() uint8

func (FileStandardInformationDecoder) EndOfFile

func (c FileStandardInformationDecoder) EndOfFile() int64

func (FileStandardInformationDecoder) IsInvalid

func (c FileStandardInformationDecoder) IsInvalid() bool
func (c FileStandardInformationDecoder) NumberOfLinks() uint32

type Filetime

type Filetime struct {
	LowDateTime  uint32
	HighDateTime uint32
}

func NsecToFiletime

func NsecToFiletime(nsec int64) (ft *Filetime)

func (*Filetime) Encode

func (ft *Filetime) Encode(p []byte)

func (*Filetime) Nanoseconds

func (ft *Filetime) Nanoseconds() int64

func (*Filetime) Size

func (ft *Filetime) Size() int

type FiletimeDecoder

type FiletimeDecoder []byte

func (FiletimeDecoder) Decode

func (ft FiletimeDecoder) Decode() *Filetime

func (FiletimeDecoder) HighDateTime

func (ft FiletimeDecoder) HighDateTime() uint32

func (FiletimeDecoder) LowDateTime

func (ft FiletimeDecoder) LowDateTime() uint32

func (FiletimeDecoder) Nanoseconds

func (ft FiletimeDecoder) Nanoseconds() int64

type FlushRequest

type FlushRequest struct {
	PacketHeader

	FileId *FileId
}

func (*FlushRequest) Encode

func (c *FlushRequest) Encode(pkt []byte)

func (*FlushRequest) Header

func (c *FlushRequest) Header() *PacketHeader

func (*FlushRequest) Size

func (c *FlushRequest) Size() int

type FlushRequestDecoder

type FlushRequestDecoder []byte

func (FlushRequestDecoder) FileId

func (FlushRequestDecoder) IsInvalid

func (r FlushRequestDecoder) IsInvalid() bool

func (FlushRequestDecoder) StructureSize

func (r FlushRequestDecoder) StructureSize() uint16

type FlushResponse

type FlushResponse struct {
	PacketHeader
}

func (*FlushResponse) Encode

func (c *FlushResponse) Encode(pkt []byte)

func (*FlushResponse) Header

func (c *FlushResponse) Header() *PacketHeader

func (*FlushResponse) Size

func (c *FlushResponse) Size() int

type FlushResponseDecoder

type FlushResponseDecoder []byte

func (FlushResponseDecoder) IsInvalid

func (r FlushResponseDecoder) IsInvalid() bool

func (FlushResponseDecoder) StructureSize

func (r FlushResponseDecoder) StructureSize() uint16

type HashContext

type HashContext struct {
	HashAlgorithms []uint16
	HashSalt       []byte
}

func (*HashContext) Encode

func (c *HashContext) Encode(p []byte)

func (*HashContext) Size

func (c *HashContext) Size() int

type HashContextDataDecoder

type HashContextDataDecoder []byte

func (HashContextDataDecoder) HashAlgorithmCount

func (h HashContextDataDecoder) HashAlgorithmCount() uint16

func (HashContextDataDecoder) HashAlgorithms

func (h HashContextDataDecoder) HashAlgorithms() []uint16

func (HashContextDataDecoder) IsInvalid

func (h HashContextDataDecoder) IsInvalid() bool

func (HashContextDataDecoder) Salt

func (h HashContextDataDecoder) Salt() []byte

func (HashContextDataDecoder) SaltLength

func (h HashContextDataDecoder) SaltLength() uint16

type IoctlRequest

type IoctlRequest struct {
	PacketHeader

	CtlCode           uint32
	FileId            *FileId
	OutputOffset      uint32
	OutputCount       uint32
	MaxInputResponse  uint32
	MaxOutputResponse uint32
	Flags             uint32
	Input             Encoder
}

func (*IoctlRequest) Encode

func (c *IoctlRequest) Encode(pkt []byte)

func (*IoctlRequest) Header

func (c *IoctlRequest) Header() *PacketHeader

func (*IoctlRequest) Size

func (c *IoctlRequest) Size() int

type IoctlRequestDecoder

type IoctlRequestDecoder []byte

func (IoctlRequestDecoder) CtlCode

func (r IoctlRequestDecoder) CtlCode() uint32

func (IoctlRequestDecoder) FileId

func (IoctlRequestDecoder) Flags

func (r IoctlRequestDecoder) Flags() uint32

func (IoctlRequestDecoder) InputCount

func (r IoctlRequestDecoder) InputCount() uint32

func (IoctlRequestDecoder) InputOffset

func (r IoctlRequestDecoder) InputOffset() uint32

func (IoctlRequestDecoder) IsInvalid

func (r IoctlRequestDecoder) IsInvalid() bool

func (IoctlRequestDecoder) MaxInputResponse

func (r IoctlRequestDecoder) MaxInputResponse() uint32

func (IoctlRequestDecoder) MaxOutputResponse

func (r IoctlRequestDecoder) MaxOutputResponse() uint32

func (IoctlRequestDecoder) OutputCount

func (r IoctlRequestDecoder) OutputCount() uint32

func (IoctlRequestDecoder) OutputOffset

func (r IoctlRequestDecoder) OutputOffset() uint32

func (IoctlRequestDecoder) StructureSize

func (r IoctlRequestDecoder) StructureSize() uint16

type IoctlResponse

type IoctlResponse struct {
	PacketHeader

	CtlCode uint32
	FileId  *FileId
	Flags   uint32
	Input   Encoder
	Output  Encoder
}

func (*IoctlResponse) Encode

func (c *IoctlResponse) Encode(pkt []byte)

func (*IoctlResponse) Header

func (c *IoctlResponse) Header() *PacketHeader

func (*IoctlResponse) Size

func (c *IoctlResponse) Size() int

type IoctlResponseDecoder

type IoctlResponseDecoder []byte

func (IoctlResponseDecoder) CtlCode

func (r IoctlResponseDecoder) CtlCode() uint32

func (IoctlResponseDecoder) FileId

func (IoctlResponseDecoder) Flags

func (r IoctlResponseDecoder) Flags() uint32

func (IoctlResponseDecoder) Input

func (r IoctlResponseDecoder) Input() []byte

func (IoctlResponseDecoder) InputCount

func (r IoctlResponseDecoder) InputCount() uint32

func (IoctlResponseDecoder) InputOffset

func (r IoctlResponseDecoder) InputOffset() uint32

func (IoctlResponseDecoder) IsInvalid

func (r IoctlResponseDecoder) IsInvalid() bool

func (IoctlResponseDecoder) Output

func (r IoctlResponseDecoder) Output() []byte

func (IoctlResponseDecoder) OutputCount

func (r IoctlResponseDecoder) OutputCount() uint32

func (IoctlResponseDecoder) OutputOffset

func (r IoctlResponseDecoder) OutputOffset() uint32

func (IoctlResponseDecoder) StructureSize

func (r IoctlResponseDecoder) StructureSize() uint16

type LogoffRequest

type LogoffRequest struct {
	PacketHeader
}

func (*LogoffRequest) Encode

func (c *LogoffRequest) Encode(pkt []byte)

func (*LogoffRequest) Header

func (c *LogoffRequest) Header() *PacketHeader

func (*LogoffRequest) Size

func (c *LogoffRequest) Size() int

type LogoffRequestDecoder

type LogoffRequestDecoder []byte

func (LogoffRequestDecoder) IsInvalid

func (r LogoffRequestDecoder) IsInvalid() bool

func (LogoffRequestDecoder) StructureSize

func (r LogoffRequestDecoder) StructureSize() uint16

type LogoffResponse

type LogoffResponse struct {
	PacketHeader
}

func (*LogoffResponse) Encode

func (c *LogoffResponse) Encode(pkt []byte)

func (*LogoffResponse) Header

func (c *LogoffResponse) Header() *PacketHeader

func (*LogoffResponse) Size

func (c *LogoffResponse) Size() int

type LogoffResponseDecoder

type LogoffResponseDecoder []byte

func (LogoffResponseDecoder) IsInvalid

func (r LogoffResponseDecoder) IsInvalid() bool

func (LogoffResponseDecoder) StructureSize

func (r LogoffResponseDecoder) StructureSize() uint16

type NegotiateContextDecoder

type NegotiateContextDecoder []byte

func (NegotiateContextDecoder) ContextType

func (ctx NegotiateContextDecoder) ContextType() uint16

func (NegotiateContextDecoder) Data

func (ctx NegotiateContextDecoder) Data() []byte

func (NegotiateContextDecoder) DataLength

func (ctx NegotiateContextDecoder) DataLength() uint16

func (NegotiateContextDecoder) IsInvalid

func (ctx NegotiateContextDecoder) IsInvalid() bool

func (NegotiateContextDecoder) Next

func (ctx NegotiateContextDecoder) Next() int

type NegotiateRequest

type NegotiateRequest struct {
	PacketHeader

	SecurityMode uint16
	Capabilities uint32
	ClientGuid   [16]byte
	Dialects     []uint16

	Contexts []Encoder
}

func (*NegotiateRequest) Encode

func (c *NegotiateRequest) Encode(pkt []byte)

func (*NegotiateRequest) Header

func (c *NegotiateRequest) Header() *PacketHeader

func (*NegotiateRequest) Size

func (c *NegotiateRequest) Size() int

type NegotiateRequestDecoder

type NegotiateRequestDecoder []byte

func (NegotiateRequestDecoder) Capabilities

func (r NegotiateRequestDecoder) Capabilities() uint32

func (NegotiateRequestDecoder) ClientGuid

func (r NegotiateRequestDecoder) ClientGuid() []byte

func (NegotiateRequestDecoder) ClientStartTime

func (r NegotiateRequestDecoder) ClientStartTime() []byte

func (NegotiateRequestDecoder) DialectCount

func (r NegotiateRequestDecoder) DialectCount() uint16

func (NegotiateRequestDecoder) Dialects

func (r NegotiateRequestDecoder) Dialects() []uint16

func (NegotiateRequestDecoder) IsInvalid

func (r NegotiateRequestDecoder) IsInvalid() bool

func (NegotiateRequestDecoder) NegotiateContextCount

func (r NegotiateRequestDecoder) NegotiateContextCount() uint16

func (NegotiateRequestDecoder) NegotiateContextList

func (r NegotiateRequestDecoder) NegotiateContextList() []byte

func (NegotiateRequestDecoder) NegotiateContextOffset

func (r NegotiateRequestDecoder) NegotiateContextOffset() uint32

func (NegotiateRequestDecoder) SecurityMode

func (r NegotiateRequestDecoder) SecurityMode() uint16

func (NegotiateRequestDecoder) StructureSize

func (r NegotiateRequestDecoder) StructureSize() uint16

type NegotiateResponse

type NegotiateResponse struct {
	PacketHeader

	SecurityMode    uint16
	DialectRevision uint16
	ServerGuid      [16]byte
	Capabilities    uint32
	MaxTransactSize uint32
	MaxReadSize     uint32
	MaxWriteSize    uint32
	SystemTime      *Filetime
	ServerStartTime *Filetime
	SecurityBuffer  []byte

	Contexts []Encoder
}

func (*NegotiateResponse) Encode

func (c *NegotiateResponse) Encode(pkt []byte)

func (*NegotiateResponse) Header

func (c *NegotiateResponse) Header() *PacketHeader

func (*NegotiateResponse) Size

func (c *NegotiateResponse) Size() int

type NegotiateResponseDecoder

type NegotiateResponseDecoder []byte

func (NegotiateResponseDecoder) Capabilities

func (r NegotiateResponseDecoder) Capabilities() uint32

func (NegotiateResponseDecoder) DialectRevision

func (r NegotiateResponseDecoder) DialectRevision() uint16

func (NegotiateResponseDecoder) IsInvalid

func (r NegotiateResponseDecoder) IsInvalid() bool

func (NegotiateResponseDecoder) MaxReadSize

func (r NegotiateResponseDecoder) MaxReadSize() uint32

func (NegotiateResponseDecoder) MaxTransactSize

func (r NegotiateResponseDecoder) MaxTransactSize() uint32

func (NegotiateResponseDecoder) MaxWriteSize

func (r NegotiateResponseDecoder) MaxWriteSize() uint32

func (NegotiateResponseDecoder) NegotiateContextCount

func (r NegotiateResponseDecoder) NegotiateContextCount() uint16

func (NegotiateResponseDecoder) NegotiateContextList

func (r NegotiateResponseDecoder) NegotiateContextList() []byte

func (NegotiateResponseDecoder) NegotiateContextOffset

func (r NegotiateResponseDecoder) NegotiateContextOffset() uint32

func (NegotiateResponseDecoder) SecurityBuffer

func (r NegotiateResponseDecoder) SecurityBuffer() []byte

func (NegotiateResponseDecoder) SecurityBufferLength

func (r NegotiateResponseDecoder) SecurityBufferLength() uint16

func (NegotiateResponseDecoder) SecurityBufferOffset

func (r NegotiateResponseDecoder) SecurityBufferOffset() uint16

func (NegotiateResponseDecoder) SecurityMode

func (r NegotiateResponseDecoder) SecurityMode() uint16

func (NegotiateResponseDecoder) ServerGuid

func (r NegotiateResponseDecoder) ServerGuid() []byte

func (NegotiateResponseDecoder) ServerStartTime

func (r NegotiateResponseDecoder) ServerStartTime() FiletimeDecoder

func (NegotiateResponseDecoder) StructureSize

func (r NegotiateResponseDecoder) StructureSize() uint16

func (NegotiateResponseDecoder) SystemTime

type Packet

type Packet interface {
	Encoder

	Header() *PacketHeader
}

type PacketCodec

type PacketCodec []byte

func (PacketCodec) AsyncId

func (p PacketCodec) AsyncId() uint64

func (PacketCodec) ChannelSequence

func (p PacketCodec) ChannelSequence() uint16

func (PacketCodec) Command

func (p PacketCodec) Command() uint16

func (PacketCodec) CreditCharge

func (p PacketCodec) CreditCharge() uint16

func (PacketCodec) CreditRequest

func (p PacketCodec) CreditRequest() uint16

func (PacketCodec) CreditResponse

func (p PacketCodec) CreditResponse() uint16

func (PacketCodec) Data

func (p PacketCodec) Data() []byte

func (PacketCodec) Flags

func (p PacketCodec) Flags() uint32

func (PacketCodec) IsInvalid

func (p PacketCodec) IsInvalid() bool

func (PacketCodec) MessageId

func (p PacketCodec) MessageId() uint64

func (PacketCodec) NextCommand

func (p PacketCodec) NextCommand() uint32

func (PacketCodec) ProtocolId

func (p PacketCodec) ProtocolId() []byte

func (PacketCodec) SessionId

func (p PacketCodec) SessionId() uint64

func (PacketCodec) SetAsyncId

func (p PacketCodec) SetAsyncId(u uint64)

func (PacketCodec) SetChannelSequence

func (p PacketCodec) SetChannelSequence(u uint16)

func (PacketCodec) SetCommand

func (p PacketCodec) SetCommand(u uint16)

func (PacketCodec) SetCreditCharge

func (p PacketCodec) SetCreditCharge(u uint16)

func (PacketCodec) SetCreditRequest

func (p PacketCodec) SetCreditRequest(u uint16)

func (PacketCodec) SetCreditResponse

func (p PacketCodec) SetCreditResponse(u uint16)

func (PacketCodec) SetFlags

func (p PacketCodec) SetFlags(u uint32)

func (PacketCodec) SetMessageId

func (p PacketCodec) SetMessageId(u uint64)

func (PacketCodec) SetNextCommand

func (p PacketCodec) SetNextCommand(u uint32)

func (PacketCodec) SetProtocolId

func (p PacketCodec) SetProtocolId()

func (PacketCodec) SetSessionId

func (p PacketCodec) SetSessionId(u uint64)

func (PacketCodec) SetSignature

func (p PacketCodec) SetSignature(bs []byte)

func (PacketCodec) SetStatus

func (p PacketCodec) SetStatus(u uint32)

func (PacketCodec) SetStructureSize

func (p PacketCodec) SetStructureSize()

func (PacketCodec) SetTreeId

func (p PacketCodec) SetTreeId(u uint32)

func (PacketCodec) Signature

func (p PacketCodec) Signature() []byte

func (PacketCodec) Status

func (p PacketCodec) Status() uint32

func (PacketCodec) StructureSize

func (p PacketCodec) StructureSize() uint16

func (PacketCodec) TreeId

func (p PacketCodec) TreeId() uint32

type PacketHeader

type PacketHeader struct {
	CreditCharge          uint16
	ChannelSequence       uint16
	Status                uint32
	Command               uint16
	CreditRequestResponse uint16
	Flags                 uint32
	MessageId             uint64
	AsyncId               uint64
	TreeId                uint32
	SessionId             uint64
}

type QueryDirectoryRequest

type QueryDirectoryRequest struct {
	PacketHeader

	FileInfoClass      uint8
	Flags              uint8
	FileIndex          uint32
	FileId             *FileId
	OutputBufferLength uint32
	FileName           string
}

func (*QueryDirectoryRequest) Encode

func (c *QueryDirectoryRequest) Encode(pkt []byte)

func (*QueryDirectoryRequest) Header

func (c *QueryDirectoryRequest) Header() *PacketHeader

func (*QueryDirectoryRequest) Size

func (c *QueryDirectoryRequest) Size() int

type QueryDirectoryRequestDecoder

type QueryDirectoryRequestDecoder []byte

func (QueryDirectoryRequestDecoder) FileId

func (QueryDirectoryRequestDecoder) FileIndex

func (r QueryDirectoryRequestDecoder) FileIndex() uint32

func (QueryDirectoryRequestDecoder) FileInfoClass

func (r QueryDirectoryRequestDecoder) FileInfoClass() uint8

func (QueryDirectoryRequestDecoder) FileNameLength

func (r QueryDirectoryRequestDecoder) FileNameLength() uint16

func (QueryDirectoryRequestDecoder) FileNameOffset

func (r QueryDirectoryRequestDecoder) FileNameOffset() uint16

func (QueryDirectoryRequestDecoder) Flags

func (QueryDirectoryRequestDecoder) IsInvalid

func (r QueryDirectoryRequestDecoder) IsInvalid() bool

func (QueryDirectoryRequestDecoder) OutputBufferLength

func (r QueryDirectoryRequestDecoder) OutputBufferLength() uint32

func (QueryDirectoryRequestDecoder) StructureSize

func (r QueryDirectoryRequestDecoder) StructureSize() uint16

type QueryDirectoryResponse

type QueryDirectoryResponse struct {
	PacketHeader

	Output Encoder
}

func (*QueryDirectoryResponse) Encode

func (c *QueryDirectoryResponse) Encode(pkt []byte)

func (*QueryDirectoryResponse) Header

func (c *QueryDirectoryResponse) Header() *PacketHeader

func (*QueryDirectoryResponse) Size

func (c *QueryDirectoryResponse) Size() int

type QueryDirectoryResponseDecoder

type QueryDirectoryResponseDecoder []byte

func (QueryDirectoryResponseDecoder) IsInvalid

func (r QueryDirectoryResponseDecoder) IsInvalid() bool

func (QueryDirectoryResponseDecoder) OutputBuffer

func (r QueryDirectoryResponseDecoder) OutputBuffer() []byte

func (QueryDirectoryResponseDecoder) OutputBufferLength

func (r QueryDirectoryResponseDecoder) OutputBufferLength() uint32

func (QueryDirectoryResponseDecoder) OutputBufferOffset

func (r QueryDirectoryResponseDecoder) OutputBufferOffset() uint16

func (QueryDirectoryResponseDecoder) StructureSize

func (r QueryDirectoryResponseDecoder) StructureSize() uint16

type QueryInfoRequest

type QueryInfoRequest struct {
	PacketHeader

	InfoType              uint8
	FileInfoClass         uint8
	OutputBufferLength    uint32
	AdditionalInformation uint32
	Flags                 uint32
	FileId                *FileId
	Input                 Encoder
}

func (*QueryInfoRequest) Encode

func (c *QueryInfoRequest) Encode(pkt []byte)

func (*QueryInfoRequest) Header

func (c *QueryInfoRequest) Header() *PacketHeader

func (*QueryInfoRequest) Size

func (c *QueryInfoRequest) Size() int

type QueryInfoRequestDecoder

type QueryInfoRequestDecoder []byte

func (QueryInfoRequestDecoder) AdditionalInformation

func (r QueryInfoRequestDecoder) AdditionalInformation() uint32

func (QueryInfoRequestDecoder) FileId

func (QueryInfoRequestDecoder) FileInfoClass

func (r QueryInfoRequestDecoder) FileInfoClass() uint8

func (QueryInfoRequestDecoder) Flags

func (r QueryInfoRequestDecoder) Flags() uint32

func (QueryInfoRequestDecoder) InfoType

func (r QueryInfoRequestDecoder) InfoType() uint8

func (QueryInfoRequestDecoder) InputBufferLength

func (r QueryInfoRequestDecoder) InputBufferLength() uint32

func (QueryInfoRequestDecoder) InputBufferOffset

func (r QueryInfoRequestDecoder) InputBufferOffset() uint16

func (QueryInfoRequestDecoder) IsInvalid

func (r QueryInfoRequestDecoder) IsInvalid() bool

func (QueryInfoRequestDecoder) OutputBufferLength

func (r QueryInfoRequestDecoder) OutputBufferLength() uint32

func (QueryInfoRequestDecoder) StructureSize

func (r QueryInfoRequestDecoder) StructureSize() uint16

type QueryInfoResponse

type QueryInfoResponse struct {
	PacketHeader

	Output Encoder
}

func (*QueryInfoResponse) Encode

func (c *QueryInfoResponse) Encode(pkt []byte)

func (*QueryInfoResponse) Header

func (c *QueryInfoResponse) Header() *PacketHeader

func (*QueryInfoResponse) Size

func (c *QueryInfoResponse) Size() int

type QueryInfoResponseDecoder

type QueryInfoResponseDecoder []byte

func (QueryInfoResponseDecoder) IsInvalid

func (r QueryInfoResponseDecoder) IsInvalid() bool

func (QueryInfoResponseDecoder) OutputBuffer

func (r QueryInfoResponseDecoder) OutputBuffer() []byte

func (QueryInfoResponseDecoder) OutputBufferLength

func (r QueryInfoResponseDecoder) OutputBufferLength() uint32

func (QueryInfoResponseDecoder) OutputBufferOffset

func (r QueryInfoResponseDecoder) OutputBufferOffset() uint16

func (QueryInfoResponseDecoder) StructureSize

func (r QueryInfoResponseDecoder) StructureSize() uint16

type QueryQuotaInfo

type QueryQuotaInfo struct {
	ReturnSingle bool
	RestartScan  bool
	Sids         []Sid
}

func (*QueryQuotaInfo) Encode

func (q *QueryQuotaInfo) Encode(p []byte)

func (*QueryQuotaInfo) Size

func (q *QueryQuotaInfo) Size() int

type ReadRequest

type ReadRequest struct {
	PacketHeader

	Padding         uint8
	Flags           uint8
	Length          uint32
	Offset          uint64
	FileId          *FileId
	MinimumCount    uint32
	Channel         uint32
	RemainingBytes  uint32
	ReadChannelInfo []Encoder
}

func (*ReadRequest) Encode

func (c *ReadRequest) Encode(pkt []byte)

func (*ReadRequest) Header

func (c *ReadRequest) Header() *PacketHeader

func (*ReadRequest) Size

func (c *ReadRequest) Size() int

type ReadRequestDecoder

type ReadRequestDecoder []byte

func (ReadRequestDecoder) Channel

func (r ReadRequestDecoder) Channel() uint32

func (ReadRequestDecoder) FileId

func (r ReadRequestDecoder) FileId() FileIdDecoder

func (ReadRequestDecoder) Flags

func (r ReadRequestDecoder) Flags() uint8

func (ReadRequestDecoder) IsInvalid

func (r ReadRequestDecoder) IsInvalid() bool

func (ReadRequestDecoder) Length

func (r ReadRequestDecoder) Length() uint32

func (ReadRequestDecoder) MinimumCount

func (r ReadRequestDecoder) MinimumCount() uint32

func (ReadRequestDecoder) Offset

func (r ReadRequestDecoder) Offset() uint64

func (ReadRequestDecoder) Padding

func (r ReadRequestDecoder) Padding() uint8

func (ReadRequestDecoder) ReadChannelInfoLength

func (r ReadRequestDecoder) ReadChannelInfoLength() uint16

func (ReadRequestDecoder) ReadChannelInfoOffset

func (r ReadRequestDecoder) ReadChannelInfoOffset() uint16

func (ReadRequestDecoder) RemainingBytes

func (r ReadRequestDecoder) RemainingBytes() uint32

func (ReadRequestDecoder) StructureSize

func (r ReadRequestDecoder) StructureSize() uint16

type ReadResponse

type ReadResponse struct {
	PacketHeader

	Data          []byte
	DataRemaining uint32
}

func (*ReadResponse) Encode

func (c *ReadResponse) Encode(pkt []byte)

func (*ReadResponse) Header

func (c *ReadResponse) Header() *PacketHeader

func (*ReadResponse) Size

func (c *ReadResponse) Size() int

type ReadResponseDecoder

type ReadResponseDecoder []byte

func (ReadResponseDecoder) Data

func (r ReadResponseDecoder) Data() []byte

func (ReadResponseDecoder) DataLength

func (r ReadResponseDecoder) DataLength() uint32

func (ReadResponseDecoder) DataOffset

func (r ReadResponseDecoder) DataOffset() uint8

func (ReadResponseDecoder) DataRemaining

func (r ReadResponseDecoder) DataRemaining() uint32

func (ReadResponseDecoder) IsInvalid

func (r ReadResponseDecoder) IsInvalid() bool

func (ReadResponseDecoder) StructureSize

func (r ReadResponseDecoder) StructureSize() uint16

type SessionSetupRequest

type SessionSetupRequest struct {
	PacketHeader

	Flags             uint8
	SecurityMode      uint8
	Capabilities      uint32
	Channel           uint32
	SecurityBuffer    []byte
	PreviousSessionId uint64
}

func (*SessionSetupRequest) Encode

func (c *SessionSetupRequest) Encode(pkt []byte)

func (*SessionSetupRequest) Header

func (c *SessionSetupRequest) Header() *PacketHeader

func (*SessionSetupRequest) Size

func (c *SessionSetupRequest) Size() int

type SessionSetupRequestDecoder

type SessionSetupRequestDecoder []byte

func (SessionSetupRequestDecoder) Capabilities

func (r SessionSetupRequestDecoder) Capabilities() uint32

func (SessionSetupRequestDecoder) Channel

func (r SessionSetupRequestDecoder) Channel() uint32

func (SessionSetupRequestDecoder) Flags

func (SessionSetupRequestDecoder) IsInvalid

func (r SessionSetupRequestDecoder) IsInvalid() bool

func (SessionSetupRequestDecoder) PreviousSessionId

func (r SessionSetupRequestDecoder) PreviousSessionId() uint64

func (SessionSetupRequestDecoder) SecurityBuffer

func (r SessionSetupRequestDecoder) SecurityBuffer() []byte

func (SessionSetupRequestDecoder) SecurityBufferLength

func (r SessionSetupRequestDecoder) SecurityBufferLength() uint16

func (SessionSetupRequestDecoder) SecurityBufferOffset

func (r SessionSetupRequestDecoder) SecurityBufferOffset() uint16

func (SessionSetupRequestDecoder) SecurityMode

func (r SessionSetupRequestDecoder) SecurityMode() uint8

func (SessionSetupRequestDecoder) StructureSize

func (r SessionSetupRequestDecoder) StructureSize() uint16

type SessionSetupResponse

type SessionSetupResponse struct {
	PacketHeader

	SessionFlags   uint16
	SecurityBuffer []byte
}

func (*SessionSetupResponse) Encode

func (c *SessionSetupResponse) Encode(pkt []byte)

func (*SessionSetupResponse) Header

func (c *SessionSetupResponse) Header() *PacketHeader

func (*SessionSetupResponse) Size

func (c *SessionSetupResponse) Size() int

type SessionSetupResponseDecoder

type SessionSetupResponseDecoder []byte

func (SessionSetupResponseDecoder) IsInvalid

func (r SessionSetupResponseDecoder) IsInvalid() bool

func (SessionSetupResponseDecoder) SecurityBuffer

func (r SessionSetupResponseDecoder) SecurityBuffer() []byte

func (SessionSetupResponseDecoder) SecurityBufferLength

func (r SessionSetupResponseDecoder) SecurityBufferLength() uint16

func (SessionSetupResponseDecoder) SecurityBufferOffset

func (r SessionSetupResponseDecoder) SecurityBufferOffset() uint16

func (SessionSetupResponseDecoder) SessionFlags

func (r SessionSetupResponseDecoder) SessionFlags() uint16

func (SessionSetupResponseDecoder) StructureSize

func (r SessionSetupResponseDecoder) StructureSize() uint16

type SetInfoRequest

type SetInfoRequest struct {
	PacketHeader

	InfoType              uint8
	FileInfoClass         uint8
	AdditionalInformation uint32
	FileId                *FileId
	Input                 Encoder
}

func (*SetInfoRequest) Encode

func (c *SetInfoRequest) Encode(pkt []byte)

func (*SetInfoRequest) Header

func (c *SetInfoRequest) Header() *PacketHeader

func (*SetInfoRequest) Size

func (c *SetInfoRequest) Size() int

type SetInfoRequestDecoder

type SetInfoRequestDecoder []byte

func (SetInfoRequestDecoder) AdditionalInformation

func (r SetInfoRequestDecoder) AdditionalInformation() uint32

func (SetInfoRequestDecoder) BufferLength

func (r SetInfoRequestDecoder) BufferLength() uint32

func (SetInfoRequestDecoder) BufferOffset

func (r SetInfoRequestDecoder) BufferOffset() uint16

func (SetInfoRequestDecoder) FileId

func (SetInfoRequestDecoder) FileInfoClass

func (r SetInfoRequestDecoder) FileInfoClass() uint8

func (SetInfoRequestDecoder) InfoType

func (r SetInfoRequestDecoder) InfoType() uint8

func (SetInfoRequestDecoder) IsInvalid

func (r SetInfoRequestDecoder) IsInvalid() bool

func (SetInfoRequestDecoder) StructureSize

func (r SetInfoRequestDecoder) StructureSize() uint16

type SetInfoResponse

type SetInfoResponse struct {
	PacketHeader
}

func (*SetInfoResponse) Encode

func (c *SetInfoResponse) Encode(pkt []byte)

func (*SetInfoResponse) Header

func (c *SetInfoResponse) Header() *PacketHeader

func (*SetInfoResponse) Size

func (c *SetInfoResponse) Size() int

type SetInfoResponseDecoder

type SetInfoResponseDecoder []byte

func (SetInfoResponseDecoder) IsInvalid

func (r SetInfoResponseDecoder) IsInvalid() bool

func (SetInfoResponseDecoder) StructureSize

func (r SetInfoResponseDecoder) StructureSize() uint16

type Sid

type Sid struct {
	Revision            uint8
	IdentifierAuthority uint64
	SubAuthority        []uint32
}

func (*Sid) Encode

func (sid *Sid) Encode(p []byte)

func (*Sid) Size

func (sid *Sid) Size() int

func (*Sid) String

func (sid *Sid) String() string

type SidDecoder

type SidDecoder []byte

func (SidDecoder) Decode

func (c SidDecoder) Decode() *Sid

func (SidDecoder) IdentifierAuthority

func (c SidDecoder) IdentifierAuthority() uint64

func (SidDecoder) IsInvalid

func (c SidDecoder) IsInvalid() bool

func (SidDecoder) Revision

func (c SidDecoder) Revision() uint8

func (SidDecoder) SubAuthority

func (c SidDecoder) SubAuthority() []uint32

func (SidDecoder) SubAuthorityCount

func (c SidDecoder) SubAuthorityCount() uint8

type SmallBufferErrorResponse

type SmallBufferErrorResponse struct {
	RequiredBufferLength uint32
}

func (*SmallBufferErrorResponse) Encode

func (c *SmallBufferErrorResponse) Encode(p []byte)

func (*SmallBufferErrorResponse) Size

func (c *SmallBufferErrorResponse) Size() int

type SmallBufferErrorResponseDecoder

type SmallBufferErrorResponseDecoder []byte

func (SmallBufferErrorResponseDecoder) IsInvalid

func (r SmallBufferErrorResponseDecoder) IsInvalid() bool

func (SmallBufferErrorResponseDecoder) RequiredBufferLength

func (r SmallBufferErrorResponseDecoder) RequiredBufferLength() uint32

type SrvCopychunk

type SrvCopychunk struct {
	SourceOffset int64
	TargetOffset int64
	Length       uint32
}

func (*SrvCopychunk) Encode

func (c *SrvCopychunk) Encode(p []byte)

func (*SrvCopychunk) Size

func (c *SrvCopychunk) Size() int

type SrvCopychunkCopy

type SrvCopychunkCopy struct {
	SourceKey [24]byte
	Chunks    []*SrvCopychunk
}

func (*SrvCopychunkCopy) Encode

func (c *SrvCopychunkCopy) Encode(p []byte)

func (*SrvCopychunkCopy) Size

func (c *SrvCopychunkCopy) Size() int

type SrvCopychunkResponseDecoder

type SrvCopychunkResponseDecoder []byte

func (SrvCopychunkResponseDecoder) ChunksBytesWritten

func (c SrvCopychunkResponseDecoder) ChunksBytesWritten() uint32

func (SrvCopychunkResponseDecoder) ChunksWritten

func (c SrvCopychunkResponseDecoder) ChunksWritten() uint32

func (SrvCopychunkResponseDecoder) IsInvalid

func (c SrvCopychunkResponseDecoder) IsInvalid() bool

func (SrvCopychunkResponseDecoder) TotalBytesWritten

func (c SrvCopychunkResponseDecoder) TotalBytesWritten() uint32

type SrvRequestResumeKeyResponseDecoder

type SrvRequestResumeKeyResponseDecoder []byte

func (SrvRequestResumeKeyResponseDecoder) Context

func (SrvRequestResumeKeyResponseDecoder) ContextLength

func (c SrvRequestResumeKeyResponseDecoder) ContextLength() uint32

func (SrvRequestResumeKeyResponseDecoder) IsInvalid

func (SrvRequestResumeKeyResponseDecoder) ResumeKey

func (c SrvRequestResumeKeyResponseDecoder) ResumeKey() []byte

type SymbolicLinkErrorResponse

type SymbolicLinkErrorResponse struct {
	UnparsedPathLength uint16
	Flags              uint32
	SubstituteName     string
	PrintName          string
}

func (*SymbolicLinkErrorResponse) Encode

func (c *SymbolicLinkErrorResponse) Encode(p []byte)

func (*SymbolicLinkErrorResponse) Size

func (c *SymbolicLinkErrorResponse) Size() int

type SymbolicLinkErrorResponseDecoder

type SymbolicLinkErrorResponseDecoder []byte

func (SymbolicLinkErrorResponseDecoder) Flags

func (SymbolicLinkErrorResponseDecoder) IsInvalid

func (r SymbolicLinkErrorResponseDecoder) IsInvalid() bool

func (SymbolicLinkErrorResponseDecoder) PathBuffer

func (r SymbolicLinkErrorResponseDecoder) PathBuffer() []byte

func (SymbolicLinkErrorResponseDecoder) PrintName

func (SymbolicLinkErrorResponseDecoder) PrintNameLength

func (r SymbolicLinkErrorResponseDecoder) PrintNameLength() uint16

func (SymbolicLinkErrorResponseDecoder) PrintNameOffset

func (r SymbolicLinkErrorResponseDecoder) PrintNameOffset() uint16

func (SymbolicLinkErrorResponseDecoder) ReparseDataLength

func (r SymbolicLinkErrorResponseDecoder) ReparseDataLength() uint16

func (SymbolicLinkErrorResponseDecoder) ReparseTag

func (SymbolicLinkErrorResponseDecoder) SplitUnparsedPath

func (r SymbolicLinkErrorResponseDecoder) SplitUnparsedPath(name string) (string, string)

func (SymbolicLinkErrorResponseDecoder) SubstituteName

func (r SymbolicLinkErrorResponseDecoder) SubstituteName() string

func (SymbolicLinkErrorResponseDecoder) SubstituteNameLength

func (r SymbolicLinkErrorResponseDecoder) SubstituteNameLength() uint16

func (SymbolicLinkErrorResponseDecoder) SubstituteNameOffset

func (r SymbolicLinkErrorResponseDecoder) SubstituteNameOffset() uint16

func (SymbolicLinkErrorResponseDecoder) SymLinkErrorTag

func (r SymbolicLinkErrorResponseDecoder) SymLinkErrorTag() uint32

func (SymbolicLinkErrorResponseDecoder) SymLinkLength

func (r SymbolicLinkErrorResponseDecoder) SymLinkLength() uint32

func (SymbolicLinkErrorResponseDecoder) UnparsedPathLength

func (r SymbolicLinkErrorResponseDecoder) UnparsedPathLength() uint16

type SymbolicLinkReparseDataBuffer

type SymbolicLinkReparseDataBuffer struct {
	Flags          uint32
	SubstituteName string
	PrintName      string
}

func (*SymbolicLinkReparseDataBuffer) Encode

func (c *SymbolicLinkReparseDataBuffer) Encode(p []byte)

func (*SymbolicLinkReparseDataBuffer) Size

type SymbolicLinkReparseDataBufferDecoder

type SymbolicLinkReparseDataBufferDecoder []byte

func (SymbolicLinkReparseDataBufferDecoder) Flags

func (SymbolicLinkReparseDataBufferDecoder) IsInvalid

func (SymbolicLinkReparseDataBufferDecoder) PathBuffer

func (c SymbolicLinkReparseDataBufferDecoder) PathBuffer() []byte

func (SymbolicLinkReparseDataBufferDecoder) PrintName

func (SymbolicLinkReparseDataBufferDecoder) PrintNameLength

func (c SymbolicLinkReparseDataBufferDecoder) PrintNameLength() uint16

func (SymbolicLinkReparseDataBufferDecoder) PrintNameOffset

func (c SymbolicLinkReparseDataBufferDecoder) PrintNameOffset() uint16

func (SymbolicLinkReparseDataBufferDecoder) ReparseDataLength

func (c SymbolicLinkReparseDataBufferDecoder) ReparseDataLength() uint16

func (SymbolicLinkReparseDataBufferDecoder) ReparseTag

func (SymbolicLinkReparseDataBufferDecoder) SubstituteName

func (c SymbolicLinkReparseDataBufferDecoder) SubstituteName() string

func (SymbolicLinkReparseDataBufferDecoder) SubstituteNameLength

func (c SymbolicLinkReparseDataBufferDecoder) SubstituteNameLength() uint16

func (SymbolicLinkReparseDataBufferDecoder) SubstituteNameOffset

func (c SymbolicLinkReparseDataBufferDecoder) SubstituteNameOffset() uint16

type TransformCodec

type TransformCodec []byte

func (TransformCodec) AssociatedData

func (p TransformCodec) AssociatedData() []byte

func (TransformCodec) EncryptedData

func (p TransformCodec) EncryptedData() []byte

func (TransformCodec) EncryptionAlgorithm

func (p TransformCodec) EncryptionAlgorithm() uint16

func (TransformCodec) Flags

func (t TransformCodec) Flags() uint16

func (TransformCodec) IsInvalid

func (p TransformCodec) IsInvalid() bool

func (TransformCodec) Nonce

func (p TransformCodec) Nonce() []byte

func (TransformCodec) OriginalMessageSize

func (p TransformCodec) OriginalMessageSize() uint32

func (TransformCodec) ProtocolId

func (p TransformCodec) ProtocolId() []byte

func (TransformCodec) SessionId

func (p TransformCodec) SessionId() uint64

func (TransformCodec) SetEncryptionAlgorithm

func (p TransformCodec) SetEncryptionAlgorithm(u uint16)

func (TransformCodec) SetFlags

func (t TransformCodec) SetFlags(u uint16)

func (TransformCodec) SetNonce

func (p TransformCodec) SetNonce(bs []byte)

func (TransformCodec) SetOriginalMessageSize

func (p TransformCodec) SetOriginalMessageSize(u uint32)

func (TransformCodec) SetProtocolId

func (p TransformCodec) SetProtocolId()

func (TransformCodec) SetSessionId

func (p TransformCodec) SetSessionId(u uint64)

func (TransformCodec) SetSignature

func (p TransformCodec) SetSignature(bs []byte)

func (TransformCodec) Signature

func (p TransformCodec) Signature() []byte

type TreeConnectRequest

type TreeConnectRequest struct {
	PacketHeader

	Flags uint16
	Path  string
}

func (*TreeConnectRequest) Encode

func (c *TreeConnectRequest) Encode(pkt []byte)

func (*TreeConnectRequest) Header

func (c *TreeConnectRequest) Header() *PacketHeader

func (*TreeConnectRequest) Size

func (c *TreeConnectRequest) Size() int

type TreeConnectRequestDecoder

type TreeConnectRequestDecoder []byte

func (TreeConnectRequestDecoder) Flags

func (TreeConnectRequestDecoder) IsInvalid

func (r TreeConnectRequestDecoder) IsInvalid() bool

func (TreeConnectRequestDecoder) Path

func (TreeConnectRequestDecoder) PathLength

func (r TreeConnectRequestDecoder) PathLength() uint16

func (TreeConnectRequestDecoder) PathOffset

func (r TreeConnectRequestDecoder) PathOffset() uint16

func (TreeConnectRequestDecoder) StructureSize

func (r TreeConnectRequestDecoder) StructureSize() uint16

type TreeConnectResponse

type TreeConnectResponse struct {
	PacketHeader

	ShareType     uint8
	ShareFlags    uint32
	Capabilities  uint32
	MaximalAccess uint32
}

func (*TreeConnectResponse) Encode

func (c *TreeConnectResponse) Encode(pkt []byte)

func (*TreeConnectResponse) Header

func (c *TreeConnectResponse) Header() *PacketHeader

func (*TreeConnectResponse) Size

func (c *TreeConnectResponse) Size() int

type TreeConnectResponseDecoder

type TreeConnectResponseDecoder []byte

func (TreeConnectResponseDecoder) Capabilities

func (r TreeConnectResponseDecoder) Capabilities() uint32

func (TreeConnectResponseDecoder) IsInvalid

func (r TreeConnectResponseDecoder) IsInvalid() bool

func (TreeConnectResponseDecoder) MaximalAccess

func (r TreeConnectResponseDecoder) MaximalAccess() uint32

func (TreeConnectResponseDecoder) ShareFlags

func (r TreeConnectResponseDecoder) ShareFlags() uint32

func (TreeConnectResponseDecoder) ShareType

func (r TreeConnectResponseDecoder) ShareType() uint8

func (TreeConnectResponseDecoder) StructureSize

func (r TreeConnectResponseDecoder) StructureSize() uint16

type TreeDisconnectRequest

type TreeDisconnectRequest struct {
	PacketHeader
}

func (*TreeDisconnectRequest) Encode

func (c *TreeDisconnectRequest) Encode(pkt []byte)

func (*TreeDisconnectRequest) Header

func (c *TreeDisconnectRequest) Header() *PacketHeader

func (*TreeDisconnectRequest) Size

func (c *TreeDisconnectRequest) Size() int

type TreeDisconnectRequestDecoder

type TreeDisconnectRequestDecoder []byte

func (TreeDisconnectRequestDecoder) IsInvalid

func (r TreeDisconnectRequestDecoder) IsInvalid() bool

func (TreeDisconnectRequestDecoder) StructureSize

func (r TreeDisconnectRequestDecoder) StructureSize() uint16

type TreeDisconnectResponse

type TreeDisconnectResponse struct {
	PacketHeader
}

func (*TreeDisconnectResponse) Encode

func (c *TreeDisconnectResponse) Encode(pkt []byte)

func (*TreeDisconnectResponse) Header

func (c *TreeDisconnectResponse) Header() *PacketHeader

func (*TreeDisconnectResponse) Size

func (c *TreeDisconnectResponse) Size() int

type TreeDisconnectResponseDecoder

type TreeDisconnectResponseDecoder []byte

func (TreeDisconnectResponseDecoder) IsInvalid

func (r TreeDisconnectResponseDecoder) IsInvalid() bool

func (TreeDisconnectResponseDecoder) StructureSize

func (r TreeDisconnectResponseDecoder) StructureSize() uint16

type WriteRequest

type WriteRequest struct {
	PacketHeader

	FileId           *FileId
	Flags            uint32
	Channel          uint32
	RemainingBytes   uint32
	Offset           uint64
	WriteChannelInfo []Encoder
	Data             []byte
}

func (*WriteRequest) Encode

func (c *WriteRequest) Encode(pkt []byte)

func (*WriteRequest) Header

func (c *WriteRequest) Header() *PacketHeader

func (*WriteRequest) Size

func (c *WriteRequest) Size() int

type WriteRequestDecoder

type WriteRequestDecoder []byte

func (WriteRequestDecoder) Channel

func (r WriteRequestDecoder) Channel() uint32

func (WriteRequestDecoder) DataOffset

func (r WriteRequestDecoder) DataOffset() uint16

func (WriteRequestDecoder) FileId

func (WriteRequestDecoder) Flags

func (r WriteRequestDecoder) Flags() uint32

func (WriteRequestDecoder) IsInvalid

func (r WriteRequestDecoder) IsInvalid() bool

func (WriteRequestDecoder) Length

func (r WriteRequestDecoder) Length() uint32

func (WriteRequestDecoder) Offset

func (r WriteRequestDecoder) Offset() uint64

func (WriteRequestDecoder) RemainingBytes

func (r WriteRequestDecoder) RemainingBytes() uint32

func (WriteRequestDecoder) StructureSize

func (r WriteRequestDecoder) StructureSize() uint16

func (WriteRequestDecoder) WriteChannelInfoLength

func (r WriteRequestDecoder) WriteChannelInfoLength() uint16

func (WriteRequestDecoder) WriteChannelInfoOffset

func (r WriteRequestDecoder) WriteChannelInfoOffset() uint16

type WriteResponse

type WriteResponse struct {
	PacketHeader

	Count     uint32
	Remaining uint32
}

func (*WriteResponse) Encode

func (c *WriteResponse) Encode(pkt []byte)

func (*WriteResponse) Header

func (c *WriteResponse) Header() *PacketHeader

func (*WriteResponse) Size

func (c *WriteResponse) Size() int

type WriteResponseDecoder

type WriteResponseDecoder []byte

func (WriteResponseDecoder) Count

func (r WriteResponseDecoder) Count() uint32

func (WriteResponseDecoder) IsInvalid

func (r WriteResponseDecoder) IsInvalid() bool

func (WriteResponseDecoder) Remaining

func (r WriteResponseDecoder) Remaining() uint32

func (WriteResponseDecoder) StructureSize

func (r WriteResponseDecoder) StructureSize() uint16

func (WriteResponseDecoder) WriteChannelInfoLength

func (r WriteResponseDecoder) WriteChannelInfoLength() uint16

func (WriteResponseDecoder) WriteChannelInfoOffset

func (r WriteResponseDecoder) WriteChannelInfoOffset() uint16

Jump to

Keyboard shortcuts

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