]> git.tdb.fi Git - netvis.git/blobdiff - source/netvis.h
Track and display the activity of ports
[netvis.git] / source / netvis.h
index fd1b73cddc57440a38e7a3fc3ad48203fd1d9a5c..a205d0564af72b89e340173b212614cc54a5c404 100644 (file)
@@ -20,6 +20,7 @@ Distributed unter the GPL
 #include <msp/gl/font.h>
 #include <msp/time/timestamp.h>
 
+class History;
 class Host;
 class Packet;
 class Port;
@@ -42,29 +43,28 @@ private:
        std::map<unsigned, Host *> hosts;
        std::map<unsigned, Host *> disabled_hosts;
        std::list<Packet *> packets;
-       std::map<unsigned, Port> ports;
-       bool draw_labels;
-       bool blend;
+       std::map<unsigned, Port *> ports;
+       History *history;
 
        Msp::Time::TimeStamp tick_t;
        Msp::Time::TimeStamp fps_t;
        unsigned frames;
        float fps;
 
-       Msp::Debug::Profiler profiler;
-
 public:
        NetVis(int, char **);
        ~NetVis();
 
        const Msp::GL::Font &get_font() const { return *font; }
        const std::map<unsigned, Host *> &get_hosts() const { return hosts; }
+       const std::map<unsigned, Port *> &get_ports() const { return ports; }
 private:
        virtual void tick();
+       void render();
        Host &get_host(unsigned);
        Msp::GL::Color generate_color(bool) const;
-       const Port &get_port(unsigned);
-       void key_press(unsigned, unsigned, wchar_t);
+       Port &get_port(unsigned);
+       void create_history_texture();
 
        static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *);