summaryrefslogtreecommitdiff
path: root/proxy.h
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-05 17:41:04 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-05 17:41:04 +0200
commit3d2d0d4b3aa64aba018b049edf9c0396d5a598d5 (patch)
tree2c4700417d240793a3dfe0aa9de9696ece91baa2 /proxy.h
parentdb90b7982410c20bca2c3dc206a690012edecce4 (diff)
Split out active proxy connection handling to separate file
Diffstat (limited to 'proxy.h')
-rw-r--r--proxy.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/proxy.h b/proxy.h
new file mode 100644
index 0000000..5b09cbc
--- /dev/null
+++ b/proxy.h
@@ -0,0 +1,19 @@
+#ifndef fooproxyhfoo
+#define fooproxyhfoo
+
+struct server_proxy {
+ struct sockaddr_in46 client;
+ char clientstr[ADDRSTRLEN];
+ struct sockaddr_in46 server;
+ char serverstr[ADDRSTRLEN];
+ struct uring_task task;
+ char buf[4096];
+ size_t len;
+ struct list_head list;
+};
+
+void proxy_refdump(struct server_proxy *proxy);
+
+struct server_proxy *proxy_new(struct cfg *cfg, struct server *scfg, struct sockaddr_in46 *client, int fd);
+
+#endif