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