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

Commit ea7fc90c authored by Bill Schilit's avatar Bill Schilit Committed by Thomas Girardier
Browse files

Allow toggling pcap logging on/off

Bug: 245578454
Test: Turn PCAP logging off
Ignore-AOSP-First: Cherry-picked from AOSP
Merged-In: I853ce784f224109b7c50e6d45fee86f9e7992c72
Change-Id: I853ce784f224109b7c50e6d45fee86f9e7992c72
parent 58e2af7c
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