informationlevels

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SMB_FIND_FILE_BOTH_DIRECTORY_INFO

type SMB_FIND_FILE_BOTH_DIRECTORY_INFO struct {
	// NextEntryOffset: (4 bytes): This field contains the offset, in bytes, from this
	// entry in the list to the next entry in the list. If there are no additional
	// entries the value MUST be zero (0x00000000).
	Nextentryoffset types.ULONG
	// FileIndex: (4 bytes): This field SHOULD be set to zero when sent in a
	// response and SHOULD be ignored when received by the client.
	Fileindex types.ULONG
	// CreationTime: (8 bytes): This field contains the date and time when the file was
	// created.
	Creationtime types.FILETIME
	// LastAccessTime: (8 bytes): This field contains the date and time when the file
	// was last accessed.
	Lastaccesstime types.FILETIME
	// LastWriteTime: (8 bytes): This field contains the date and time when data was
	// last written to the file.
	Lastwritetime types.FILETIME
	// LastChangeTime: (8 bytes): This field contains the date and time when the file
	// was last changed.
	Lastchangetime types.FILETIME
	// EndOfFile: (8 bytes): The absolute new end-of-file position as a byte offset
	// from the start of the file. EndOfFile specifies the byte offset to the end of
	// the file. Because this value is zero-based, it actually refers to the first free
	// byte in the file. In other words, EndOfFile is the offset to the byte
	// immediately following the last valid byte in the file.
	Endoffile types.LARGE_INTEGER
	// AllocationSize: (8 bytes): This field contains the file allocation size, in
	// bytes. Usually, this value is a multiple of the sector or cluster size of the
	// underlying physical device.
	Allocationsize types.LARGE_INTEGER
	// ExtFileAttributes: (4 bytes): This field contains the extended file attributes
	// of the file, encoded as an SMB_EXT_FILE_ATTR (section 2.2.1.2.3) data type.
	Extfileattributes types.SMB_EXT_FILE_ATTR
	// FileNameLength: (4 bytes): This field MUST contain the length of the FileName
	// field, in bytes.
	Filenamelength types.ULONG
	// EaSize: (4 bytes): This field MUST contain the length of the FEAList, in bytes.
	Easize types.ULONG
	// ShortNameLength: (1 byte): This field MUST contain the length of the ShortName,
	// in bytes, or zero if no 8.3 name is present.
	Shortnamelength types.UCHAR
	// Reserved: (1 byte): This field is reserved and MUST be zero (0x00).
	Reserved types.UCHAR
}

SMB_FIND_FILE_BOTH_DIRECTORY_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/2aa849f4-1bc0-42bf-9c8f-d09f11fccc4c

func (*SMB_FIND_FILE_BOTH_DIRECTORY_INFO) Marshal

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

Marshal serializes the SMB_FIND_FILE_BOTH_DIRECTORY_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_FIND_FILE_BOTH_DIRECTORY_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_FIND_FILE_BOTH_DIRECTORY_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_FIND_FILE_BOTH_DIRECTORY_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_FIND_FILE_DIRECTORY_INFO

type SMB_FIND_FILE_DIRECTORY_INFO struct {
	// NextEntryOffset: (4 bytes): This field contains the offset, in bytes, from this
	// entry in the list to the next entry in the list. If there are no additional
	// entries the value MUST be zero (0x00000000).
	Nextentryoffset types.ULONG
	// FileIndex: (4 bytes): This field SHOULD be set to zero when sent in a
	// response and SHOULD be ignored when received by the client.
	Fileindex    types.ULONG
	Creationtime types.FILETIME
	// LastAccessTime: (8 bytes): This field contains the date and time when the file
	// was last accessed.
	Lastaccesstime types.FILETIME
	// LastWriteTime: (8 bytes): This field contains the date and time when data was
	// last written to the file.
	Lastwritetime types.FILETIME
	// LastAttrChangeTime: (8 bytes): This field contains the date and time when the
	// file attributes where last changed.
	Lastattrchangetime types.FILETIME
	// EndOfFile: (8 bytes): This field contains the offset, in bytes, to the start of
	// the file to the first byte after the end of the file.
	Endoffile types.LARGE_INTEGER
	// AllocationSize: (8 bytes): This field contains the file allocation size, in
	// bytes. Usually, this value is a multiple of the sector or cluster size of the
	// underlying physical device.
	Allocationsize types.LARGE_INTEGER
	// ExtFileAttributes: (4 bytes): This field contains the extended file attributes
	// of the file, encoded as an SMB_EXT_FILE_ATTR (section 2.2.1.2.3) data type.
	Extfileattributes types.SMB_EXT_FILE_ATTR
	// FileNameLength: (4 bytes): This field contains the length of the FileName field,
	// in bytes.
	Filenamelength types.ULONG
}

