2 #define _TUNPROTOCOL_H 1
9 class TUNProtocol : public Sender, public Reader {
11 TUNProtocol(const char *devname);
12 virtual void send_packet(uint16_t proto, const std::string &data, int incoming_seq);
13 virtual int fd() const;
14 virtual void read_packet(Sender* sender);
16 int get_received_packets() const { return received_packets; }
17 int get_sent_packets() const { return sent_packets; }
23 int received_packets = 0, sent_packets = 0;
26 #endif // !defined(_TUNPROTOCOL_H)