Module pcap

Module pcap 

Source
Expand description

Classic-pcap sink for captured frames.

Radio frames and ULCP control frames land in one file using the repository’s established synthetic Ethernet/IPv4/UDP encapsulation, so stock Wireshark opens a capture containing both layers. Raw LoRa bytes are also available, at the cost of a link type the user has to name.

LoRaTap carries the radio frame under a header describing the channel it arrived on, so the RSSI and SNR the receiver reported survive into the capture instead of being dropped on the floor. It is the encapsulation the Wireshark extcap interface uses, because it invents none of the addressing the Ethernet form has to.

Structs§

PcapWriter
RfParams
The channel a capture is listening on, read back from the device.

Enums§

CaptureLayers
Which layers a pcap file records.
PcapDirection
PcapEncapsulation

Constants§

LORATAP_RSSI_BIAS 🔒
LoRaTap reports signal strength as an unsigned byte biased by this much, so -139 dBm is zero.
LORATAP_V0_LEN 🔒
Fixed part of a LoRaTap v0 header, in bytes.
PCAP_LINKTYPE_ETHERNET 🔒
PCAP_LINKTYPE_LORATAP 🔒
RADIO_UDP_PORT 🔒
ULCP_DEVICE_UDP_PORT 🔒
ULCP_HOST_UDP_PORT 🔒

Functions§

ipv4_checksum 🔒
loratap_bandwidth 🔒
Map a bandwidth to LoRaTap’s enumerated byte.
loratap_rssi 🔒
Bias a dBm reading into LoRaTap’s unsigned byte, saturating rather than wrapping so an implausible reading stays at the rail.
loratap_snr 🔒
Convert centibels to LoRaTap’s signed quarter-dB byte, rounding to nearest.