summaryrefslogtreecommitdiff
path: root/src/reqs.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/reqs.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/reqs.h b/src/reqs.h
index 2748bab..de8730e 100644
--- a/src/reqs.h
+++ b/src/reqs.h
@@ -22,6 +22,28 @@
#ifndef _TINYPROXY_REQS_H_
#define _TINYPROXY_REQS_H_
+#include "common.h"
+
+
+/*
+ * Port constants for HTTP (80) and SSL (443)
+ */
+#define HTTP_PORT 80
+#define HTTP_PORT_SSL 443
+
+/*
+ * This structure holds the information pulled from a URL request.
+ */
+struct request_s {
+ char *method;
+ char *protocol;
+
+ char *host;
+ uint16_t port;
+
+ char *path;
+};
+
extern void handle_connection(int fd);
extern void add_connect_port_allowed(int port);
extern void upstream_add(const char *host, int port, const char *domain);