Generated from Manticore v1.1.5 • 201 packages. View on pkg.go.dev

subcommands

import "github.com/TheManticoreProject/Manticore/network/smb/smb_v10/subcommands"

Index

Constants

CompletionFilter flags for the NT_TRANSACT_NOTIFY_CHANGE setup ([MS-CIFS] section 2.2.7.4.1): the set of change events the client wants to be notified about.

const (
    FILE_NOTIFY_CHANGE_FILE_NAME    uint32 = 0x00000001
    FILE_NOTIFY_CHANGE_DIR_NAME     uint32 = 0x00000002
    FILE_NOTIFY_CHANGE_NAME         uint32 = 0x00000003
    FILE_NOTIFY_CHANGE_ATTRIBUTES   uint32 = 0x00000004
    FILE_NOTIFY_CHANGE_SIZE         uint32 = 0x00000008
    FILE_NOTIFY_CHANGE_LAST_WRITE   uint32 = 0x00000010
    FILE_NOTIFY_CHANGE_LAST_ACCESS  uint32 = 0x00000020
    FILE_NOTIFY_CHANGE_CREATION     uint32 = 0x00000040
    FILE_NOTIFY_CHANGE_EA           uint32 = 0x00000080
    FILE_NOTIFY_CHANGE_SECURITY     uint32 = 0x00000100
    FILE_NOTIFY_CHANGE_STREAM_NAME  uint32 = 0x00000200
    FILE_NOTIFY_CHANGE_STREAM_SIZE  uint32 = 0x00000400
    FILE_NOTIFY_CHANGE_STREAM_WRITE uint32 = 0x00000800
)

FILE_ACTION_* values for FileNotifyInformation.Action ([MS-FSCC] section 2.7.1): the kind of change that occurred to the named object.

const (
    FILE_ACTION_ADDED            uint32 = 0x00000001
    FILE_ACTION_REMOVED          uint32 = 0x00000002
    FILE_ACTION_MODIFIED         uint32 = 0x00000003
    FILE_ACTION_RENAMED_OLD_NAME uint32 = 0x00000004
    FILE_ACTION_RENAMED_NEW_NAME uint32 = 0x00000005
)

SecurityInformation flags ([MS-CIFS] sections 2.2.7.3.1 / 2.2.7.6.1): which parts of the security descriptor a query or set operation applies to. They may be OR-ed together.

const (
    OWNER_SECURITY_INFORMATION uint32 = 0x00000001
    GROUP_SECURITY_INFORMATION uint32 = 0x00000002
    DACL_SECURITY_INFORMATION  uint32 = 0x00000004
    SACL_SECURITY_INFORMATION  uint32 = 0x00000008
)

MS-SMB server-side data copy ([MS-SMB] section 2.2.7.2 and 3.2.4.3 / 3.3.5.11): the client opens the source and destination files, requests a copychunk resume key for the source via FSCTL_SRV_REQUEST_RESUME_KEY, then issues FSCTL_SRV_COPYCHUNK against the destination. Both FSCTLs are carried as the NT_TRANSACT_IOCTL FunctionCode of an SMB_COM_NT_TRANSACT request, with the structures below as the NT_Trans_Data payload.

const (
    // FSCTL_SRV_REQUEST_RESUME_KEY requests the 24-byte copychunk resume key that uniquely
    // identifies the open source file ([MS-SMB] section 2.2.7.2).
    FSCTL_SRV_REQUEST_RESUME_KEY uint32 = 0x00140078

    // FSCTL_SRV_COPYCHUNK performs a server-side copy of one or more chunks from the source
    // file (identified by the resume key) into the destination file ([MS-SMB] section 2.2.7.2).
    FSCTL_SRV_COPYCHUNK uint32 = 0x001440F2
)

CopychunkResumeKeyLength is the fixed size, in bytes, of a copychunk resume key ([MS-SMB] section 2.2.7.2.2.2): an opaque server-generated value the client echoes back in the FSCTL_SRV_COPYCHUNK request.

const CopychunkResumeKeyLength = 24

