smbcap

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: 1 Imported by: 0

Documentation

Overview

Package smbcap defines SMB capability flags.

Index

Constants

View Source
const (
	// DFS indicates support for Distributed File System
	DFS = 0x00000001 // SMB2_GLOBAL_CAP_DFS

	// Leasing indicates support for leasing.
	Leasing = 0x00000002 // SMB2_GLOBAL_CAP_LEASING

	// LargeMTU indicates support for multi-credit operations.
	LargeMTU = 0x00000004 // SMB2_GLOBAL_CAP_LARGE_MTU

	// MultiChannel indicates support for a single session having multiple
	// channels.
	MultiChannel = 0x00000008 // SMB2_GLOBAL_CAP_MULTI_CHANNEL

	// PersistentHandles indicates support for persistent handles.
	PersistentHandles = 0x00000010 // SMB2_GLOBAL_CAP_PERSISTENT_HANDLES

	// DirectoryLeasing indicates support for directory leasing.
	DirectoryLeasing = 0x00000020 // SMB2_GLOBAL_CAP_DIRECTORY_LEASING

	// Encryption indicates support for encrypted packets.
	Encryption = 0x00000040 // SMB2_GLOBAL_CAP_ENCRYPTION
)

Variables

View Source
var GoNames = Format{
	DFS:               "DFS",
	Leasing:           "Leasing",
	LargeMTU:          "LargeMTU",
	MultiChannel:      "MultiChannel",
	PersistentHandles: "PersistentHandles",
	DirectoryLeasing:  "DirectoryLeasing",
	Encryption:        "Encryption",
}

GoNames maps individual flags to their Go-style names.

View Source
var ProtoNames = Format{
	DFS:               "SMB2_GLOBAL_CAP_DFS",
	Leasing:           "SMB2_GLOBAL_CAP_LEASING",
	LargeMTU:          "SMB2_GLOBAL_CAP_LARGE_MTU",
	MultiChannel:      "SMB2_GLOBAL_CAP_MULTI_CHANNEL",
	PersistentHandles: "SMB2_GLOBAL_CAP_PERSISTENT_HANDLES",
	DirectoryLeasing:  "SMB2_GLOBAL_CAP_DIRECTORY_LEASING",
	Encryption:        "SMB2_GLOBAL_CAP_ENCRYPTION",
}

ProtoNames maps individual flags to their names as defined by the SMB protocol specification.

Functions

This section is empty.

Types

type Flags

type Flags uint32

Flags declares which optional SMB2 features are supported during protocol negotiation.

func (Flags) Format

func (f Flags) Format(sep string, format Format) string

Format returns a string representation of the capability flags using the given separator and format.

func (Flags) Match

func (f Flags) Match(c Flags) bool

Match reports whether f contains all of the capabilities specified by c.

func (Flags) String

func (f Flags) String() string

String returns a string representation of the capability flags.

type Format

type Format map[Flags]string

Format describes a set of names for SMB capability flags.

Jump to

Keyboard shortcuts

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