Skip to main content

Crate ipt

Crate ipt 

Source
Expand description

Rust bindings to the Windows ipt.sys driver.

ipt.sys is the Windows kernel driver that manages Intel Processor Trace (Intel PT). There is no public Microsoft header or documentation for this interface; this crate provides its own typed request/response layouts for it.

Ipt::open the device, then call one Ipt method per driver operation (e.g. Ipt::start_process_trace, Ipt::get_trace_buffer). Each method builds its own request, issues the DeviceIoControl call and decodes the response — no manual buffer/IOCTL plumbing needed.

§Platform

This crate targets x86_64 on Windows only.

§Stability

ipt.sys is an internal OS component, not a supported public API. Its shape can change between Windows builds without notice. Treat this crate as best effort, only Microsoft & friends know how stable this really is.

Structs§

AddressFilterRangeResponse
Response to QueryThreadAddressFilterRange.
Ipt
Handle to the ipt.sys device, and the entry point for every operation in this crate.
IptOption
Options to be supplied by the caller when starting a trace (StartProcessTrace/StartProcessTraceEx), echoed back by QueryProcessTraceConfiguration, and the same layout is written to/read from the registry by SetSystemWideTracingOption/SetPerImageTracingOption.
TraceBuffer
Output buffer for Ipt::get_trace_buffer sized to hold a GetTraceBuffer response. Iterate the per-thread records it holds with TraceBuffer::iter.
TraceBufferIter
Iterator over a TraceBuffer’s per-thread trace records, returned by TraceBuffer::iter.
TraceRecordHeader
Per-thread record header inside a GetTraceBuffer response, immediately followed by payload_length bytes of raw Intel PT packets for that thread.

Enums§

AddressFilterMode
One IP-filtering range’s mode, as used by the ConfigureThreadAddressFilterRange request’s mode.
MatchSettings
Which identity the driver groups auto-started traces under.
RingFilter
Which privilege rings are traced (IA32_RTIT_CTL.OS/.User). Two parallel encodings exist depending on which API surface consumes the option; using the wrong half for the wrong opcode is rejected by the driver.
TimingMode
Which extra timing packets are generated beyond the default TSC packets.
TraceMode
Where captured trace data is written.

Constants§

NUM_TRIES_UNLIMITED
Sentinel for num_tries meaning “unlimited auto-start attempts”.