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

Commit 09850c2f authored by Bill Schilit's avatar Bill Schilit
Browse files

Allow toggling pcap logging on/off

Test: Turn PCAP logging off

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

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