]> git.tdb.fi Git - netvis.git/blobdiff - source/netvis.h
Handle ICMP packets
[netvis.git] / source / netvis.h
index a59b65061f37141f30bacb88cf0145cf61b21d19..1c8c2874f29d3236f85d073c74f8934e94d7e86b 100644 (file)
@@ -12,7 +12,10 @@ Distributed unter the GPL
 #include <map>
 #include <pcap.h>
 #include <netinet/ether.h>
+#include <netinet/icmp6.h>
 #include <netinet/ip.h>
+#include <netinet/ip_icmp.h>
+#include <netinet/ip6.h>
 #include <netinet/tcp.h>
 #include <netinet/udp.h>
 #include <msp/core/application.h>
@@ -49,7 +52,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,8 +88,11 @@ 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_icmp(CaptureContext &, const icmphdr *, unsigned);
+       void handle_icmp6(CaptureContext &, const icmp6_hdr *, unsigned);
        void handle_packet(CaptureContext &);
 
        void sighandler(int);