smbdialect

package
v0.0.0-...-c8c792b Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package smbdialect defines SMB dialect revision numbers.

Index

Constants

View Source
const (
	SMB311   = 0x0311 // SMB 3.1.1
	SMB302   = 0x0302 // SMB 3.0.2
	SMB3     = 0x0300 // SMB 3.0
	SMB21    = 0x0210 // SMB 2.1
	SMB202   = 0x0202 // SMB 2.0.2
	Wildcard = 0x02FF // SMB 2.???
)

SMB dialect revision numbers.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List []byte

List interprets a slice of bytes as an SMB dialect list.

func (List) Contains

func (k List) Contains(r Revision) bool

Contains returns true if k contains r.

func (List) Count

func (k List) Count() int

Count returns the number of dialects present in the list.

func (List) Member

func (k List) Member(i int) Revision

Member returns the member from the list at position i.

func (List) SetMember

func (k List) SetMember(i int, r Revision)

SetMember updates the member of the list at position i.

type Revision

type Revision uint16

Revision is an SMB dialect revision number.

func (Revision) Major

func (r Revision) Major() int

Major returns the major protocol revision number of r.

func (Revision) Minor

func (r Revision) Minor() int

Minor returns the minor protocol revision number of r.

func (Revision) Patch

func (r Revision) Patch() int

Patch returns the patch protocol revision number of r.

func (Revision) String

func (r Revision) String() string

String returns a string representation of the dialect revision number.

type State

type State Revision

State holds the SMB dialect negotiation state for a connection. It holds values for the Connection.NegotiateDialect variable in the SMB protocol.

https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/fac3655a-7eb5-4337-b0ab-244bbcd014e8

const Uninitialized State = 0xFFFF

Uninitialized is the starting dialect negotiation state.

func (State) CanTransition

func (s State) CanTransition(next State) (ok bool)

CanTransition returns true if s can transition to next.

func (State) Ready

func (s State) Ready() bool

Ready returns true if s is in a completed negotiation

func (State) Revision

func (s State) Revision() Revision

Revision returns the SMB dialect revision currently negotiated by s.

func (State) String

func (s State) String() string

String returns a string representation of the dialect state.

Jump to

Keyboard shortcuts

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