diff --git a/handler/textPacketHandler.hpp b/handler/textPacketHandler.hpp index 4ec9ac9..f4d99c1 100644 --- a/handler/textPacketHandler.hpp +++ b/handler/textPacketHandler.hpp @@ -29,11 +29,15 @@ const std::unordered_map PACKET_TYPE_MAP({ {"BA", PacketType::BlockAcknowledgment} }); +void parseHeader(Packet &packet, const std::vector &textPacket); void textPacketHandler(const std::vector textPacket){ /// Here we have to parse the packet // Create empty packet Packet packet; + parseHeader(packet, textPacket); +} +void parseHeader(Packet &packet, const std::vector &textPacket){ const std::string textHeader = textPacket[0]; const std::vector headerData = split(textHeader, ' '); @@ -142,6 +146,8 @@ void textPacketHandler(const std::vector textPacket){ // Write to packet probeResponsePacket.responseSsid = responseSsid; } +} + // }