X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fnetvis.h;h=35d9952ac826e3aed295da08405da580c1ce20d1;hb=8814de48529f0b5b828372e471a7523b5f2bb6de;hp=daec1cfade0116cbfa08b5632e253752b81ba8e1;hpb=229e1d6ab66a9e987ffe3cd4a8de7c7f874f6de1;p=netvis.git diff --git a/source/netvis.h b/source/netvis.h index daec1cf..35d9952 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,25 @@ 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 +59,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; };