trkwks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Syntax UUID
	TrkwksSyntaxUUID = &uuid.UUID{TimeLow: 0x300f3532, TimeMid: 0x38cc, TimeHiAndVersion: 0x11d0, ClockSeqHiAndReserved: 0xa3, ClockSeqLow: 0xf0, Node: [6]uint8{0x0, 0x20, 0xaf, 0x6b, 0xa, 0xdd}}
	// Syntax ID
	TrkwksSyntaxV1_2 = &dcerpc.SyntaxID{IfUUID: TrkwksSyntaxUUID, IfVersionMajor: 1, IfVersionMinor: 2}
)
View Source
var (
	// import guard
	GoPackage = "dltw"
)

Functions

func NewTrkwksServerHandle

func NewTrkwksServerHandle(o TrkwksServer) dcerpc.ServerHandle

func RegisterTrkwksServer

func RegisterTrkwksServer(conn dcerpc.Conn, o TrkwksServer, opts ...dcerpc.Option)

func TrkwksServerHandle

func TrkwksServerHandle(ctx context.Context, o TrkwksServer, opNum int, r ndr.Reader) (dcerpc.Operation, error)

Types

type SearchMachineRequest

type SearchMachineRequest struct {
	// Restrictions: SHOULD be set to zero.<9>
	Restrictions uint32 `idl:"name:Restrictions" json:"restrictions"`
	// pdroidBirthLast: FileID of the file for which the server is to search.
	BirthLast *dltw.DomainRelativeObjectID `idl:"name:pdroidBirthLast" json:"birth_last"`
	// pdroidLast: FileLocation of the file for which the server is to search. This is the
	// last known FileLocation by the client.
	LastObjectID *dltw.DomainRelativeObjectID `idl:"name:pdroidLast" json:"last_object_id"`
}

SearchMachineRequest structure represents the LnkSearchMachine operation request

func (*SearchMachineRequest) MarshalNDR

func (o *SearchMachineRequest) MarshalNDR(ctx context.Context, w ndr.Writer) error

func (*SearchMachineRequest) UnmarshalNDR

func (o *SearchMachineRequest) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

type SearchMachineResponse

type SearchMachineResponse struct {
	// pdroidBirthNext: A new FileID returned from the server. This indicates that the server
	// could not find the file, but that a different file that might be correct has been
	// found. This is associated with the TRK_E_POTENTIAL_FILE_FOUND return value, which
	// is defined below. How the server responds to that error is specified later in this
	// section.
	BirthNext *dltw.DomainRelativeObjectID `idl:"name:pdroidBirthNext" json:"birth_next"`
	// pdroidNext: New FileLocation for the file returned from the server.
	NextObjectID *dltw.DomainRelativeObjectID `idl:"name:pdroidNext" json:"next_object_id"`
	// pmcidNext: New MachineID for the computer that holds the file.
	NextMachineID *dltw.MachineID `idl:"name:pmcidNext" json:"next_machine_id"`
	// ptszPath: New UNC for file.
	Path string `idl:"name:ptszPath;max_is:(261);string" json:"path"`
	// Return: The LnkSearchMachine return value.
	Return int32 `idl:"name:Return" json:"return"`
}

SearchMachineResponse structure represents the LnkSearchMachine operation response

func (*SearchMachineResponse) MarshalNDR

func (o *SearchMachineResponse) MarshalNDR(ctx context.Context, w ndr.Writer) error

func (*SearchMachineResponse) UnmarshalNDR

func (o *SearchMachineResponse) UnmarshalNDR(ctx context.Context, r ndr.Reader) error

type TrkwksClient