FSCTL_SRV_ENUMERATE_SNAPSHOTS enumerates the available previous-version (snapshot / shadow-copy) timestamps of an open file or directory ([MS-SMB] section 2.2.7.3). Like the copychunk FSCTLs, it is carried as the NT_TRANSACT_IOCTL FunctionCode of an SMB_COM_NT_TRANSACT request; the SrvSnapshotArray below is the response NT_Trans_Data.

const FSCTL_SRV_ENUMERATE_SNAPSHOTS uint32 = 0x00144064

Variables

var NtTransactSubcommandsToString = map[NtTransactSubcommand]string{
    NT_TRANSACT_CREATE:              "CREATE",
    NT_TRANSACT_IOCTL:               "IOCTL",
    NT_TRANSACT_SET_SECURITY_DESC:   "SET_SECURITY_DESC",
    NT_TRANSACT_NOTIFY_CHANGE:       "NOTIFY_CHANGE",
    NT_TRANSACT_RENAME:              "RENAME",
    NT_TRANSACT_QUERY_SECURITY_DESC: "QUERY_SECURITY_DESC",
    NT_TRANSACT_QUERY_QUOTA:         "QUERY_QUOTA",
    NT_TRANSACT_SET_QUOTA:           "SET_QUOTA",
}
var Transaction2SubcommandsToString = map[Transaction2Subcommand]string{
    TRANS2_OPEN2:                    "OPEN2",
    TRANS2_FIND_FIRST2:              "FIND_FIRST2",
    TRANS2_FIND_NEXT2:               "FIND_NEXT2",
    TRANS2_QUERY_FS_INFORMATION:     "QUERY_FS_INFORMATION",
    TRANS2_SET_FS_INFORMATION:       "SET_FS_INFORMATION",
    TRANS2_QUERY_PATH_INFORMATION:   "QUERY_PATH_INFORMATION",
    TRANS2_SET_PATH_INFORMATION:     "SET_PATH_INFORMATION",
    TRANS2_QUERY_FILE_INFORMATION:   "QUERY_FILE_INFORMATION",
    TRANS2_SET_FILE_INFORMATION:     "SET_FILE_INFORMATION",
    TRANS2_FSCTL:                    "FSCTL",
    TRANS2_IOCTL2:                   "IOCTL2",
    TRANS2_FIND_NOTIFY_FIRST:        "FIND_NOTIFY_FIRST",
    TRANS2_FIND_NOTIFY_NEXT:         "FIND_NOTIFY_NEXT",
    TRANS2_CREATE_DIRECTORY:         "CREATE_DIRECTORY",
    TRANS2_SESSION_SETUP:            "SESSION_SETUP",
    TRANS2_GET_DFS_REFERRAL:         "GET_DFS_REFERRAL",
    TRANS2_REPORT_DFS_INCONSISTENCY: "REPORT_DFS_INCONSISTENCY",
}
var TransactionSubcommandsToString = map[TransactionSubcommand]string{
    TRANS_SET_NMPIPE_STATE:   "SET_NMPIPE_STATE",
    TRANS_RAW_READ_NMPIPE:    "RAW_READ_NMPIPE",
    TRANS_QUERY_NMPIPE_STATE: "QUERY_NMPIPE_STATE",
    TRANS_QUERY_NMPIPE_INFO:  "QUERY_NMPIPE_INFO",
    TRANS_PEEK_NMPIPE:        "PEEK_NMPIPE",
    TRANS_TRANSACT_NMPIPE:    "TRANSACT_NMPIPE",
    TRANS_RAW_WRITE_NMPIPE:   "RAW_WRITE_NMPIPE",
    TRANS_READ_NMPIPE:        "READ_NMPIPE",
    TRANS_WRITE_NMPIPE:       "WRITE_NMPIPE",
    TRANS_WAIT_NMPIPE:        "WAIT_NMPIPE",
    TRANS_CALL_NMPIPE:        "CALL_NMPIPE",
}

func MarshalFileNotifyInformationList

func MarshalFileNotifyInformationList(items []FileNotifyInformation) ([]byte, error)

MarshalFileNotifyInformationList serializes the NT_TRANSACT_NOTIFY_CHANGE response NT_Trans_Parameters: a chained list of FILE_NOTIFY_INFORMATION records. Each record’s NextEntryOffset is computed (4-byte aligned) so the list is correctly linked, with the final record’s NextEntryOffset set to zero.

type FileGetQuotaInformation

