Skip to content

Commit

Permalink
Merge pull request #55 from micolous/remove-user0
Browse files Browse the repository at this point in the history
Use `DLT_BLUETOOTH_LE_LL` for PPI rather than `DLT_USER0`.
  • Loading branch information
mikeryan authored Dec 12, 2020
2 parents 48fe012 + 75e6dc7 commit 41dc705
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/src/pcap-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
// since we no longer rely on or assume the existence of libpcap,
// hardcode these DLTs
#define DLT_PPI 192
#define DLT_USER0 147

#if defined( __APPLE__ )
#include <CoreServices/CoreServices.h>
Expand Down Expand Up @@ -99,6 +98,10 @@ typedef struct __attribute__((packed)) _pcap_bluetooth_bredr_bb_header {

/* --------------------------------- Low Energy ---------------------------- */

#if !defined( DLT_BLUETOOTH_LE_LL )
#define DLT_BLUETOOTH_LE_LL 251
#endif

#if !defined( DLT_BLUETOOTH_LE_LL_WITH_PHDR )
#define DLT_BLUETOOTH_LE_LL_WITH_PHDR 256
#endif
Expand Down
2 changes: 1 addition & 1 deletion lib/src/pcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ lell_pcap_append_ppi_packet(lell_pcap_handle * h, const uint64_t ns,
pcap_pkt.ppi_packet_header.pph_version = 0;
pcap_pkt.ppi_packet_header.pph_flags = 0;
pcap_pkt.ppi_packet_header.pph_len = htole16(pcap_headerlen);
pcap_pkt.ppi_packet_header.pph_dlt = htole32(DLT_USER0);
pcap_pkt.ppi_packet_header.pph_dlt = htole32(DLT_BLUETOOTH_LE_LL);

pcap_pkt.ppi_fieldheader.pfh_type = htole16(PPI_BTLE);
pcap_pkt.ppi_fieldheader.pfh_datalen = htole16(sizeof(ppi_btle_t));
Expand Down

0 comments on commit 41dc705

Please sign in to comment.