msswn
import "github.com/TheManticoreProject/Manticore/windows/protocols/ms-swn"
Index
- type PCONTEXT_HANDLE
- type PCONTEXT_HANDLE_SHARED
- type PPCONTEXT_HANDLE
- type RESP_ASYNC_NOTIFY
- type WITNESS_INTERFACE_INFO
- type WITNESS_INTERFACE_LIST
type PCONTEXT\_HANDLE
PCONTEXT_HANDLE is the RPC context handle returned by WitnessrRegister / WitnessrRegisterEx that identifies the client’s registration on the Witness server ([MS-SWN] 2.2.1.1). The IDL types it as [context_handle] void *; on the wire it is a 20-octet context handle (a 4-byte attributes field followed by a 16-byte GUID, [MS-RPCE] 2.3.2.2), transmitted inline with no referent id.
type PCONTEXT_HANDLE [20]byte
func (PCONTEXT_HANDLE) IsZero
func (h PCONTEXT_HANDLE) IsZero() bool
IsZero reports whether the handle is all zeros (for example, after a successful WitnessrUnRegister, which the server returns nulled out).
type PCONTEXT\_HANDLE\_SHARED
PCONTEXT_HANDLE_SHARED is the shared RPC context handle passed to WitnessrAsyncNotify ([MS-SWN] 2.2.1.3). The IDL types it as [context_handle] PCONTEXT_HANDLE, allowing the same registration handle to be used concurrently by the long-running AsyncNotify call while other calls run; on the wire it is the same 20-octet context handle as PCONTEXT_HANDLE, so it is modeled as an alias.
type PCONTEXT_HANDLE_SHARED = PCONTEXT_HANDLE
type PPCONTEXT\_HANDLE
PPCONTEXT_HANDLE is the [out] / [in,out] context-handle parameter type of WitnessrRegister, WitnessrRegisterEx, and WitnessrUnRegisterEx ([MS-SWN] 2.2.1.2). The IDL types it as [ref] PCONTEXT_HANDLE * — a ref pointer to a context handle. A ref pointer to a context handle emits no referent id, and the context handle itself is transmitted inline as 20 octets, so on the wire it is identical to PCONTEXT_HANDLE and is modeled as an alias.
type PPCONTEXT_HANDLE = PCONTEXT_HANDLE
type RESP\_ASYNC\_NOTIFY
RESP_ASYNC_NOTIFY is the notification response returned by WitnessrAsyncNotify ([MS-SWN] 2.2.2.4). MessageType selects the shape encoded in MessageBuffer (RESOURCE_CHANGE_NOTIFICATION, CLIENT_MOVE_NOTIFICATION, SHARE_MOVE_NOTIFICATION, IP_CHANGE_NOTIFICATION); NumberOfMessages is the number of encoded messages; Length is the byte length of MessageBuffer.
MessageBuffer is a [size_is(Length)] unique PBYTE: a unique pointer to a conformant byte array sized by Length. Its contents are an opaque, message-type-specific blob that callers parse per [MS-SWN] 2.2.2 (this codec transports it as raw bytes).
type RESP_ASYNC_NOTIFY struct {
MessageType uint32
Length uint32
NumberOfMessages uint32
MessageBuffer []uint8 `ndr:"unique,size_is=Length"`
}
type WITNESS\_INTERFACE\_INFO
WITNESS_INTERFACE_INFO describes one witness-capable interface of the server ([MS-SWN] 2.2.2.5), as returned in WITNESS_INTERFACE_LIST by WitnessrGetInterfaceList.
InterfaceGroupName is a fixed 260-WCHAR, null-terminated interface group name. State is a USHORT taking the values UNKNOWN (0x0000), AVAILABLE (0x0001), or UNAVAILABLE (0x00FF). IPV4 is the interface’s IPv4 address (0 if none); IPV6 is a fixed array of eight USHORTs holding the IPv6 address (all zero if none). Flags is a bitmask (INTERFACE_WITNESS 0x00000001 => this node runs the Witness service; otherwise the low bit selects whether IPV4/IPV6 is valid per the spec). All fields are fixed size and transmitted inline.
type WITNESS_INTERFACE_INFO struct {
InterfaceGroupName [260]uint16
Version ndr.DWORD
State uint16
IPV4 ndr.DWORD
IPV6 [8]uint16
Flags uint32
}
type WITNESS\_INTERFACE\_LIST
WITNESS_INTERFACE_LIST is the list of witness-capable interfaces returned by WitnessrGetInterfaceList ([MS-SWN] 2.2.2.6). NumberOfInterfaces is the element count; InterfaceInfo is a [size_is(NumberOfInterfaces)] unique pointer to a conformant array of WITNESS_INTERFACE_INFO (the codec emits a referent id, then defers the array body).
type WITNESS_INTERFACE_LIST struct {
NumberOfInterfaces uint32
InterfaceInfo []WITNESS_INTERFACE_INFO `ndr:"unique,size_is=NumberOfInterfaces"`
}