3 This file is part of NetVis
4 Copyright @ 2008 Mikko Rasa, Mikkosoft Productions
5 Distributed unter the GPL
14 #include <msp/core/application.h>
15 #include <msp/debug/profiler.h>
16 #include <msp/gbase/display.h>
17 #include <msp/gbase/glcontext.h>
18 #include <msp/gbase/simplewindow.h>
19 #include <msp/gl/color.h>
20 #include <msp/gl/font.h>
21 #include <msp/time/timestamp.h>
29 class NetVis: public Msp::Application
36 unsigned localnet_mask;
38 Msp::Graphics::SimpleGLWindow *wnd;
42 unsigned max_visible_hosts;
43 std::map<unsigned, Host *> hosts;
44 std::map<unsigned, Host *> disabled_hosts;
45 std::list<Packet *> packets;
46 std::map<unsigned, Port *> ports;
49 Msp::Time::TimeStamp tick_t;
50 Msp::Time::TimeStamp fps_t;
58 const Msp::GL::Font &get_font() const { return *font; }
59 const std::map<unsigned, Host *> &get_hosts() const { return hosts; }
60 const std::map<unsigned, Port *> &get_ports() const { return ports; }
64 Host &get_host(unsigned);
65 Msp::GL::Color generate_color(bool) const;
66 const Port &get_port(unsigned);
67 void create_history_texture();
69 static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *);
73 static Application::RegApp<NetVis> reg;