Expand description
A parser for the BTSnoop file format, which is a bluetooth HCI logs format similar to the snoop format, as documented in RFC 1761. Reference: https://fte.com/webhelpii/bpa600/Content/Technical_Information/BT_Snoop_File_Format.htm
Notably this is used in Android and can be captured from your device following instructions from Verifying and Debugging Bluetooth on source.android.com.
§Example
use btsnoop::parse_btsnoop_file;
let btsnoop_bytes: &[u8] = include_bytes!("testdata/btsnoop_hci.log");
let file: btsnoop::File = parse_btsnoop_file(btsnoop_bytes).unwrap();
for packet in file.packets {
println!("Packet={:x?}", packet.packet_data);
}
Structs§
- File
- Represents the entire btsnoop file. This includes one fixed-size file header followed
by an arbitrary number of
Packet
s. - File
Header - The file header contains general metadata about the packet file and format of the packets it contains.
- Packet
- A packet record in the logs.
- Packet
Flags - The packet flags field.
- Packet
Header - Header fields for a packet record.
Enums§
- Command
Flag - The packet type, whether it contains data or commands.
- Datalink
Type - The type of datalink header used in the packet records that follow.
- Direction
Flag - Direction of data transfer.
- Error
- Error type returned in
parse_btsnoop_file
if parsing failed.
Functions§
- parse_
btsnoop_ file - Parses a given btsnoop file.