idmnotify

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// IDMNotify interface identifier d2d79df7-3400-11d0-b40b-00aa005ff586
	IDMNotifyIID = &dcom.IID{Data1: 0xd2d79df7, Data2: 0x3400, Data3: 0x11d0, Data4: []byte{0xb4, 0x0b, 0x00, 0xaa, 0x00, 0x5f, 0xf5, 0x86}}
	// Syntax UUID
	IDMNotifySyntaxUUID = &uuid.UUID{TimeLow: 0xd2d79df7, TimeMid: 0x3400, TimeHiAndVersion: 0x11d0, ClockSeqHiAndReserved: 0xb4, ClockSeqLow: 0xb, Node: [6]uint8{0x0, 0xaa, 0x0, 0x5f, 0xf5, 0x86}}
	// Syntax ID
	IDMNotifySyntaxV0_0 = &dcerpc.SyntaxID{IfUUID: IDMNotifySyntaxUUID, IfVersionMajor: 0, IfVersionMinor: 0}
)
View Source
var (
	// import guard
	GoPackage = "dcom/dmrp"
)

Functions

func IDMNotifyServerHandle

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

func NewIDMNotifyServerHandle

func NewIDMNotifyServerHandle(o IDMNotifyServer) dcerpc.ServerHandle

func RegisterIDMNotifyServer

func RegisterIDMNotifyServer(conn dcerpc.Conn, o IDMNotifyServer, opts ...dcerpc.Option)

Types

type IDMNotifyClient

type IDMNotifyClient interface {

	// IUnknown retrieval method.
	Unknown() iunknown.UnknownClient

	// The ObjectsChanged method notifies the client of object changes.
	//
	// Return Values: The method MUST return 0 or a nonerror HRESULT on success, or an implementation-specific
	// nonzero error code on failure (as specified in [MS-ERREF] section 2.1).
	ObjectsChanged(context.Context, *ObjectsChangedRequest, ...dcerpc.CallOption) (*ObjectsChangedResponse, error)

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

	// IPID sets the object interface identifier.
	IPID(context.Context, *dcom.IPID) IDMNotifyClient
}

IDMNotify interface.

func NewIDMNotifyClient

func NewIDMNotifyClient(ctx context.Context, cc dcerpc.Conn, opts ...dcerpc.Option) (IDMNotifyClient, error)

type IDMNotifyServer

type IDMNotifyServer interface {

	// IUnknown base class.
	iunknown.UnknownServer

	// The ObjectsChanged method notifies the client of object changes.
	//
	// Return Values: The method MUST return 0 or a nonerror HRESULT on success, or an implementation-specific
	// nonzero error code on failure (as specified in [MS-ERREF] section 2.1).
	ObjectsChanged(context.Context, *ObjectsChangedRequest) (*ObjectsChangedResponse, error)
}

IDMNotify server interface.

type ObjectsChangedRequest