FileGetQuotaInformation is a single SID entry in the SidList of an NT_TRANSACT_QUERY_QUOTA request ([MS-FSCC] section 2.4.41.1 FILE_GET_QUOTA_INFORMATION). SidLength is derived from len(Sid) on marshal.

type FileGetQuotaInformation struct {
    // NextEntryOffset (4 bytes): byte offset to the next entry, or zero if this is the last.
    NextEntryOffset uint32
    // Sid (variable): the SID whose quota is requested.
    Sid []byte
}

func (*FileGetQuotaInformation) Marshal

func (e *FileGetQuotaInformation) Marshal() ([]byte, error)

Marshal serializes the FILE_GET_QUOTA_INFORMATION entry.

func (*FileGetQuotaInformation) Unmarshal

func (e *FileGetQuotaInformation) Unmarshal(data []byte) (int, error)

Unmarshal parses a FILE_GET_QUOTA_INFORMATION entry, returning the bytes consumed.

type FileNotifyInformation

FileNotifyInformation is one changed-object record returned in the NT_TRANSACT_NOTIFY_CHANGE response ([MS-FSCC] section 2.7.1). FileNameLength (in octets) is derived from FileName on marshal.

type FileNotifyInformation struct {
    // NextEntryOffset (4 bytes): octet offset from the start of this record to the next, or
    // zero for the last record. Always a multiple of 4. Set by MarshalFileNotifyInformationList.
    NextEntryOffset uint32
    // Action (4 bytes): the change that occurred (FILE_ACTION_* value).
    Action uint32
    // FileName: the changed object's name, relative to the watched directory (UTF-16LE on
    // the wire, not NUL-terminated).
    FileName string
}

func ParseFileNotifyInformationList

func ParseFileNotifyInformationList(data []byte) ([]FileNotifyInformation, error)

ParseFileNotifyInformationList parses the NT_TRANSACT_NOTIFY_CHANGE response NT_Trans_Parameters into its FILE_NOTIFY_INFORMATION records, following NextEntryOffset until it is zero or the buffer is exhausted.

func (*FileNotifyInformation) Marshal

func (f *FileNotifyInformation) Marshal() ([]byte, error)

Marshal serializes a single FILE_NOTIFY_INFORMATION record (NextEntryOffset is emitted from the field as-is; use MarshalFileNotifyInformationList to chain a list).

func (*FileNotifyInformation) Unmarshal

func (f *FileNotifyInformation) Unmarshal(data []byte) (int, error)

Unmarshal parses a single FILE_NOTIFY_INFORMATION record, returning the number of octets the record itself occupies (header + FileName, ignoring any trailing alignment padding).

type FileQuotaInformation

FileQuotaInformation is a single user’s quota record ([MS-FSCC] section 2.4.41 FILE_QUOTA_INFORMATION). It is the NT_Trans_Data record of an NT_TRANSACT_QUERY_QUOTA response and the record a client sends in an NT_TRANSACT_SET_QUOTA request. SidLength is derived from len(Sid) on marshal. QuotaThreshold/QuotaLimit may be -1 (no limit) and QuotaLimit may be -2 (delete the entry), hence the signed types.

type FileQuotaInformation struct {
    // NextEntryOffset (4 bytes): byte offset to the next entry, or zero if this is the last.
    NextEntryOffset uint32
    // ChangeTime (8 bytes): last time the quota was changed (FILETIME). Ignored on set.
    ChangeTime uint64
    // QuotaUsed (8 bytes): bytes of quota used by this user.
    QuotaUsed int64
    // QuotaThreshold (8 bytes): warning threshold in bytes, or -1 for none.
    QuotaThreshold int64
    // QuotaLimit (8 bytes): quota limit in bytes, -1 for none, or -2 to delete the entry.
    QuotaLimit int64
    // Sid (variable): the SID this quota applies to.
    Sid []byte
}

func ParseFileQuotaInformationList

func ParseFileQuotaInformationList(data []byte) ([]FileQuotaInformation, error)

ParseFileQuotaInformationList parses the NT_TRANSACT_QUERY_QUOTA response NT_Trans_Data into its FILE_QUOTA_INFORMATION records, following NextEntryOffset until it is zero or the buffer is exhausted.

func (*FileQuotaInformation) Marshal

