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

Commit aa8d3aed authored by Bill Schilit's avatar Bill Schilit Committed by Gerrit Code Review
Browse files

Merge "Allow toggling pcap logging on/off"

parents 58e885b2 09850c2f
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