Expand description
MS-EVEN6 — the EventLog Remoting Protocol v6, the Vista-era replacement for MS-EVEN.
Speaks over MS-RPCE (SMB named pipe \pipe\eventlog, interface UUID
F6BEAFF7-1E19-4FBB-9F8F-B89E2018337C v1.0). Lets a remote caller open a channel by
name, register an XPath query against it, pull matching event records, and read the
payload as BinXml (MS-EVEN6 §2.2.17) — the same wire form the local Vista+ EventLog
service hands to EvtRender.
Status: pre-alpha / 0.1.0-dev. The wire encoders for the core opnums exist and
round-trip against hand-crafted golden bytes; the BinXml decoder recognises the
commonly-used token subset (element open/close, attribute, value UTF-16LE, template
reference, EOF) and produces a structured Event. Full spec conformance and live-DC
iteration are deferred to a later revision.
§Layout
transport— a smallTransporttrait so the client can be driven by dcerpc’sSmbPipe(real DC) or a byte-scripted mock (tests). The dcerpc adapter istodofor 0.2.0 — it needs async plumbing that the sync-facing API doesn’t offer yet.opnums— opnum wire encoders/decoders (EvtRpcOpenLogHandle, RegisterLogQuery, QueryNext, Close).binxml— the BinXml token-stream decoder (channel, provider, event id, record id, time_created, and a rendered XML string).gaps— record-id gap detection over a set of pulled events.
The public API on this crate (EvenClient, open_log_handle,
register_log_query,
query_next, decode_binxml, detect_gaps) is sync —
the transport trait is sync too. A DC-real caller wraps their SmbPipe (async) via a
tokio::runtime::Handle::block_on shim; see examples/ (TBD) for the pattern.
Re-exports§
pub use binxml::decode_binxml;pub use binxml::Event;pub use gaps::detect_gaps;pub use gaps::RecordIdGap;pub use transport::Transport;
Modules§
- binxml
- BinXml decoder — MS-EVEN6 §2.2.17. Consumes the token stream that
EvtRpcQueryNextreturns per record and produces a structuredEvent. - gaps
- Record-id gap detection. EventRecordID is monotonically increasing per channel; any
break means the caller lost coverage (log wraparound, service restart, clear, or a
competing consumer). Given a pulled batch of events this returns each contiguous
[missing_start, missing_end]inclusive range. - opnums
- MS-EVEN6 opnum encoders/decoders (§3.1.4). NDR marshaling via
ms_ndr. - transport
- Transport trait — one
call(opnum, stub) -> Result<Vec<u8>>method the client uses to move NDR stubs to/from the remote. Sync socrate::EvenClient’s API stays sync; a live-DC driver wraps its asyncdcerpc::transport::SmbPipebehindblock_on.
Structs§
- Context
Handle - A remote MS-EVEN6 CONTEXT_HANDLE (20 bytes: attributes u32 + 16-byte UUID). Returned by EvtRpcOpenLogHandle; passed back to Read/Clear/QueryChannel calls.
- Even
Client - The high-level MS-EVEN6 client.
- Query
Handle - The handle a caller keeps for pulling records after RegisterLogQuery.
- Syntax
- A DCE/RPC abstract syntax (UUID + interface version) — the tiny local stand-in
for
dcerpc::Syntaxwhile the dcerpc integration is deferred. Wire byte layout matches DCE (little-endian UUID, u16 major, u16 minor).
Enums§
- Even
Error - Only way anything in this crate fails.
Functions§
- even6_
syntax - The MS-EVEN6 interface: UUID F6BEAFF7-1E19-4FBB-9F8F-B89E2018337C, v1.0.