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>
27 class NetVis: public Msp::Application
34 unsigned localnet_mask;
36 Msp::Graphics::SimpleGLWindow *wnd;
40 unsigned max_visible_hosts;
41 std::map<unsigned, Host *> hosts;
42 std::map<unsigned, Host *> disabled_hosts;
43 std::list<Packet *> packets;
44 std::map<unsigned, Msp::GL::Color> port_colors;
48 Msp::Time::TimeStamp tick_t;
49 Msp::Time::TimeStamp fps_t;
53 Msp::Debug::Profiler profiler;
59 const Msp::GL::Font &get_font() const { return *font; }
60 const std::map<unsigned, Host *> &get_hosts() const { return hosts; }
63 Host &get_host(unsigned);
64 Msp::GL::Color &get_port_color(unsigned);
65 void key_press(unsigned, unsigned, wchar_t);
67 static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *);
71 static Application::RegApp<NetVis> reg;