type TrkwksClient interface {

	// The LnkSearchMachine method searches for a file object on the specified computer.
	// If information on the file is found, the method attempts to return it. If the file
	// has been moved, the method returns information about its new location.
	//
	// Return Values: A 32-bit integer that indicates success or failure: A value of 0 or
	// any positive value indicates success; a negative value indicates failure. Some of
	// the possible return codes are listed in the following table.
	//
	//	+---------------------------------------+----------------------------------------------------------------------------------+
	//	|                RETURN                 |                                                                                  |
	//	|              VALUE/CODE               |                                   DESCRIPTION                                    |
	//	|                                       |                                                                                  |
	//	+---------------------------------------+----------------------------------------------------------------------------------+
	//	+---------------------------------------+----------------------------------------------------------------------------------+
	//	| 0x8DEAD106 TRK_E_POTENTIAL_FILE_FOUND | A file was found by a DLT Workstation server processing a LnkSearchMachine call, |
	//	|                                       | and the file meets some—but not all—of the necessary criteria to be considered   |
	//	|                                       | the correct file. More details are presented later in this section.              |
	//	+---------------------------------------+----------------------------------------------------------------------------------+
	//	| 0x8DEAD101 TRK_E_REFERRAL             | A file could not be found by a DLT Workstation server processing a               |
	//	|                                       | LnkSearchMachine call, and the file meets some—but not all—of the necessary      |
	//	|                                       | criteria to be considered the correct file. More details are presented later in  |
	//	|                                       | this section.                                                                    |
	//	+---------------------------------------+----------------------------------------------------------------------------------+
	//
	// Exceptions Thrown: None.
	//
	// The server responds to this call by attempting to find the requested file in one
	// of its volumes, and either returns the file's new location (in the form of a UNC),
	// or returns information about the location to which the file has moved (see description
	// of TRK_E_REFERRAL in the following bulleted list).
	//
	// The server SHOULD<10> return a failure value, if the file is found, but the length
	// of the path to be returned in the pstszPath argument exceeds 261 characters (where
	// the 261 characters does not include a string terminator character).
	//
	// For each of the possible return values, the output parameters of this call MUST be
	// set as specified in the following list. In these specifications, the requested ObjectID
	// MUST correspond to the Object field of the pDroidLast parameter, the requested VolumeID
	// MUST correspond to the Volume field of the pDroidLast parameter, and the FileID requested
	// MUST correspond to the value of the pDroidBirthLast parameter. The numeric values
	// corresponding to these returns are defined in section 3.1.1:
	//
	// * Success: A success value MUST be returned if the server finds the file, and the
	// client is authorized to get information about the file via a UNC path. The file MUST
	// be found by searching all volumes on the server computer for a file whose ObjectID
	// is equal to the ObjectID of the request, and whose FileID is equal to the FileID
	// of the request. To perform the authorization check, the server MUST use the client's
	// identity (obtained as specified in [MS-RPCE] ( ../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15
	// ) section 3.3.3.4.3 ( ../ms-rpce/29b8217a-0bda-4fdb-a3ea-48560125ae8d ) ) to determine,
	// based on local policy, whether or not the client is authorized to get the UNC of
	// the file.
	//
	// If there is more than one file on the server computer that satisfies these conditions,
	// the file MUST be selected as follows:
	//
	// * If one of the matching files is on the volume whose VolumeID equals the VolumeID
	// of the request, that file is selected.
	//
	// * Otherwise, the behavior is arbitrary.
	//
	// The server MUST set the output parameters as follows:
	//
	// pdroidBirthNext : The value of the pdroidBirthLast that is specified by the client.
	//
	// pdroidNext : The current FileLocation value for the file.
	//
	// pmcidNext : The MachineID of the server computer.
	//
	// ptszPath : The UNC of the file on the server computer. If the file can be located
	// under multiple UNC paths, one of those UNC paths MUST be returned, but the server
	// MAY return any of those paths. <11> ( caa74a29-27fb-4f50-afa5-bbf152fe5d27#Appendix_A_11
	// )
	//
	// * TRK_E_REFERRAL: This value MUST be returned if the file is no longer stored on
	// any of the volumes of the server computer, but if the MoveTable of the last volume
	// has an entry for the file. (Note that there is no additional per-file access check
	// in this case.) The last volume MUST be determined by using the volume on the server
	// whose VolumeID equals the VolumeID of the request. The entry in the MoveTable for
	// the file, as defined in section 3.1.1, MUST be that entry whose ObjectID equals the
	// ObjectID of the request.
	//
	// The server MUST set the output parameters as follows:
	//
	// pdroidBirthNext : The value of the FileID specified by the client in the *pdroidBirthLast*
	// field of the call.
	//
	// pdroidNext : The value of the FileLocation field for the file's entry in the *MoveTable*.
	//
	// pmcidNext : The value of the MachineID field for the file's entry in the *MoveTable*.
	//
	// ptszPath : The server MUST NOT modify this value.
	//
	// * TRK_E_POTENTIAL_FILE_FOUND: This value MUST be returned if there is no file on
	// any of the server's volumes with the requested FileID and ObjectID, and there is
	// no entry for this file's ObjectID in the MoveTable, but if there is a file with the
	// requested ObjectID on one of the server's volumes, and the FileID on that file is
	// all zeros. <12> ( caa74a29-27fb-4f50-afa5-bbf152fe5d27#Appendix_A_12 )
	//
	// The server MUST set the output parameters as follows:
	//
	// pdroidBirthNext : The value of the FileID for the found file.
	//
	// pdroidNext : The FileLocation of the file found by the server.
	//
	// pmcidNext : The MachineID of the server computer.
	//
	// ptszPath : A UNC of the file on the server computer.
	//
	// * Other negative return values: A negative value other than those mentioned above
	// MUST be returned if none of the preceding cases is met. The server MUST NOT modify
	// any of the output parameters.
	SearchMachine(context.Context, *SearchMachineRequest, ...dcerpc.CallOption) (*SearchMachineResponse, error)

	// AlterContext alters the client context.
	AlterContext(context.Context, ...dcerpc.Option) error
}

