summaryrefslogtreecommitdiffhomepage
path: root/src/reqs.h
diff options
context:
space:
mode:
authorRobert James Kaes <rjk@wormbytes.ca>2008-06-08 18:50:23 -0400
committerMukund Sivaraman <muks@banu.com>2008-06-09 10:01:14 +0530
commit5ea289d82ea412b59bbabd1ddfff70d3d5f1ecb2 (patch)
tree64497749bd8fb6a8b9c88df0ba087f2ff2a3d871 /src/reqs.h
parent445e4cb09ca4d76697d3e1901ca87c2b2424da48 (diff)
Moved transparent proxy code into its own file
Extracted the transparent proxy logic from reqs.c and placed it into a separate file. Signed-off-by: Robert James Kaes <rjk@wormbytes.ca>
Diffstat (limited to 'src/reqs.h')
-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);