func (q *FileQuotaInformation) Marshal() ([]byte, error)

Marshal serializes the FILE_QUOTA_INFORMATION record.

func (*FileQuotaInformation) Unmarshal

func (q *FileQuotaInformation) Unmarshal(data []byte) (int, error)

Unmarshal parses a FILE_QUOTA_INFORMATION record, returning the bytes consumed.

type NtTransQueryQuotaRequestParameters

NtTransQueryQuotaRequestParameters is the NT_Trans_Parameters of an NT_TRANSACT_QUERY_QUOTA request ([MS-SMB] section 2.2.7.5.1). At least one of SidListLength or StartSidLength MUST be zero; if both are zero, all SIDs are enumerated.

type NtTransQueryQuotaRequestParameters struct {
    // FID (2 bytes): the open file/directory whose object store's quota is queried.
    FID uint16
    // ReturnSingleEntry (1 byte): if non-zero, return only a single SID's quota.
    ReturnSingleEntry bool
    // RestartScan (1 byte): if non-zero, restart the quota scan.
    RestartScan bool
    // SidListLength (4 bytes): length of the NT_Trans_Data SidList, or zero.
    SidListLength uint32
    // StartSidLength (4 bytes): length of the single start-SID entry, or zero.
    StartSidLength uint32
    // StartSidOffset (4 bytes): offset, from the start of NT_Trans_Data, of the start SID.
    StartSidOffset uint32
}

func (*NtTransQueryQuotaRequestParameters) Marshal

func (p *NtTransQueryQuotaRequestParameters) Marshal() ([]byte, error)

Marshal serializes the 16-octet NT_Trans_Parameters block.

func (*NtTransQueryQuotaRequestParameters) Unmarshal

func (p *NtTransQueryQuotaRequestParameters) Unmarshal(data []byte) (int, error)

Unmarshal parses the 16-octet NT_Trans_Parameters block.

type NtTransQuotaResponseParameters

NtTransQuotaResponseParameters is the NT_Trans_Parameters of an NT_TRANSACT_QUERY_QUOTA response ([MS-SMB] section 2.2.7.5.2): the byte length of the returned quota data.

type NtTransQuotaResponseParameters struct {
    // DataLength (4 bytes): length of the returned quota information (equals TotalDataCount).
    DataLength uint32
}

func (*NtTransQuotaResponseParameters) Marshal

func (p *NtTransQuotaResponseParameters) Marshal() ([]byte, error)

Marshal serializes the 4-octet response parameter block.

func (*NtTransQuotaResponseParameters) Unmarshal

func (p *NtTransQuotaResponseParameters) Unmarshal(data []byte) (int, error)

Unmarshal parses the 4-octet response parameter block.

type NtTransactNotifyChangeSetup

NtTransactNotifyChangeSetup is the NT_Trans setup of an NT_TRANSACT_NOTIFY_CHANGE request ([MS-CIFS] section 2.2.7.4.1). The request carries no NT_Trans_Parameters or NT_Trans_Data.

type NtTransactNotifyChangeSetup struct {
    // CompletionFilter (4 bytes): the change events to monitor (FILE_NOTIFY_CHANGE_* flags).
    CompletionFilter uint32
    // FID (2 bytes): the open directory to monitor.
    FID uint16
    // WatchTree (1 byte): if true, all subdirectories below FID are also watched.
    WatchTree bool
    // Reserved (1 byte): MUST be 0x00.
    Reserved uint8
}

func (*NtTransactNotifyChangeSetup) Marshal

func (s *NtTransactNotifyChangeSetup) Marshal() ([]byte, error)

Marshal serializes the 8-octet NT_Trans setup.

func (*NtTransactNotifyChangeSetup) Unmarshal

func (s *NtTransactNotifyChangeSetup) Unmarshal(data []byte) (int, error)

Unmarshal parses the 8-octet NT_Trans setup.

type NtTransactQuerySecurityDescResponseParameters

NtTransactQuerySecurityDescResponseParameters is the NT_Trans_Parameters block of an NT_TRANSACT_QUERY_SECURITY_DESC response ([MS-CIFS] section 2.2.7.6.2). The descriptor itself is returned as the response NT_Trans_Data; if the client’s buffer was too small, LengthNeeded reports the required size and the NT_Trans_Data is empty.

