X-Git-Url: http://git.tdb.fi/?p=netvis.git;a=blobdiff_plain;f=source%2Fnetvis.h;h=fd1b73cddc57440a38e7a3fc3ad48203fd1d9a5c;hp=47f5de5bd31e7b05ea80248fe1ae32f32ffa5669;hb=c147c9caaf9bc2f6323baf188a438ced9f0f5894;hpb=6ffe2b950143c5474659cbca2bbcdf58d6b8322c diff --git a/source/netvis.h b/source/netvis.h index 47f5de5..fd1b73c 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,7 +42,7 @@ private: std::map hosts; std::map disabled_hosts; std::list packets; - std::map port_colors; + std::map ports; bool draw_labels; bool blend; @@ -61,7 +62,8 @@ public: private: virtual void tick(); Host &get_host(unsigned); - Msp::GL::Color &get_port_color(unsigned); + Msp::GL::Color generate_color(bool) const; + const Port &get_port(unsigned); void key_press(unsigned, unsigned, wchar_t); static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *);