]> git.sesse.net Git - greproxy/blobdiff - tunprotocol.h
Merge branch 'master' of /srv/git.sesse.net/www/greproxy
[greproxy] / tunprotocol.h
index d9f40fa4e661c07e43f34b40ea838ec8e6ed70e1..81fd900f0f02238819a6cb4a261977d2a3a16cbf 100644 (file)
@@ -9,13 +9,18 @@
 class TUNProtocol : public Sender, public Reader {
 public:
        TUNProtocol(const char *devname);
-       virtual void send_packet(uint16_t proto, const std::string &data, int incoming_seq);
+       virtual void send_packet(uint16_t proto, const std::string &data, uint32_t incoming_seq);
        virtual int fd() const;
        virtual void read_packet(Sender* sender);
 
+       int get_received_packets() const { return received_packets; }
+       int get_sent_packets() const { return sent_packets; }
+
 private:
        int tunfd;
-       int seq;
+       uint32_t seq;
+
+       int received_packets = 0, sent_packets = 0;
 };
 
 #endif  // !defined(_TUNPROTOCOL_H)