X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnetvis.h;h=50170386c9ece06ab538295541e5937a58b3f9b1;hb=f3939c5da4add9af55a26293c99f0f013052cc25;hp=daec1cfade0116cbfa08b5632e253752b81ba8e1;hpb=229e1d6ab66a9e987ffe3cd4a8de7c7f874f6de1;p=netvis.git diff --git a/source/netvis.h b/source/netvis.h index daec1cf..5017038 100644 --- a/source/netvis.h +++ b/source/netvis.h @@ -1,3 +1,10 @@ +/* $Id$ + +This file is part of NetVis +Copyright @ 2008 Mikko Rasa, Mikkosoft Productions +Distributed unter the GPL +*/ + #ifndef NETVIS_H_ #define NETVIS_H_ @@ -5,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -12,8 +20,9 @@ #include #include -class Packet; class Host; +class Packet; +class Resolver; class NetVis: public Msp::Application { @@ -21,14 +30,26 @@ private: std::string iface; pcap_t *pcap; std::list packets; + unsigned max_hosts; + unsigned max_visible_hosts; std::map hosts; + std::map disabled_hosts; Msp::Graphics::Display *dpy; Msp::Graphics::Window *wnd; Msp::Graphics::GLContext *glc; - Msp::Time::TimeStamp last_tick; + Msp::Time::TimeStamp tick_t; std::map port_colors; Msp::GL::Font *font; Msp::GL::Texture2D *font_tex; + Msp::Debug::Profiler profiler; + bool draw_labels; + bool blend; + Resolver *resolver; + unsigned localnet; + unsigned localnet_mask; + Msp::Time::TimeStamp fps_t; + unsigned frames; + float fps; public: NetVis(int, char **); @@ -39,9 +60,12 @@ private: virtual void tick(); Host &get_host(unsigned); Msp::GL::Color &get_port_color(unsigned); + void key_press(unsigned, unsigned, wchar_t); static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *); + void sighandler(int); + static Application::RegApp reg; };