]> git.sesse.net Git - greproxy/blobdiff - greprotocol.h
Move GREProtocol into its own files, and Reorderer into a .h file.
[greproxy] / greprotocol.h
diff --git a/greprotocol.h b/greprotocol.h
new file mode 100644 (file)
index 0000000..6930f20
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef _GREPROTOCOL_H
+#define _GREPROTOCOL_H
+
+#include "protocol.h"
+
+#include <arpa/inet.h>
+#include <stdint.h>
+#include <string>
+
+class Reorderer;
+
+class GREProtocol : public Protocol {
+public:
+       GREProtocol(const in6_addr &myaddr, const in6_addr &dst);
+       virtual void send_packet(uint16_t proto, const std::string &data);
+       virtual int fd() const;
+       void read_packet(Reorderer* sender);
+
+private:
+       int seq;
+       int sock;
+       sockaddr_in6 dstaddr;
+};
+
+#endif  // !defined(_GREPROTOCOL_H)