X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnetvis.h;h=eb8c0a8e9d66fab276be8e6cd93687302a11db78;hb=d44d45bee2c3b6b5a8822ecdc23528dcf039ee2a;hp=47f5de5bd31e7b05ea80248fe1ae32f32ffa5669;hpb=dca5eb6c41ea4315203fdf8edaa81e7f6575cca5;p=netvis.git diff --git a/source/netvis.h b/source/netvis.h index 47f5de5..eb8c0a8 100644 --- a/source/netvis.h +++ b/source/netvis.h @@ -22,6 +22,7 @@ Distributed unter the GPL class Host; class Packet; +class Port; class Resolver; class NetVis: public Msp::Application @@ -41,28 +42,26 @@ private: std::map hosts; std::map disabled_hosts; std::list packets; - std::map port_colors; - bool draw_labels; - bool blend; + std::map ports; 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 &get_hosts() const { return hosts; } + const std::map &get_ports() const { return ports; } private: virtual void tick(); + void render(); Host &get_host(unsigned); - Msp::GL::Color &get_port_color(unsigned); - void key_press(unsigned, unsigned, wchar_t); + Msp::GL::Color generate_color(bool) const; + const Port &get_port(unsigned); static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *);