extended ICMP packet dumping to parts after packet creation
[pingcheck] / src / icmp / icmppacketfactory.h
index 384126b..ddad6a5 100644 (file)
@@ -34,8 +34,6 @@
 #include "icmp/icmppacket.h"
 
 
-void dump_packet(const std::string &data);
-
 enum DumpMode {
     DUMP_NEVER = 0,
     DUMP_IF_ERROR = 1,
@@ -61,6 +59,9 @@ public:
     static std::string DumpFilePrefix;
     static DumpMode PacketDumpMode;
 
+    static void dump_packet(const std::string &data);
+    static void dump_packet(const IcmpPacket &packet);
+
     static IcmpPacketItem create_icmp_packet(
             const boost::asio::ip::icmp::socket::protocol_type &protocol,
             std::istream &is
@@ -70,6 +71,9 @@ public:
             const uint16_t identifier,
             const uint16_t sequence_number
     );
+
+private:
+    static int create_dump_file(const time_t &capture_time);
 };
 
 #endif // ICMP_PACKET_FACTORY_H