SMB_FIND_FILE_DIRECTORY_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/8be9119a-b37e-4ff5-bee7-3d7a5997dc88

func (*SMB_FIND_FILE_DIRECTORY_INFO) Marshal

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

Marshal serializes the SMB_FIND_FILE_DIRECTORY_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_FIND_FILE_DIRECTORY_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_FIND_FILE_DIRECTORY_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_FIND_FILE_DIRECTORY_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_FIND_FILE_FULL_DIRECTORY_INFO

type SMB_FIND_FILE_FULL_DIRECTORY_INFO struct {
	// NextEntryOffset: (4 bytes): This field contains the offset, in bytes, from this
	// entry in the list to the next entry in the list. If there are no additional
	// entries, the value MUST be zero (0x00000000).
	Nextentryoffset types.ULONG
	// FileIndex: (4 bytes): This field SHOULD be set to zero when sent in a
	// response and SHOULD be ignored when received by the client.
	Fileindex types.ULONG
	// CreationTime: (8 bytes): This field contains the date and time when the file was
	// created.
	Creationtime types.FILETIME
	// LastAccessTime: (8 bytes): This field contains the date and time when the file
	// was last accessed.
	Lastaccesstime types.FILETIME
	// LastWriteTime: (8 bytes): This field contains the date and time when data was
	// last written to the file.
	Lastwritetime types.FILETIME
	// LastAttrChangeTime: (8 bytes): This field contains the date and time when the
	// file attributes where last changed.
	Lastattrchangetime types.FILETIME
	// EndOfFile: (8 bytes): This field contains the offset, in bytes, from the start
	// of the file to the first byte after the end of the file.
	Endoffile types.LARGE_INTEGER
	// AllocationSize: (8 bytes): This field contains the file allocation size, in
	// bytes. Usually, this value is a multiple of the sector or cluster size of the
	// underlying physical device.
	Allocationsize types.LARGE_INTEGER
	// ExtFileAttributes: (4 bytes): This field contains the extended file attributes
	// of the file, encoded as an SMB_EXT_FILE_ATTR (section 2.2.1.2.3) data type.
	Extfileattributes types.SMB_EXT_FILE_ATTR
	// FileNameLength: (4 bytes): This field contains the length of the FileName field,
	// in bytes.
	Filenamelength types.ULONG
	// EaSize: (4 bytes): This field contains the size of the file's extended attribute
	// (EA) information, in bytes.
	Easize types.ULONG
}

SMB_FIND_FILE_FULL_DIRECTORY_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/64bd690e-d3a4-4588-96ef-0cb90b065d08

func (*SMB_FIND_FILE_FULL_DIRECTORY_INFO) Marshal

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

Marshal serializes the SMB_FIND_FILE_FULL_DIRECTORY_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_FIND_FILE_FULL_DIRECTORY_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_FIND_FILE_FULL_DIRECTORY_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_FIND_FILE_FULL_DIRECTORY_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_FIND_FILE_NAMES_INFO

type SMB_FIND_FILE_NAMES_INFO struct {
	// NextEntryOffset: (4 bytes): This field contains the offset, in bytes, from this
	// entry in the list to the next entry in the list. If there are no additional
	// entries, the value MUST be zero (0x00000000).
	Nextentryoffset types.ULONG
	// FileIndex: (4 bytes): This field SHOULD be set to zero when sent in a
	// response and SHOULD be ignored when received by the client.
	Fileindex types.ULONG
	// FileNameLength: (4 bytes): This field MUST contain the length of the FileName
	// field, in bytes.
	Filenamelength types.ULONG
}

SMB_FIND_FILE_NAMES_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/88b9968b-a36f-482a-bb30-c7a51a3e290d

func (*SMB_FIND_FILE_NAMES_INFO) Marshal

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

Marshal serializes the SMB_FIND_FILE_NAMES_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_FIND_FILE_NAMES_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_FIND_FILE_NAMES_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_FIND_FILE_NAMES_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_INFO_ALLOCATION

type SMB_INFO_ALLOCATION struct {
	// idFileSystem: (4 bytes): This field contains a file system identifier.
	Idfilesystem types.ULONG
	// cSectorUnit: (4 bytes): This field contains the number of sectors per allocation
	// unit.
	Csectorunit types.ULONG
	// cUnit: (4 bytes): This field contains the total number of allocation units.
	Cunit types.ULONG
	// cUnitAvailable: (4 bytes): This field contains the total number of available
	// allocation units.
	Cunitavailable types.ULONG
	// cbSector: (2 bytes): This field contains the number of bytes per sector.
	Cbsector types.USHORT
}

SMB_INFO_ALLOCATION Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/194f7dd3-a019-4789-a70c-b28e029e6409

func (*SMB_INFO_ALLOCATION) Marshal

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

Marshal serializes the SMB_INFO_ALLOCATION into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_INFO_ALLOCATION) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_INFO_ALLOCATION structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_INFO_ALLOCATION structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_INFO_IS_NAME_VALID

type SMB_INFO_IS_NAME_VALID struct {
}

SMB_INFO_IS_NAME_VALID Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/67188e6f-1d62-41d2-a9bd-d325e5f75cc1

func (*SMB_INFO_IS_NAME_VALID) Marshal

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

Marshal serializes the SMB_INFO_IS_NAME_VALID into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_INFO_IS_NAME_VALID) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_INFO_IS_NAME_VALID structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_INFO_IS_NAME_VALID structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_INFO_QUERY_ALL_EAS

type SMB_INFO_QUERY_ALL_EAS struct {
	// ExtendedAttributeList: (variable): A list of all of the extended attribute (EA)
	// name/value pairs assigned to the file.
	Extendedattributelist types.SMB_FEA_LIST
}

SMB_INFO_QUERY_ALL_EAS Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/2db63466-bdbf-45c4-96fc-dff83ebda893

func (*SMB_INFO_QUERY_ALL_EAS) Marshal

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

Marshal serializes the SMB_INFO_QUERY_ALL_EAS into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_INFO_QUERY_ALL_EAS) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_INFO_QUERY_ALL_EAS structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_INFO_QUERY_ALL_EAS structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_INFO_QUERY_EAS_FROM_LIST

type SMB_INFO_QUERY_EAS_FROM_LIST struct {
	// ExtendedAttributeList: (variable): A list of extended attribute (EA) name/value
	// pairs where the AttributeName field values match those that were provided in the
	// request.
	Extendedattributelist types.SMB_FEA_LIST
}

SMB_INFO_QUERY_EAS_FROM_LIST Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/0cf863b2-0f6a-470b-b02a-6a21441e2c4a

func (*SMB_INFO_QUERY_EAS_FROM_LIST) Marshal

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

Marshal serializes the SMB_INFO_QUERY_EAS_FROM_LIST into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_INFO_QUERY_EAS_FROM_LIST) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_INFO_QUERY_EAS_FROM_LIST structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_INFO_QUERY_EAS_FROM_LIST structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_INFO_QUERY_EA_SIZE

type SMB_INFO_QUERY_EA_SIZE struct {
	// CreationDate: (2 bytes): This field contains the date when the file was created.
	Creationdate types.SMB_DATE
	// CreationTime: (2 bytes): This field contains the time when the file was created.
	Creationtime types.SMB_TIME
	// LastAccessDate: (2 bytes): This field contains the date when the file was last
	// accessed.
	Lastaccessdate types.SMB_DATE
	// LastAccessTime: (2 bytes): This field contains the time when the file was last
	// accessed.
	Lastaccesstime types.SMB_TIME
	// LastWriteDate : (2 bytes): This field contains the date when data was last
	// written to the file.
	Lastwritedate types.SMB_DATE
	// LastWriteTime: (2 bytes): This field contains the time when data was last
	// written to the file.
	Lastwritetime types.SMB_TIME
	// FileDataSize: (4 bytes): This field contains the file size, in filesystem
	// allocation units.
	Filedatasize types.ULONG
	// AllocationSize: (4 bytes): This field contains the size of the filesystem
	// allocation unit, in bytes.
	Allocationsize types.ULONG
	// Attributes: (2 bytes): This field contains the file attributes.
	Attributes types.SMB_FILE_ATTRIBUTES
	// EaSize: (4 bytes): This field contains the size of the file's extended attribute
	// (EA) information in bytes.
	Easize types.ULONG
}

SMB_INFO_QUERY_EA_SIZE Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/b0a5faf7-e7cc-4b38-878d-2253a2ef9ad4

func (*SMB_INFO_QUERY_EA_SIZE) Marshal

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

Marshal serializes the SMB_INFO_QUERY_EA_SIZE into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_INFO_QUERY_EA_SIZE) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_INFO_QUERY_EA_SIZE structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_INFO_QUERY_EA_SIZE structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_INFO_SET_EAS

type SMB_INFO_SET_EAS struct {
	// ExtendedAttributeList: (variable): A list of EA name/value pairs.
	Extendedattributelist types.SMB_FEA_LIST
}

SMB_INFO_SET_EAS Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/417809e1-82ff-4acf-bc99-9de5bf7455d4

func (*SMB_INFO_SET_EAS) Marshal

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

Marshal serializes the SMB_INFO_SET_EAS into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_INFO_SET_EAS) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_INFO_SET_EAS structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_INFO_SET_EAS structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_INFO_STANDARD

type SMB_INFO_STANDARD struct {
	// CreationDate: (2 bytes): This field contains the date when the file was created.
	Creationdate types.SMB_DATE
	// CreationTime: (2 bytes): This field contains the time when the file was created.
	Creationtime types.SMB_TIME
	// LastAccessDate: (2 bytes): This field contains the date when the file was last
	// accessed.
	Lastaccessdate types.SMB_DATE
	// LastAccessTime: (2 bytes): This field contains the time when the file was last
	// accessed.
	Lastaccesstime types.SMB_TIME
	// LastWriteDate: (2 bytes): This field contains the date when data was last
	// written to the file.
	Lastwritedate types.SMB_DATE
	// LastWriteTime: (2 bytes): This field contains the time when data was last
	// written to the file.
	Lastwritetime types.SMB_TIME
}

SMB_INFO_STANDARD Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/3e6f3a13-6a40-4f76-af70-bb514554ea5b

func (*SMB_INFO_STANDARD) Marshal

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

Marshal serializes the SMB_INFO_STANDARD into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_INFO_STANDARD) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_INFO_STANDARD structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_INFO_STANDARD structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_INFO_VOLUME

type SMB_INFO_VOLUME struct {
	// ulVolSerialNbr: (4 bytes): This field contains the serial number of the volume.
	Ulvolserialnbr types.ULONG
	// cCharCount: (1 byte): This field contains the number of characters in the
	// VolumeLabel field.
	Ccharcount types.UCHAR
	// VolumeLabel: (variable): This field contains the volume label.
	Volumelabel types.SMB_STRING
}

SMB_INFO_VOLUME Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/13d589f5-67e9-49e8-8c33-7b04b8f7cd8c

func (*SMB_INFO_VOLUME) Marshal

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

Marshal serializes the SMB_INFO_VOLUME into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_INFO_VOLUME) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_INFO_VOLUME structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_INFO_VOLUME structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FILE_ALL_INFO

type SMB_QUERY_FILE_ALL_INFO struct {
	// CreationTime: (8 bytes): This field contains the date and time when the file was
	// created.
	Creationtime types.FILETIME
	// LastAccessTime: (8 bytes): This field contains the date and time when the file
	// was last accessed.
	Lastaccesstime types.FILETIME
	// LastWriteTime: (8 bytes): This field contains the date and time when data was
	// last written to the file.
	Lastwritetime types.FILETIME
	// LastChangeTime: (8 bytes): This field contains the date and time when the file
	// was last changed.
	Lastchangetime types.FILETIME
	// ExtFileAttributes: (4 bytes): This field contains the extended file attributes
	// of the file, encoded as an SMB_EXT_FILE_ATTR (section 2.2.1.2.3) data type.
	Extfileattributes types.SMB_EXT_FILE_ATTR
	// Reserved1: (4 bytes): Reserved. This field SHOULD be set to 0x00000000 by the
	// server and MUST be ignored by the client.
	Reserved1 types.ULONG
	// EndOfFile: (8 bytes): This field contains the offset, in bytes, from the start
	// of the file to the first byte after the end of the file.
	Endoffile types.LARGE_INTEGER
	// NumberOfLinks: (4 bytes): This field contains the number of hard links to the
	// file.
	Numberoflinks types.ULONG
	// DeletePending: (1 byte): This field indicates whether there is a delete action
	// pending for the file.
	Deletepending types.UCHAR
	// Directory: (1 byte): This field indicates whether the file is a directory.
	Directory types.UCHAR
	// Reserved2: (2 bytes): Reserved. This field SHOULD be set to 0x0000 by the server
	// and MUST be ignored by the client.
	Reserved2 types.USHORT
	// EaSize: (4 bytes): This field MUST contain the length of a file's list of
	// extended attributes in bytes.
	Easize types.ULONG
	// FileNameLength: (4 bytes): This field MUST contain the length, in bytes, of the
	// FileName field.
	Filenamelength types.ULONG
}

SMB_QUERY_FILE_ALL_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/162baf45-4201-4b07-a397-060e868599d7

func (*SMB_QUERY_FILE_ALL_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FILE_ALL_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FILE_ALL_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FILE_ALL_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FILE_ALL_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FILE_ALT_NAME_INFO

type SMB_QUERY_FILE_ALT_NAME_INFO struct {
	// FileNameLength: (4 bytes): This field contains the length, in bytes, of the
	// FileName field.
	Filenamelength types.ULONG
}

SMB_QUERY_FILE_ALT_NAME_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/3edd12e7-f407-4b46-9465-c6ed20e24c1a

func (*SMB_QUERY_FILE_ALT_NAME_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FILE_ALT_NAME_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FILE_ALT_NAME_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FILE_ALT_NAME_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FILE_ALT_NAME_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FILE_BASIC_INFO

type SMB_QUERY_FILE_BASIC_INFO struct {
	// CreationTime: (8 bytes): This field contains the date and time when the file was
	// created.
	Creationtime types.FILETIME
	// LastAccessTime: (8 bytes): This field contains the date and time when the file
	// was last accessed.
	Lastaccesstime types.FILETIME
	// LastWriteTime: (8 bytes): This field contains the date and time when data was
	// last written to the file.
	Lastwritetime types.FILETIME
	// LastChangeTime: (8 bytes): This field contains the date and time when the file
	// was last changed.
	Lastchangetime types.FILETIME
	// ExtFileAttributes: (4 bytes): This field contains the extended file attributes
	// of the file, encoded as an SMB_EXT_FILE_ATTR (section 2.2.1.2.3) data type.
	Extfileattributes types.SMB_EXT_FILE_ATTR
	// Reserved: (4 bytes): MUST be set to zero when sent and MUST be ignored on
	// receipt.
	Reserved types.ULONG
}

SMB_QUERY_FILE_BASIC_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/3da7df75-43ba-4498-a6b3-a68ba57ec922

func (*SMB_QUERY_FILE_BASIC_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FILE_BASIC_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FILE_BASIC_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FILE_BASIC_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FILE_BASIC_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FILE_COMRESSION_INFO

type SMB_QUERY_FILE_COMRESSION_INFO struct {
	// CompressedFileSize: (8 bytes): A 64-bit signed integer that contains the size,
	// in bytes, of the compressed file. This value MUST be greater than or equal to
	// 0x0000000000000000.
	Compressedfilesize types.LARGE_INTEGER
	// CompressionFormat: (2 bytes): A 16-bit unsigned integer that contains the
	// compression format. The actual compression operation associated with each of
	// these compression format values is implementation-dependent. An implementation
	// can associate any local compression algorithm with the values described in the
	// following table, because the compressed data does not travel across the wire in
	// the context of this transaction. The following compression formats are valid
	// only for NTFS.
	Compressionformat types.USHORT
	// CompressionUnitShift: (1 byte): An 8-bit unsigned integer that contains the
	// compression unit shift that is the number of bits by which to left-shift a 1 bit
	// to arrive at the compression unit size. The compression unit size is the number
	// of bytes in a compression unit, that is, the number of bytes to be compressed.
	// This value is implementation-defined.
	Compressionunitshift types.UCHAR
	// ChunkShift: (1 byte): An 8-bit unsigned integer that contains the compression
	// chunk size in bytes in log 2 format. The chunk size is the number of bytes that
	// the operating system's implementation of the Lempel-Ziv compression algorithm
	// tries to compress at one time. This value is implementation-defined.
	Chunkshift types.UCHAR
	// ClusterShift: (1 byte): An 8-bit unsigned integer that specifies, in log 2
	// format, the amount of space that MUST be saved by compression to successfully
	// compress a compression unit. If that amount of space is not saved by
	// compression, the data in that compression unit MUST be stored uncompressed. Each
	// successfully compressed compression unit MUST occupy at least one cluster that
	// is less in bytes than an uncompressed compression unit. Therefore, the cluster
	// shift is the number of bits by which to left shift a 1 bit to arrive at the size
	// of a cluster. This value is implementation-defined.
	Clustershift types.UCHAR
}

SMB_QUERY_FILE_COMRESSION_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/1211daed-3d93-42ae-bf22-c8554d7bbe97

func (*SMB_QUERY_FILE_COMRESSION_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FILE_COMRESSION_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FILE_COMRESSION_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FILE_COMRESSION_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FILE_COMRESSION_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FILE_EA_INFO

type SMB_QUERY_FILE_EA_INFO struct {
	// EaSize: (4 bytes): This field MUST contain the length of a file's list of
	// extended attributes in bytes.
	Easize types.ULONG
}

SMB_QUERY_FILE_EA_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/3e85d60e-696a-4436-8757-84233d9f0245

func (*SMB_QUERY_FILE_EA_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FILE_EA_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FILE_EA_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FILE_EA_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FILE_EA_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FILE_NAME_INFO

type SMB_QUERY_FILE_NAME_INFO struct {
	// FileNameLength: (4 bytes): This field MUST contain the length of the FileName
	// field in bytes.
	Filenamelength types.ULONG
}

SMB_QUERY_FILE_NAME_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/0cdd9e53-bc92-4f26-8b22-ed11fc06a6d7

func (*SMB_QUERY_FILE_NAME_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FILE_NAME_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FILE_NAME_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FILE_NAME_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FILE_NAME_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FILE_STANDARD_INFO

type SMB_QUERY_FILE_STANDARD_INFO struct {
	Allocationsize types.LARGE_INTEGER
	// EndOfFile: (8 bytes): This field contains the offset, in bytes, from the start
	// of the file to the first byte after the end of the file.
	Endoffile types.LARGE_INTEGER
	// NumberOfLinks: (4 bytes): This field contains the number of hard links to the
	// file.
	Numberoflinks types.ULONG
	// DeletePending: (1 byte): This field indicates whether there is a delete action
	// pending for the file.
	Deletepending types.UCHAR
	// Directory: (1 byte): This field indicates whether the file is a directory.
	Directory types.UCHAR
}

SMB_QUERY_FILE_STANDARD_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/3bdd080c-f8a4-4a09-acf1-0f8bd00152e4

func (*SMB_QUERY_FILE_STANDARD_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FILE_STANDARD_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FILE_STANDARD_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FILE_STANDARD_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FILE_STANDARD_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FILE_STREAM_INFO

type SMB_QUERY_FILE_STREAM_INFO struct {
	// NextEntryOffset: (4 bytes): A 32-bit unsigned integer that contains the byte
	// offset from the beginning of this entry, at which the next FILE_ STREAM
	// _INFORMATION entry is located, if multiple entries are present in a buffer. This
	// member is 0x00000000 if no other entries follow this one. An implementation MUST
	// use this value to determine the location of the next entry (if multiple entries
	// are present in a buffer) and MUST NOT assume that the value of NextEntryOffset
	// is the same as the size of the current entry.
	Nextentryoffset types.ULONG
	// StreamNameLength: (4 bytes): A 32-bit unsigned integer that contains the length,
	// in bytes, of the stream name string.
	Streamnamelength types.ULONG
	// StreamSize: (8 bytes): A 64-bit signed integer that contains the size, in bytes,
	// of the stream. The value of this field MUST be greater than or equal to
	// 0x0000000000000000.
	Streamsize types.LARGE_INTEGER
	// StreamAllocationSize: (8 bytes): A 64-bit signed integer that contains the file
	// stream allocation size in bytes. Usually, this value is a multiple of the sector
	// or cluster size of the underlying physical device. The value of this field MUST
	// be greater than or equal to 0x0000000000000000.
	Streamallocationsize types.LARGE_INTEGER
}

SMB_QUERY_FILE_STREAM_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/23f37dcd-5b50-43d4-91cd-ffab868fd65e

func (*SMB_QUERY_FILE_STREAM_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FILE_STREAM_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FILE_STREAM_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FILE_STREAM_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FILE_STREAM_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FS_ATTRIBUTE_INFO

type SMB_QUERY_FS_ATTRIBUTE_INFO struct {
}

SMB_QUERY_FS_ATTRIBUTE_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/1011206a-55c5-4dbf-aff0-119514136940

func (*SMB_QUERY_FS_ATTRIBUTE_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FS_ATTRIBUTE_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FS_ATTRIBUTE_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FS_ATTRIBUTE_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FS_ATTRIBUTE_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FS_DEVICE_INFO

type SMB_QUERY_FS_DEVICE_INFO struct {
	// DeviceType: (4 bytes): This field contains the device type on which the volume
	// resides.
	Devicetype types.ULONG
	// DeviceCharacteristics: (4 bytes): This 32-bit field of flags contains the device
	// characteristics. The individual flags are as follows.
	Devicecharacteristics types.ULONG
}

SMB_QUERY_FS_DEVICE_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/d7ea6e1a-6526-4230-b566-e9588c7498f1

func (*SMB_QUERY_FS_DEVICE_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FS_DEVICE_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FS_DEVICE_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FS_DEVICE_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FS_DEVICE_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FS_SIZE_INFO

type SMB_QUERY_FS_SIZE_INFO struct {
	// TotalAllocationUnits: (8 bytes): This field contains the total number of
	// allocation units assigned to the volume.
	Totalallocationunits types.LARGE_INTEGER
	// TotalFreeAllocationUnits: (8 bytes): This field contains the total number of
	// unallocated or free allocation units for the volume.
	Totalfreeallocationunits types.LARGE_INTEGER
	// SectorsPerAllocationUnit: (4 bytes): This field contains the number of sectors
	// per allocation unit.
	Sectorsperallocationunit types.ULONG
	// BytesPerSector: (4 bytes): This field contains the bytes per sector.
	Bytespersector types.ULONG
}

SMB_QUERY_FS_SIZE_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/3045d7df-7757-4725-9ffd-20227978cc46

func (*SMB_QUERY_FS_SIZE_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FS_SIZE_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FS_SIZE_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FS_SIZE_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FS_SIZE_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_QUERY_FS_VOLUME_INFO

type SMB_QUERY_FS_VOLUME_INFO struct {
	// VolumeCreationTime: (8 bytes): This field contains the date and time when the
	// volume was created.
	Volumecreationtime types.FILETIME
	// SerialNumber: (4 bytes): This field contains the serial number of the volume.
	Serialnumber types.ULONG
	// VolumeLabelSize: (4 bytes): This field contains the size of the VolumeLabel
	// field, in bytes.
	Volumelabelsize types.ULONG
	Reserved        types.USHORT
}

SMB_QUERY_FS_VOLUME_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/879f3ae2-b029-4b3b-8043-c830fc517b28

func (*SMB_QUERY_FS_VOLUME_INFO) Marshal

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

Marshal serializes the SMB_QUERY_FS_VOLUME_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_QUERY_FS_VOLUME_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_QUERY_FS_VOLUME_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_QUERY_FS_VOLUME_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_SET_FILE_ALLOCATION_INFO

type SMB_SET_FILE_ALLOCATION_INFO struct {
	// AllocationSize: (8 bytes): A 64-bit signed integer containing the file
	// allocation size, in bytes. Usually, this value is a multiple of the sector or
	// cluster size of the underlying physical device. This value MUST be greater than
	// or equal to 0x0000000000000000. All unused allocation (beyond EOF) is freed.
	Allocationsize types.LARGE_INTEGER
}

SMB_SET_FILE_ALLOCATION_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/d362c412-dcd0-463d-93e4-3e09aa8cacc5

func (*SMB_SET_FILE_ALLOCATION_INFO) Marshal

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

Marshal serializes the SMB_SET_FILE_ALLOCATION_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_SET_FILE_ALLOCATION_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_SET_FILE_ALLOCATION_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_SET_FILE_ALLOCATION_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_SET_FILE_BASIC_INFO

type SMB_SET_FILE_BASIC_INFO struct {
	// CreationTime: (8 bytes): A 64-bit unsigned integer that contains the time when
	// the file was created. A valid time for this field is an integer greater than
	// 0x0000000000000000. When setting file attributes, a value of 0x0000000000000000
	// indicates to the server that it MUST NOT change this attribute. When setting
	// file attributes, a value of -1 (0xFFFFFFFFFFFFFFFF) indicates to the server that
	// it MUST NOT change this attribute for all subsequent operations on the same file
	// handle. This field MUST NOT be set to a value less than -1 (0xFFFFFFFFFFFFFFFF).
	Creationtime types.FILETIME
	// LastAccessTime: (8 bytes): A 64-bit unsigned integer that contains the last time
	// that the file was accessed, in the format of a FILETIME structure. A valid time
	// for this field is an integer greater than 0x0000000000000000. When setting file
	// attributes, a value of 0x0000000000000000 indicates to the server that it MUST
	// NOT change this attribute. When setting file attributes, a value of -1
	// (0xFFFFFFFFFFFFFFFF) indicates to the server that it MUST NOT change this
	// attribute for all subsequent operations on the same file handle. This field MUST
	// NOT be set to a value less than -1 (0xFFFFFFFFFFFFFFFF).
	Lastaccesstime types.FILETIME
	// LastWriteTime: (8 bytes): A 64-bit unsigned integer that contains the last time
	// that information was written to the file, in the format of a FILETIME structure.
	// A valid time for this field is an integer greater than 0x0000000000000000. When
	// setting file attributes, a value of 0x0000000000000000 indicates to the server
	// that it MUST NOT change this attribute. When setting file attributes, a value of
	// -1 (0xFFFFFFFFFFFFFFFF) indicates to the server that it MUST NOT change this
	// attribute for all subsequent operations on the same file handle. This field MUST
	// NOT be set to a value less than -1 (0xFFFFFFFFFFFFFFFF).
	Lastwritetime types.FILETIME
	// ChangeTime: (8 bytes): A 64-bit unsigned integer that contains the last time
	// that the file was changed, in the format of a FILETIME structure. A valid time
	// for this field is an integer greater than 0x0000000000000000. When setting file
	// attributes, a value of 0x0000000000000000 indicates to the server that it MUST
	// NOT change this attribute. When setting file attributes, a value of -1
	// (0xFFFFFFFFFFFFFFFF) indicates to the server that it MUST NOT change this
	// attribute for all subsequent operations on the same file handle. This field MUST
	// NOT be set to a value less than -1 (0xFFFFFFFFFFFFFFFF).
	Changetime types.FILETIME
	// ExtFileAttributes: (4 bytes): This field contains the extended file attributes
	// of the file, encoded as an SMB_EXT_FILE_ATTR data type (section 2.2.1.2.3).
	Extfileattributes types.SMB_EXT_FILE_ATTR
	// Reserved: (4 bytes): A 32-bit reserved field that can be set to any value and
	// MUST be ignored.
	Reserved types.ULONG
}

SMB_SET_FILE_BASIC_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/021549da-ef78-4282-ae93-7ae93acaba97

func (*SMB_SET_FILE_BASIC_INFO) Marshal

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

Marshal serializes the SMB_SET_FILE_BASIC_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_SET_FILE_BASIC_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_SET_FILE_BASIC_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_SET_FILE_BASIC_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_SET_FILE_DISPOSITION_INFO

type SMB_SET_FILE_DISPOSITION_INFO struct {
	// DeletePending: (1 byte): An 8-bit field that is set to 0x01 to indicate that a
	// file SHOULD be deleted when it is closed; otherwise, to 0x00.
	Deletepending types.UCHAR
}

SMB_SET_FILE_DISPOSITION_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/bb8e952b-d293-4fc3-bc47-67ce1a8f8655

func (*SMB_SET_FILE_DISPOSITION_INFO) Marshal

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

Marshal serializes the SMB_SET_FILE_DISPOSITION_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_SET_FILE_DISPOSITION_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_SET_FILE_DISPOSITION_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_SET_FILE_DISPOSITION_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

type SMB_SET_FILE_END_OF_FILE_INFO

type SMB_SET_FILE_END_OF_FILE_INFO struct {
	// EndOfFile: (8 bytes): A 64-bit signed integer that contains the absolute new
	// end-of-file position as a byte offset from the start of the file. EndOfFile
	// specifies the offset from the beginning of the file to the byte following the
	// last byte in the file. It is the offset from the beginning of the file at which
	// new bytes appended to the file are to be written. The value of this field MUST
	// be greater than or equal to 0x0000000000000000.
	Endoffile types.LARGE_INTEGER
}

SMB_SET_FILE_END_OF_FILE_INFO Source: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/4735b3d3-cb3b-4c9d-b11c-482d7bc48722

func (*SMB_SET_FILE_END_OF_FILE_INFO) Marshal

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

Marshal serializes the SMB_SET_FILE_END_OF_FILE_INFO into a byte slice.

This method marshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The marshalled data follows the specific format required for this information level.

Returns: - A byte slice containing the marshalled information level structure - An error if marshalling any component fails

func (*SMB_SET_FILE_END_OF_FILE_INFO) Unmarshal

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

Unmarshal deserializes a byte slice into the SMB_SET_FILE_END_OF_FILE_INFO structure.

This method unmarshals the information level structure according to the format specified in MS-CIFS documentation. Information levels are used in various SMB operations to determine the format of data being exchanged.

The data is expected to follow the specific format required for this information level.

Parameters: - data: A byte slice containing the serialized SMB_SET_FILE_END_OF_FILE_INFO structure

Returns: - An error if unmarshalling any component fails or if the data format is invalid

Jump to

Keyboard shortcuts

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