trkwks interface.

func NewTrkwksClient

func NewTrkwksClient(ctx context.Context, cc dcerpc.Conn, opts ...dcerpc.Option) (TrkwksClient, error)

type TrkwksServer

type TrkwksServer interface {

	// The LnkSearchMachine method searches for a file object on the specified computer.
	// If information on the file is found, the method attempts to return it. If the file
	// has been moved, the method returns information about its new location.
	//
	// Return Values: A 32-bit integer that indicates success or failure: A value of 0 or
	// any positive value indicates success; a negative value indicates failure. Some of
	// the possible return codes are listed in the following table.
	//
	//	+---------------------------------------+----------------------------------------------------------------------------------+
	//	|                RETURN                 |                                                                                  |
	//	|              VALUE/CODE               |                                   DESCRIPTION                                    |
	//	|                                       |                                                                                  |
	//	+---------------------------------------+----------------------------------------------------------------------------------+
	//	+---------------------------------------+----------------------------------------------------------------------------------+
	//	| 0x8DEAD106 TRK_E_POTENTIAL_FILE_FOUND | A file was found by a DLT Workstation server processing a LnkSearchMachine call, |
	//	|                                       | and the file meets some—but not all—of the necessary criteria to be considered   |
	//	|                                       | the correct file. More details are presented later in this section.              |
	//	+---------------------------------------+----------------------------------------------------------------------------------+
	//	| 0x8DEAD101 TRK_E_REFERRAL             | A file could not be found by a DLT Workstation server processing a               |
	//	|                                       | LnkSearchMachine call, and the file meets some—but not all—of the necessary      |
	//	|                                       | criteria to be considered the correct file. More details are presented later in  |
	//	|                                       | this section.                                                                    |
	//	+---------------------------------------+----------------------------------------------------------------------------------+
	//
	// Exceptions Thrown: None.
	//
	// The server responds to this call by attempting to find the requested file in one
	// of its volumes, and either returns the file's new location (in the form of a UNC),
	// or returns information about the location to which the file has moved (see description
	// of TRK_E_REFERRAL in the following bulleted list).
	//
	// The server SHOULD<10> return a failure value, if the file is found, but the length
	// of the path to be returned in the pstszPath argument exceeds 261 characters (where
	// the 261 characters does not include a string terminator character).
	//
	// For each of the possible return values, the output parameters of this call MUST be
	// set as specified in the following list. In these specifications, the requested ObjectID
	// MUST correspond to the Object field of the pDroidLast parameter, the requested VolumeID
	// MUST correspond to the Volume field of the pDroidLast parameter, and the FileID requested
	// MUST correspond to the value of the pDroidBirthLast parameter. The numeric values
	// corresponding to these returns are defined in section 3.1.1:
	//
	// * Success: A success value MUST be returned if the server finds the file, and the
	// client is authorized to get information about the file via a UNC path. The file MUST
	// be found by searching all volumes on the server computer for a file whose ObjectID
	// is equal to the ObjectID of the request, and whose FileID is equal to the FileID
	// of the request. To perform the authorization check, the server MUST use the client's
	// identity (obtained as specified in [MS-RPCE] ( ../ms-rpce/290c38b1-92fe-4229-91e6-4fc376610c15
	// ) section 3.3.3.4.3 ( ../ms-rpce/29b8217a-0bda-4fdb-a3ea-48560125ae8d ) ) to determine,
	// based on local policy, whether or not the client is authorized to get the UNC of
	// the file.
	//
	// If there is more than one file on the server computer that satisfies these conditions,
	// the file MUST be selected as follows:
	//
	// * If one of the matching files is on the volume whose VolumeID equals the VolumeID
	// of the request, that file is selected.
	//
	// * Otherwise, the behavior is arbitrary.
	//
	// The server MUST set the output parameters as follows:
	//
	// pdroidBirthNext : The value of the pdroidBirthLast that is specified by the client.
	//
	// pdroidNext : The current FileLocation value for the file.
	//
	// pmcidNext : The MachineID of the server computer.
	//
	// ptszPath : The UNC of the file on the server computer. If the file can be located
	// under multiple UNC paths, one of those UNC paths MUST be returned, but the server
	// MAY return any of those paths. <11> ( caa74a29-27fb-4f50-afa5-bbf152fe5d27#Appendix_A_11
	// )
	//
	// * TRK_E_REFERRAL: This value MUST be returned if the file is no longer stored on
	// any of the volumes of the server computer, but if the MoveTable of the last volume
	// has an entry for the file. (Note that there is no additional per-file access check
	// in this case.) The last volume MUST be determined by using the volume on the server
	// whose VolumeID equals the VolumeID of the request. The entry in the MoveTable for
	// the file, as defined in section 3.1.1, MUST be that entry whose ObjectID equals the
	// ObjectID of the request.
	//
	// The server MUST set the output parameters as follows:
	//
	// pdroidBirthNext : The value of the FileID specified by the client in the *pdroidBirthLast*
	// field of the call.
	//
	// pdroidNext : The value of the FileLocation field for the file's entry in the *MoveTable*.
	//
	// pmcidNext : The value of the MachineID field for the file's entry in the *MoveTable*.
	//
	// ptszPath : The server MUST NOT modify this value.
	//
	// * TRK_E_POTENTIAL_FILE_FOUND: This value MUST be returned if there is no file on
	// any of the server's volumes with the requested FileID and ObjectID, and there is
	// no entry for this file's ObjectID in the MoveTable, but if there is a file with the
	// requested ObjectID on one of the server's volumes, and the FileID on that file is
	// all zeros. <12> ( caa74a29-27fb-4f50-afa5-bbf152fe5d27#Appendix_A_12 )
	//
	// The server MUST set the output parameters as follows:
	//
	// pdroidBirthNext : The value of the FileID for the found file.
	//
	// pdroidNext : The FileLocation of the file found by the server.
	//
	// pmcidNext : The MachineID of the server computer.
	//
	// ptszPath : A UNC of the file on the server computer.
	//
	// * Other negative return values: A negative value other than those mentioned above
	// MUST be returned if none of the preceding cases is met. The server MUST NOT modify
	// any of the output parameters.
	SearchMachine(context.Context, *SearchMachineRequest) (*SearchMachineResponse, error)
}

trkwks server interface.

Jump to

Keyboard shortcuts

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