X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=greprotocol.cpp;h=d3daa9c829ae9a14c100291405312595f9a63664;hb=3bcabb4fd4764b0804b8b44cb967edf7369cc714;hp=8a400534a59c52d91343ac7767f1d4247b186c58;hpb=4c15e1ffd081f5e2f7840a6dea58b131c4358533;p=greproxy diff --git a/greprotocol.cpp b/greprotocol.cpp index 8a40053..d3daa9c 100644 --- a/greprotocol.cpp +++ b/greprotocol.cpp @@ -72,6 +72,8 @@ void GREProtocol::send_packet(uint16_t proto, const string &data, int incoming_s perror("sendto"); return; } + + ++sent_packets; } int GREProtocol::fd() const @@ -114,6 +116,7 @@ void GREProtocol::read_packet(Sender *sender) //printf("gre packet: proto=%x\n", ntohs(gre->protocol_type)); + ++received_packets; sender->send_packet(ntohs(gre->protocol_type), string(ptr, buf + ret), seq); }