]> git.tdb.fi Git - netvis.git/blobdiff - source/netvis.h
Resolve port names
[netvis.git] / source / netvis.h
index 47f5de5bd31e7b05ea80248fe1ae32f32ffa5669..fd1b73cddc57440a38e7a3fc3ad48203fd1d9a5c 100644 (file)
@@ -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<unsigned, Host *> hosts;
        std::map<unsigned, Host *> disabled_hosts;
        std::list<Packet *> packets;
-       std::map<unsigned, Msp::GL::Color> port_colors;
+       std::map<unsigned, Port> 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 *);