type NtTransactQuerySecurityDescResponseParameters struct {
    // LengthNeeded (4 bytes): the length, in octets, of the returned (or required) descriptor.
    LengthNeeded uint32
}

func (*NtTransactQuerySecurityDescResponseParameters) Marshal

func (p *NtTransactQuerySecurityDescResponseParameters) Marshal() ([]byte, error)

Marshal serializes the 4-octet response parameter block.

func (*NtTransactQuerySecurityDescResponseParameters) Unmarshal

func (p *NtTransactQuerySecurityDescResponseParameters) Unmarshal(data []byte) (int, error)

Unmarshal parses the 4-octet response parameter block.

type NtTransactSecurityDescParameters

NtTransactSecurityDescParameters is the NT_Trans_Parameters block of an NT_TRANSACT_QUERY_SECURITY_DESC request ([MS-CIFS] section 2.2.7.6.1, where the last field is named SecurityInfoFields) and of an NT_TRANSACT_SET_SECURITY_DESC request ([MS-CIFS] section 2.2.7.3.1, SecurityInformation). The two requests share this layout; a set request additionally carries the SECURITY_DESCRIPTOR as its NT_Trans_Data, and a query response carries LengthNeeded (see NtTransactQuerySecurityDescResponseParameters) plus the descriptor as its NT_Trans_Data.

type NtTransactSecurityDescParameters struct {
    // FID (2 bytes): the open file whose security descriptor is queried or set.
    FID uint16
    // Reserved (2 bytes): MUST be 0x0000.
    Reserved uint16
    // SecurityInformation (4 bytes): the security-descriptor fields to query/set
    // (OWNER/GROUP/DACL/SACL_SECURITY_INFORMATION flags).
    SecurityInformation uint32
}

func (*NtTransactSecurityDescParameters) Marshal

func (p *NtTransactSecurityDescParameters) Marshal() ([]byte, error)

Marshal serializes the 8-octet NT_Trans_Parameters block.

func (*NtTransactSecurityDescParameters) Unmarshal

func (p *NtTransactSecurityDescParameters) Unmarshal(data []byte) (int, error)

Unmarshal parses the 8-octet NT_Trans_Parameters block.

type NtTransactSubcommand

type NtTransactSubcommand uint16
const (
    NT_TRANSACT_CREATE              NtTransactSubcommand = 0x0001
    NT_TRANSACT_IOCTL               NtTransactSubcommand = 0x0002
    NT_TRANSACT_SET_SECURITY_DESC   NtTransactSubcommand = 0x0003
    NT_TRANSACT_NOTIFY_CHANGE       NtTransactSubcommand = 0x0004
    NT_TRANSACT_RENAME              NtTransactSubcommand = 0x0005
    NT_TRANSACT_QUERY_SECURITY_DESC NtTransactSubcommand = 0x0006
    NT_TRANSACT_QUERY_QUOTA         NtTransactSubcommand = 0x0007
    NT_TRANSACT_SET_QUOTA           NtTransactSubcommand = 0x0008
)

func (NtTransactSubcommand) String

func (t NtTransactSubcommand) String() string

type SrvCopychunk

SrvCopychunk describes a single data range to copy server-side ([MS-SMB] section 2.2.7.2.1 SRV_COPYCHUNK). One or more are carried in the Chunks array of an SrvCopychunkCopy.

type SrvCopychunk struct {
    // SourceOffset (8 bytes): offset from the start of the source file to copy from.
    SourceOffset uint64
    // DestinationOffset (8 bytes): offset from the start of the destination file to copy to.
    DestinationOffset uint64
    // Length (4 bytes): number of bytes to copy.
    Length uint32
    // Reserved (4 bytes): MUST be zero and MUST be ignored on receipt.
    Reserved uint32
}

func (*SrvCopychunk) Marshal

func (c *SrvCopychunk) Marshal() ([]byte, error)

Marshal serializes the SRV_COPYCHUNK into its 24-byte little-endian wire form.

func (*SrvCopychunk) Unmarshal

func (c *SrvCopychunk) Unmarshal(data []byte) (int, error)

Unmarshal parses a 24-byte SRV_COPYCHUNK, returning the number of bytes consumed.

