wdsrpc

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Syntax UUID
	WdsRPCSyntaxUUID = &uuid.UUID{TimeLow: 0x1a927394, TimeMid: 0x352e, TimeHiAndVersion: 0x4553, ClockSeqHiAndReserved: 0xae, ClockSeqLow: 0x3f, Node: [6]uint8{0x7c, 0xf4, 0xaa, 0xfc, 0xa6, 0x20}}
	// Syntax ID
	WdsRPCSyntaxV1_0 = &dcerpc.SyntaxID{IfUUID: WdsRPCSyntaxUUID, IfVersionMajor: 1, IfVersionMinor: 0}
)
View Source
var (
	// import guard
	GoPackage = "wdsc"
)

Functions

func NewWdsRPCServerHandle

func NewWdsRPCServerHandle(o WdsRPCServer) dcerpc.ServerHandle

func RegisterWdsRPCServer

func RegisterWdsRPCServer(conn dcerpc.Conn, o WdsRPCServer, opts ...dcerpc.Option)

func WdsRPCServerHandle

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

Types

type MessageRequest

type MessageRequest struct {
	// uRequestPacketSize: The client MUST pass the total size of request packet in bytes.
	RequestPacketSize uint32 `idl:"name:uRequestPacketSize" json:"request_packet_size"`
	// bRequestPacket: A pointer to the request packet. The packet MUST be constructed as
	// specified in section 2.2.1.
	RequestPacket []byte `idl:"name:bRequestPacket;size_is:(uRequestPacketSize)" json:"request_packet"`
}

MessageRequest structure represents the WdsRpcMessage operation request

func (*MessageRequest) MarshalNDR

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

func (*MessageRequest) UnmarshalNDR

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

type MessageResponse

type MessageResponse struct {
	// puReplyPacketSize: The WDS Server MUST set this to the total size of the reply packet
	// in bytes.
	ReplyPacketSize uint32 `idl:"name:puReplyPacketSize" json:"reply_packet_size"`
	// pbReplyPacket: The WDS Server MUST set this to the reply packet. The reply packet
	// MUST be constructed as specified in section 2.2.1.
	ReplyPacket []byte `idl:"name:pbReplyPacket;size_is:(, puReplyPacketSize)" json:"reply_packet"`
	// Return Values: The method MUST return ERROR_SUCCESS (0x00000000) on success or a
	// non-zero Win32 error code value if an error occurred.
	ReturnValue uint32 `idl:"name:ReturnValue" json:"return_value"`
}

MessageResponse structure represents the WdsRpcMessage operation response

func (*MessageResponse) MarshalNDR

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

func (*MessageResponse) UnmarshalNDR

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

type WdsRPCClient

type WdsRPCClient interface {

	// The WdsRpcMessage (opnum 0) method sends the request packet to the server and returns
	// the corresponding reply packet.
	//
	// Return Values: The method MUST return ERROR_SUCCESS (0x00000000) on success or a
	// non-zero Win32 error code value if an error occurred.
	Message(context.Context, *MessageRequest, ...dcerpc.CallOption) (*MessageResponse, error)

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

WdsRpc interface.

func NewWdsRPCClient

func NewWdsRPCClient(ctx context.Context, cc dcerpc.Conn, opts ...dcerpc.Option) (WdsRPCClient, error)

type WdsRPCServer

type WdsRPCServer interface {

	// The WdsRpcMessage (opnum 0) method sends the request packet to the server and returns
	// the corresponding reply packet.
	//
	// Return Values: The method MUST return ERROR_SUCCESS (0x00000000) on success or a
	// non-zero Win32 error code value if an error occurred.
	Message(context.Context, *MessageRequest) (*MessageResponse, error)
}

WdsRpc server interface.

Jump to

Keyboard shortcuts

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