Loading system/gd/hal/hci_hal_android_hidl.cc +1 −0 Original line number Original line Diff line number Diff line Loading @@ -113,6 +113,7 @@ class InternalHciCallbacks : public IBluetoothHciCallbacks { } // namespace } // namespace const std::string SnoopLogger::DefaultFilePath = "/data/misc/bluetooth/logs/btsnoop_hci.log"; const std::string SnoopLogger::DefaultFilePath = "/data/misc/bluetooth/logs/btsnoop_hci.log"; const bool SnoopLogger::AlwaysFlush = false; class HciHalHidl : public HciHal { class HciHalHidl : public HciHal { public: public: Loading system/gd/hal/hci_hal_host_rootcanal.cc +1 −0 Original line number Original line Diff line number Diff line Loading @@ -87,6 +87,7 @@ namespace bluetooth { namespace hal { namespace hal { const std::string SnoopLogger::DefaultFilePath = "/tmp/btsnoop_hci.log"; const std::string SnoopLogger::DefaultFilePath = "/tmp/btsnoop_hci.log"; const bool SnoopLogger::AlwaysFlush = true; class HciHalHostRootcanal : public HciHal { class HciHalHostRootcanal : public HciHal { public: public: Loading system/gd/hal/snoop_logger.cc +1 −0 Original line number Original line Diff line number Diff line Loading @@ -119,6 +119,7 @@ void SnoopLogger::capture(const HciPacket& packet, Direction direction, PacketTy .type = static_cast<uint8_t>(type)}; .type = static_cast<uint8_t>(type)}; btsnoop_ostream_.write(reinterpret_cast<const char*>(&header), sizeof(btsnoop_packet_header_t)); btsnoop_ostream_.write(reinterpret_cast<const char*>(&header), sizeof(btsnoop_packet_header_t)); btsnoop_ostream_.write(reinterpret_cast<const char*>(packet.data()), packet.size()); btsnoop_ostream_.write(reinterpret_cast<const char*>(packet.data()), packet.size()); if (AlwaysFlush) btsnoop_ostream_.flush(); } } void SnoopLogger::ListDependencies(ModuleList* list) { void SnoopLogger::ListDependencies(ModuleList* list) { Loading system/gd/hal/snoop_logger.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -35,6 +35,8 @@ class SnoopLogger : public ::bluetooth::Module { static const std::string DefaultFilePath; static const std::string DefaultFilePath; // Set File Path before module is started to ensure all packets are written to the right file // Set File Path before module is started to ensure all packets are written to the right file static void SetFilePath(const std::string& filename); static void SetFilePath(const std::string& filename); // Flag to allow flush into persistent memory on every packet captured. This is enabled on host for debugging. static const bool AlwaysFlush; enum class PacketType { enum class PacketType { CMD = 1, CMD = 1, Loading Loading
system/gd/hal/hci_hal_android_hidl.cc +1 −0 Original line number Original line Diff line number Diff line Loading @@ -113,6 +113,7 @@ class InternalHciCallbacks : public IBluetoothHciCallbacks { } // namespace } // namespace const std::string SnoopLogger::DefaultFilePath = "/data/misc/bluetooth/logs/btsnoop_hci.log"; const std::string SnoopLogger::DefaultFilePath = "/data/misc/bluetooth/logs/btsnoop_hci.log"; const bool SnoopLogger::AlwaysFlush = false; class HciHalHidl : public HciHal { class HciHalHidl : public HciHal { public: public: Loading
system/gd/hal/hci_hal_host_rootcanal.cc +1 −0 Original line number Original line Diff line number Diff line Loading @@ -87,6 +87,7 @@ namespace bluetooth { namespace hal { namespace hal { const std::string SnoopLogger::DefaultFilePath = "/tmp/btsnoop_hci.log"; const std::string SnoopLogger::DefaultFilePath = "/tmp/btsnoop_hci.log"; const bool SnoopLogger::AlwaysFlush = true; class HciHalHostRootcanal : public HciHal { class HciHalHostRootcanal : public HciHal { public: public: Loading
system/gd/hal/snoop_logger.cc +1 −0 Original line number Original line Diff line number Diff line Loading @@ -119,6 +119,7 @@ void SnoopLogger::capture(const HciPacket& packet, Direction direction, PacketTy .type = static_cast<uint8_t>(type)}; .type = static_cast<uint8_t>(type)}; btsnoop_ostream_.write(reinterpret_cast<const char*>(&header), sizeof(btsnoop_packet_header_t)); btsnoop_ostream_.write(reinterpret_cast<const char*>(&header), sizeof(btsnoop_packet_header_t)); btsnoop_ostream_.write(reinterpret_cast<const char*>(packet.data()), packet.size()); btsnoop_ostream_.write(reinterpret_cast<const char*>(packet.data()), packet.size()); if (AlwaysFlush) btsnoop_ostream_.flush(); } } void SnoopLogger::ListDependencies(ModuleList* list) { void SnoopLogger::ListDependencies(ModuleList* list) { Loading
system/gd/hal/snoop_logger.h +2 −0 Original line number Original line Diff line number Diff line Loading @@ -35,6 +35,8 @@ class SnoopLogger : public ::bluetooth::Module { static const std::string DefaultFilePath; static const std::string DefaultFilePath; // Set File Path before module is started to ensure all packets are written to the right file // Set File Path before module is started to ensure all packets are written to the right file static void SetFilePath(const std::string& filename); static void SetFilePath(const std::string& filename); // Flag to allow flush into persistent memory on every packet captured. This is enabled on host for debugging. static const bool AlwaysFlush; enum class PacketType { enum class PacketType { CMD = 1, CMD = 1, Loading