Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f2653c2 authored by Bill Schilit's avatar Bill Schilit Committed by Automerger Merge Worker
Browse files

Merge "Allow toggling pcap logging on/off" am: aa8d3aed am: 1a1741d5

parents 547882b5 1a1741d5
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -39,6 +39,9 @@ void HciSniffer::SetOutputStream(std::shared_ptr<std::ostream> outputStream) {
void HciSniffer::AppendRecord(PacketDirection packet_direction,
void HciSniffer::AppendRecord(PacketDirection packet_direction,
                              PacketType packet_type,
                              PacketType packet_type,
                              const std::vector<uint8_t>& packet) {
                              const std::vector<uint8_t>& packet) {
  if (output_ == nullptr) {
    return;
  }
  pcap::WriteRecordHeader(*output_, 4 + 1 + packet.size());
  pcap::WriteRecordHeader(*output_, 4 + 1 + packet.size());


  // http://www.tcpdump.org/linktypes.html LINKTYPE_BLUETOOTH_HCI_H4_WITH_PHDR
  // http://www.tcpdump.org/linktypes.html LINKTYPE_BLUETOOTH_HCI_H4_WITH_PHDR