mslrec
import "github.com/TheManticoreProject/Manticore/windows/protocols/ms-lrec"
Index
type EVENT\_BUFFER
EVENT_BUFFER holds the block of event data returned by RpcNetEventReceiveData ([MS-LREC] 2.2.2.1). Buffer carries one or more NET_EVENT_DATA_HEADER structures ([MS-LREC] 2.3.2.2) each followed by its event payload, optionally terminated by a NET_EVENT_LOST structure ([MS-LREC] 2.3.2.3) when events were dropped.
The IDL declares Buffer as [size_is(BufferLength)] byte*; under the assumed pointer_default(unique) it is a unique pointer to a conformant array of bytes, so it is modeled as a slice tagged unique + size_is (a referent id, then the array body whose maximum_count is BufferLength).
type EVENT_BUFFER struct {
BufferLength ndr.DWORD
Buffer []uint8 `ndr:"unique,size_is=BufferLength"`
}
type PSESSION\_HANDLE
PSESSION_HANDLE is the RPC context handle that references an active event session on the server ([MS-LREC] 2.2.1.1). The IDL declares it as [context_handle] void*; on the wire it is the 20-byte ndr_context_handle representation — a 4-byte attributes field followed by a 16-byte GUID ([MS-RPCE] 2.3.2.2) — transmitted by value, never as a referent pointer.
RpcNetEventOpenSession and RpcNetEventCloseSession declare the parameter as PSESSION_HANDLE* (a pointer to the handle). Because a context handle is always transmitted as its 20-byte value, that extra indirection is a C-language artifact with no separate NDR referent, so both the by-value ([in]) and by-pointer ([out]/[in,out]) parameters are modeled as this same value type.
type PSESSION_HANDLE [20]byte
func (PSESSION_HANDLE) IsZero
func (h PSESSION_HANDLE) IsZero() bool
IsZero reports whether the handle is all zeros — for example, the nulled handle a server returns from RpcNetEventCloseSession after tearing the session down.