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

Commit 0a990166 authored by Myles Watson's avatar Myles Watson
Browse files

Sniffer: Print LinkLayer packet type strings

Bug: 138260499
Test: connect to the test console
      add sniffer 3C:5A:B4:01:02:03
      start a scan on the phone
Change-Id: Ia2cf49e11b9400dbb9de2d7e26fe0859c3db406d
parent e9cce272
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -47,8 +47,10 @@ void Sniffer::IncomingPacket(model::packets::LinkLayerPacketView packet) {
  if (!match_source && !match_dest) {
    return;
  }
  LOG_INFO("%s %s -> %s (Type %d)", (match_source ? (match_dest ? "<->" : "<--") : "-->"), source.ToString().c_str(),
           dest.ToString().c_str(), static_cast<int>(packet.GetType()));
  LOG_INFO("%s %s -> %s (Type %s)",
           (match_source ? (match_dest ? "<->" : "<--") : "-->"),
           source.ToString().c_str(), dest.ToString().c_str(),
           model::packets::PacketTypeText(packet.GetType()).c_str());
}

}  // namespace test_vendor_lib