type SrvCopychunkCopy

SrvCopychunkCopy is the NT_Trans_Data of an FSCTL_SRV_COPYCHUNK request ([MS-SMB] section 2.2.7.2.1 SRV_COPYCHUNK_COPY). The on-the-wire ChunkCount is derived from the length of Chunks so the count and the array cannot disagree.

type SrvCopychunkCopy struct {
    // CopychunkResumeKey (24 bytes): the resume key returned by FSCTL_SRV_REQUEST_RESUME_KEY
    // for the source file.
    CopychunkResumeKey [CopychunkResumeKeyLength]byte
    // Reserved (4 bytes): MUST be zero and MUST be ignored on receipt.
    Reserved uint32
    // Chunks: the data ranges to copy. ChunkCount on the wire equals len(Chunks).
    Chunks []SrvCopychunk
}

func (*SrvCopychunkCopy) Marshal

func (c *SrvCopychunkCopy) Marshal() ([]byte, error)

Marshal serializes the SRV_COPYCHUNK_COPY: resume key, ChunkCount, Reserved, chunks.

func (*SrvCopychunkCopy) Unmarshal

func (c *SrvCopychunkCopy) Unmarshal(data []byte) (int, error)

Unmarshal parses an SRV_COPYCHUNK_COPY, returning the number of bytes consumed.

type SrvCopychunkResponse

SrvCopychunkResponse is the NT_Trans_Data of an FSCTL_SRV_COPYCHUNK response ([MS-SMB] section 2.2.7.2.2.1 SRV_COPYCHUNK_RESPONSE).

type SrvCopychunkResponse struct {
    // ChunksWritten (4 bytes): number of chunks successfully written.
    ChunksWritten uint32
    // ChunkBytesWritten (4 bytes): number of bytes written in the last (partially written) chunk.
    ChunkBytesWritten uint32
    // TotalBytesWritten (4 bytes): total number of bytes written.
    TotalBytesWritten uint32
}

func (*SrvCopychunkResponse) Marshal

func (r *SrvCopychunkResponse) Marshal() ([]byte, error)

Marshal serializes the SRV_COPYCHUNK_RESPONSE into its 12-byte little-endian wire form.

func (*SrvCopychunkResponse) Unmarshal

func (r *SrvCopychunkResponse) Unmarshal(data []byte) (int, error)

Unmarshal parses a 12-byte SRV_COPYCHUNK_RESPONSE, returning the bytes consumed.

type SrvRequestResumeKeyResponse

SrvRequestResumeKeyResponse is the NT_Trans_Data of an FSCTL_SRV_REQUEST_RESUME_KEY response ([MS-SMB] section 2.2.7.2.2.2). The ContextLength field on the wire is derived from len(Context); per the spec the extended context feature is reserved and not used, so Context is normally empty.

type SrvRequestResumeKeyResponse struct {
    // CopychunkResumeKey (24 bytes): opaque resume key identifying the open source file.
    CopychunkResumeKey [CopychunkResumeKeyLength]byte
    // Context (variable): reserved/unused extended context; normally zero-length.
    Context []byte
}

func (*SrvRequestResumeKeyResponse) Marshal

func (r *SrvRequestResumeKeyResponse) Marshal() ([]byte, error)

Marshal serializes the FSCTL_SRV_REQUEST_RESUME_KEY response: resume key, ContextLength, then the (normally empty) Context.

func (*SrvRequestResumeKeyResponse) Unmarshal

func (r *SrvRequestResumeKeyResponse) Unmarshal(data []byte) (int, error)

Unmarshal parses an FSCTL_SRV_REQUEST_RESUME_KEY response, returning the bytes consumed.

type SrvSnapshotArray

SrvSnapshotArray is the NT_Trans_Data of an FSCTL_SRV_ENUMERATE_SNAPSHOTS response ([MS-SMB] section 2.2.7.3.2 SRV_SNAPSHOT_ARRAY). The on-the-wire SnapShotArraySize and the SnapShotMultiSZ list are derived from / parsed into Snapshots.

