winptap-native 0.2.0

Independent native Packet Monitor RX capture for Windows x64
Documentation
1
2
3
4
5
6
7
8
use winptap_core::*;
/// Serialize the verified session-ID-prefixed constraint without padding leaks.
pub(crate) fn encode(id: u64, filter: &Filter) -> Result<[u8; 224]> {
    let mut bytes = [0; 224];
    bytes[..8].copy_from_slice(&id.to_le_bytes());
    bytes[8..].copy_from_slice(&encode_constraint(filter)?);
    Ok(bytes)
}