type ObjectsChangedRequest struct {
	// This: ORPCTHIS structure that is used to send ORPC extension data to the server.
	This *dcom.ORPCThis `idl:"name:This" json:"this"`
	// ByteCount: Length of ByteStream in bytes.
	ByteCount uint32 `idl:"name:ByteCount" json:"byte_count"`
	// ByteStream: Array of bytes that compose any number of variable-length change notification
	// structures. Memory for the array is allocated and freed by the caller (that is, the
	// server).
	//
	// Any variable-length change notification structure in the array starts with a fixed
	// header that contains the fields shown in the following table.
	//
	//	+------------+--------------------+-----------------------------------------------+
	//	|   FIELD    |        DATA        |                                               |
	//	|    NAME    |        TYPE        |                  DESCRIPTION                  |
	//	|            |                    |                                               |
	//	+------------+--------------------+-----------------------------------------------+
	//	+------------+--------------------+-----------------------------------------------+
	//	| size       | ULONG              | The total size of the structure in bytes.     |
	//	+------------+--------------------+-----------------------------------------------+
	//	| type       | DMNOTIFY_INFO_TYPE | The type of object that changed.              |
	//	+------------+--------------------+-----------------------------------------------+
	//	| action     | LDMACTION          | The type of change that the object underwent. |
	//	+------------+--------------------+-----------------------------------------------+
	//
	// Depending on the value of type, the fixed header of the notification structure is
	// followed by one of the following items.
	//
	//	+----------------------+----------------------------------------------------------------------------------+
	//	|                      |                          STRUCTURE FOLLOWING THE FIXED                           |
	//	|         TYPE         |                                      HEADER                                      |
	//	|                      |                                                                                  |
	//	+----------------------+----------------------------------------------------------------------------------+
	//	+----------------------+----------------------------------------------------------------------------------+
	//	| DMNOTIFY_VOLUME_INFO | VOLUME_INFO                                                                      |
	//	+----------------------+----------------------------------------------------------------------------------+
	//	| DMNOTIFY_TASK_INFO   | TASK_INFO                                                                        |
	//	+----------------------+----------------------------------------------------------------------------------+
	//	| DMNOTIFY_DL_INFO     | DRIVE_LETTER_INFO                                                                |
	//	+----------------------+----------------------------------------------------------------------------------+
	//	| DMNOTIFY_FS_INFO     | FILE_SYSTEM_INFO                                                                 |
	//	+----------------------+----------------------------------------------------------------------------------+
	//	| DMNOTIFY_SYSTEM_INFO | ULONG                                                                            |
	//	+----------------------+----------------------------------------------------------------------------------+
	//	| DMNOTIFY_DISK_INFO   | If client called Initialize on IVolumeClient interface, then DISK_INFO. If       |
	//	|                      | client called Initialize on IVolumeClient3 interface, then DISK_INFO_EX.         |
	//	+----------------------+----------------------------------------------------------------------------------+
	//	| DMNOTIFY_REGION_INFO | If client called Initialize on IVolumeClient interface, then REGION_INFO. If     |
	//	|                      | client called Initialize on IVolumeClient3 interface, then REGION_INFO_EX.       |
	//	+----------------------+----------------------------------------------------------------------------------+
	//
	// Note  The structures that are transmitted within ByteStream are not marshaled in
	// RPC Network Data Representation (NDR) format. They are C structures, and the memory
	// layout and field types are those found on the Windows/Intel 32-bit and 64-bit architectures,
	// and, Windows/AMD 64-bit architecture. These structures are not packed, and padding
	// bytes can exist between successive structure fields to ensure that the field of a
	// given data type begins at a byte offset that is an integer multiple of the type's
	// size with respect to the beginning of the structure. The structures transmitted within
	// ByteStream also appear in other interfaces as RPC-marshaled structures. In these
	// interfaces, the structure fields will be marshaled in NDR format.
	//
	// *
	//
	// The structure is copied one byte at a time from memory into ByteStream beginning
	// at first byte after action field. If the structure contains character pointer fields,
	// those fields are omitted.
	//
	// *
	//
	// The character strings of the character pointer fields are copied into ByteStream
	// following the structure in the order in which they appear in the structure. All strings
	// are null-terminated. There is no padding between the end of the structure and the
	// first string, or between successive strings.
	//
	// At the client, the following technique is used to parse the byte stream back into
	// the appropriate structures:
	//
	// *
	//
	// The notification size, type, and action are parsed from the byte stream.
	//
	// *
	//
	// The notification object structure, up through the first string field, is copied out
	// of the byte stream and into the appropriate structure. For the IVolumeClient interface,
	// the disk ( 3c91641b-e5cd-409e-a445-2e4d61ae33c6#gt_c4133b2a-a990-4042-ba44-7fda3090f118
	// ) and region structures are DISK_INFO and REGION_INFO; for the IVolumeClient3 interface,
	// the structures are DISK_INFO_EX and REGION_INFO_EX. The client's ObjectsChanged implementation
	// MUST switch based on which version of the IVolumeClient interface is being used.
	// The client MUST also determine the type of processor architecture for both the server
	// and client. If the architectures are the same, the padding in the client-defined
	// structures will match that used in the server's byte stream. If the architectures
	// are not the same, the client MUST use the proper method for parsing the byte stream,
	// taking into account padding that MAY have been added for alignment purposes on either
	// the client or on the server. For more information, see section 8 ( 562d58df-633f-4afa-89ec-80917a2852b3
	// ).
	//
	// Allocations are done on the client to hold the character strings of the character
	// pointer fields. These fields are copied from ByteStream to the client-allocated buffers,
	// and appropriate structure fields are set to point to the client-allocated buffers.
	// All strings are null-terminated.
	ByteStream []byte `idl:"name:ByteStream;size_is:(ByteCount)" json:"byte_stream"`
}

ObjectsChangedRequest structure represents the ObjectsChanged operation request

func (*ObjectsChangedRequest) MarshalNDR

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

func (*ObjectsChangedRequest) UnmarshalNDR

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

type ObjectsChangedResponse

type ObjectsChangedResponse struct {
	// That: ORPCTHAT structure that is used to return ORPC extension data to the client.
	That *dcom.ORPCThat `idl:"name:That" json:"that"`
	// Return: The ObjectsChanged return value.
	Return int32 `idl:"name:Return" json:"return"`
}

ObjectsChangedResponse structure represents the ObjectsChanged operation response

func (*ObjectsChangedResponse) MarshalNDR

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

func (*ObjectsChangedResponse) UnmarshalNDR

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

Jump to

Keyboard shortcuts

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