]> git.sesse.net Git - greproxy/blob - greprotocol.h
Port greproxy to all the new classes and stuff.
[greproxy] / greprotocol.h
1 #ifndef _GREPROTOCOL_H
2 #define _GREPROTOCOL_H
3
4 #include "protocol.h"
5
6 #include <arpa/inet.h>
7 #include <stdint.h>
8 #include <string>
9
10 class Reorderer;
11
12 class GREProtocol : public Protocol {
13 public:
14         GREProtocol(const in6_addr &myaddr, const in6_addr &dst);
15         virtual void send_packet(uint16_t proto, const std::string &data, int incoming_seq);
16         virtual int fd() const;
17         void read_packet(Protocol* sender);
18
19 private:
20         int seq;
21         int sock;
22         sockaddr_in6 dstaddr;
23 };
24
25 #endif  // !defined(_GREPROTOCOL_H)