Back to index

natlog  0.91.0
conntrack.h
Go to the documentation of this file.
00001 #ifndef INCLUDED_CONNTRACK_
00002 #define INCLUDED_CONNTRACK_
00003 
00004 #include <iosfwd>
00005 
00006 #include <bobcat/process>
00007 #include <bobcat/pattern>
00008 
00009 #include "../signal/signal.h"
00010 #include "../conntrackrecord/conntrackrecord.h"
00011 
00012 class Options;
00013 
00014 class Conntrack: public SignalHandler
00015 {
00016     ConntrackRecord d_connections;
00017     Options &d_options;
00018     FBB::Process d_conntrack;
00019     std::ostream &d_stdMsg;
00020 
00021     public:
00022         Conntrack(std::ostream &stdMsg);
00023         ~Conntrack();
00024         void run(std::ostream &parent);
00025 
00026     private:
00027         void log(ConntrackRecord::Record const &record, 
00028                     std::string const &endSeconds, 
00029                     std::string endMicroSecs);
00030 
00031         virtual void signaled(size_t signum) override;
00032 };
00033         
00034 #endif
00035