type SrvSnapshotArray struct {
    // NumberOfSnapShots (4 bytes): total number of snapshots the object store has of this
    // file. May exceed len(Snapshots) if the client's buffer could not hold them all.
    NumberOfSnapShots uint32

    // NumberOfSnapShotsReturned (4 bytes): the number of snapshots actually returned in this
    // response (equals len(Snapshots) on marshal).
    NumberOfSnapShotsReturned uint32

    // Snapshots: the returned snapshot labels, each of the form "@GMT-YYYY.MM.DD-HH.MM.SS".
    // On the wire they are a NUL-terminated UTF-16LE multi-SZ (an extra terminating NUL
    // closes the list; an empty list is two NUL characters).
    Snapshots []string
}

func (*SrvSnapshotArray) Marshal

func (a *SrvSnapshotArray) Marshal() ([]byte, error)

Marshal serializes the SRV_SNAPSHOT_ARRAY: the three counts followed by the multi-SZ. NumberOfSnapShotsReturned and SnapShotArraySize are set from the Snapshots list, while NumberOfSnapShots is taken from the field (it can legitimately exceed the returned count).

func (*SrvSnapshotArray) Unmarshal

func (a *SrvSnapshotArray) Unmarshal(data []byte) (int, error)

Unmarshal parses an SRV_SNAPSHOT_ARRAY, returning the number of bytes consumed. The multi-SZ is decoded into Snapshots; a probe response that carries only the header (no room for the list) yields an empty Snapshots slice.

type Transaction2Subcommand

type Transaction2Subcommand uint16
const (
    TRANS2_OPEN2                    Transaction2Subcommand = 0x0000
    TRANS2_FIND_FIRST2              Transaction2Subcommand = 0x0001
    TRANS2_FIND_NEXT2               Transaction2Subcommand = 0x0002
    TRANS2_QUERY_FS_INFORMATION     Transaction2Subcommand = 0x0003
    TRANS2_SET_FS_INFORMATION       Transaction2Subcommand = 0x0004
    TRANS2_QUERY_PATH_INFORMATION   Transaction2Subcommand = 0x0005
    TRANS2_SET_PATH_INFORMATION     Transaction2Subcommand = 0x0006
    TRANS2_QUERY_FILE_INFORMATION   Transaction2Subcommand = 0x0007
    TRANS2_SET_FILE_INFORMATION     Transaction2Subcommand = 0x0008
    TRANS2_FSCTL                    Transaction2Subcommand = 0x0009
    TRANS2_IOCTL2                   Transaction2Subcommand = 0x000A
    TRANS2_FIND_NOTIFY_FIRST        Transaction2Subcommand = 0x000B
    TRANS2_FIND_NOTIFY_NEXT         Transaction2Subcommand = 0x000C
    TRANS2_CREATE_DIRECTORY         Transaction2Subcommand = 0x000D
    TRANS2_SESSION_SETUP            Transaction2Subcommand = 0x000E
    TRANS2_GET_DFS_REFERRAL         Transaction2Subcommand = 0x0010
    TRANS2_REPORT_DFS_INCONSISTENCY Transaction2Subcommand = 0x0011
)

func (Transaction2Subcommand) String

func (t Transaction2Subcommand) String() string

type TransactionSubcommand

type TransactionSubcommand uint16
const (
    TRANS_SET_NMPIPE_STATE   TransactionSubcommand = 0x0001
    TRANS_RAW_READ_NMPIPE    TransactionSubcommand = 0x0011
    TRANS_QUERY_NMPIPE_STATE TransactionSubcommand = 0x0021
    TRANS_QUERY_NMPIPE_INFO  TransactionSubcommand = 0x0022
    TRANS_PEEK_NMPIPE        TransactionSubcommand = 0x0023
    TRANS_TRANSACT_NMPIPE    TransactionSubcommand = 0x0026
    TRANS_RAW_WRITE_NMPIPE   TransactionSubcommand = 0x0031
    TRANS_READ_NMPIPE        TransactionSubcommand = 0x0036
    TRANS_WRITE_NMPIPE       TransactionSubcommand = 0x0037
    TRANS_WAIT_NMPIPE        TransactionSubcommand = 0x0053
    TRANS_CALL_NMPIPE        TransactionSubcommand = 0x0054
    TRANS_MAILSLOT_WRITE     TransactionSubcommand = 0x0001
)

func (TransactionSubcommand) String

func (t TransactionSubcommand) String() string