0.6.6
Version 0.6.6 Release Notes
✨ New Features
Add new NDISAPI functions from upstream wiresock/ndisapi (#37)
This release adds Rust bindings for the new IOCTLs — indexes 30–36 — and corresponding API functions introduced in the upstream wiresock/ndisapi C++ project, enabling per-filter mutation and driver-side cache control without rebuilding the entire filter table.
New Ndisapi Methods
Per-filter mutation
add_packet_filter_front— push a filter to the front of the tableadd_packet_filter_back— append a filter to the back of the tableinsert_packet_filter— insert a filter at a specific positionremove_packet_filter— remove a filter by zero-based index
Packet filter cache
set_packet_filter_cache_stateenable_packet_filter_cachedisable_packet_filter_cache
Packet fragment cache
set_packet_fragment_cache_stateenable_packet_fragment_cachedisable_packet_fragment_cache
New IOCTL Constants
Defined in src/driver/ioctl.rs:
IOCTL_NDISRD_ADD_PACKET_FILTER_FRONT—30IOCTL_NDISRD_ADD_PACKET_FILTER_BACK—31IOCTL_NDISRD_REMOVE_FILTER_BY_INDEX—32IOCTL_NDISRD_GET_ADP_FILTERS_LIST—33; constant only, no wrapper yet, matches upstreamIOCTL_NDISRD_INSERT_FILTER_BY_INDEX—34IOCTL_NDISRD_SET_FILTER_CACHE_STATE—35IOCTL_NDISRD_SET_FRAGMENT_CACHE_STATE—36
New Struct
StaticFilterWithPosition—#[repr(C, packed)]equivalent of_STATIC_FILTER_WITH_POSITION, containing aposition: u32followed by aStaticFilter. Re-exported from the crate root.
🧰 Maintenance
- Bump crate version to
0.6.6. - Update README install snippet.
Example
use ndisapi::{Ndisapi, StaticFilter};
let api = Ndisapi::new("NDISRD")?;
// Add/insert/remove individual filters without rebuilding the whole table
api.add_packet_filter_front(&filter)?;
api.insert_packet_filter(&filter, 2)?;
api.remove_packet_filter(filter_index)?;
// Toggle driver-side caches
api.disable_packet_filter_cache()?;
api.enable_packet_fragment_cache()?;Compatibility
No breaking changes — all additions are purely additive.
The new per-filter methods use the *_packet_filter_* prefix to stay consistent with the existing get_packet_filter_table / set_packet_filter_table API.