]> git.tdb.fi Git - netvis.git/blobdiff - source/netvis.h
Support IPv6
[netvis.git] / source / netvis.h
index a59b65061f37141f30bacb88cf0145cf61b21d19..cd451339880c4fc5d40ceaf0666df937f34461f2 100644 (file)
@@ -13,6 +13,7 @@ Distributed unter the GPL
 #include <pcap.h>
 #include <netinet/ether.h>
 #include <netinet/ip.h>
+#include <netinet/ip6.h>
 #include <netinet/tcp.h>
 #include <netinet/udp.h>
 #include <msp/core/application.h>
@@ -49,7 +50,7 @@ private:
        std::string iface;
        pcap_t *pcap;
        Resolver *resolver;
-       Address localnet;
+       std::list<Address> localnets;
 
        Msp::Graphics::SimpleGLWindow *wnd;
        Msp::GL::Font *font;
@@ -85,6 +86,7 @@ private:
        static void capture_handler(unsigned char *, const pcap_pkthdr *, const unsigned char *);
        void handle_ethernet(CaptureContext &, const ethhdr *, unsigned);
        void handle_ipv4(CaptureContext &, const iphdr *, unsigned);
+       void handle_ipv6(CaptureContext &, const ip6_hdr *, unsigned);
        void handle_tcp(CaptureContext &, const tcphdr *, unsigned);
        void handle_udp(CaptureContext &, const udphdr *, unsigned);
        void handle_packet(CaptureContext &);