rftap

Crates.iorftap
lib.rsrftap
version0.2.0
created_at2025-07-05 08:11:20.467182+00
updated_at2026-01-17 10:34:05.02675+00
descriptionParser and serializer for RFTap protocol
homepage
repositoryhttps://github.com/joushx/rftap-rs
max_upload_size
id1738821
size15,177
Johannes Mittendorfer (joushx)

documentation

README

rftap

rftap is a library for parsing and serializing the RFTap protocol, which is used in recordings of radio frequency (RF) data transmission and is also supported in Wireshark.

Parse

let serialized: Vec<u8> = hex::decode( "524674610a00250694000000000000004368a341000000000000808e77e7d8410000000079d6d03f")?;
let restored = RfTapPacket::parse(&serialized)?;

Serialize

let packet = RfTapPacket {
    dlt: Some(123),
    freq: Some(1234566.0),
    nomfreq: Some(67456745.0),
    freqofs: Some(0.000003),
    isdbm: false,
    power: Some(12.3),
    noise: Some(0.4),
    snr: Some(99.9),
    isunixtime: true,
    qual: Some(100.0),
    time: Some(1751558597250044416),
    duration: Some(33.0),
    location: Some((48.0, 14.0, 440.0)),
    payload: &vec![0xff, 0xff, 0xff]
};

let serialized: Vec<u8> = packet.serialize()?;
Commit count: 2

cargo fmt