diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2004-04-27 18:53:14 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2004-04-27 18:53:14 +0000 |
commit | 18df4910a43e8f1b0d9d10df37236fabf0ba8508 (patch) | |
tree | ac5ab56ac77e8c7325cbde33c2b7e7864ead25ea /src/conns.h | |
parent | 3b961ec66bdcf892c14045685f533febe3386ffb (diff) |
Added the "BindSame" configure directive from Oswald Buddenhagen.
This allows tinyproxy to respond to a request bound to the same
interface that the request came in on. As Oswald explains:
"attached is a patch that adds the BindSame option. it causes
binding an outgoing connection to the ip address of the respective
incoming connection. that way one can simulate an entire proxy farm
with a single instance of tinyproxy on a multi-homed machine."
Cool.
Diffstat (limited to 'src/conns.h')
-rw-r--r-- | src/conns.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/conns.h b/src/conns.h index 5d0422a..8b6f69e 100644 --- a/src/conns.h +++ b/src/conns.h @@ -1,4 +1,4 @@ -/* $Id: conns.h,v 1.16 2004-01-26 19:11:51 rjkaes Exp $ +/* $Id: conns.h,v 1.17 2004-04-27 18:53:14 rjkaes Exp $ * * See 'conns.c' for a detailed description. * @@ -54,6 +54,11 @@ struct conn_s { } content_length; /* + * Store the server's IP (for BindSame) + */ + char* server_ip_addr; + + /* * Store the client's IP and hostname information */ char* client_ip_addr; @@ -79,7 +84,8 @@ struct conn_s { * Functions for the creation and destruction of a connection structure. */ extern struct conn_s* initialize_conn(int client_fd, const char* ipaddr, - const char* string_addr); + const char* string_addr, + const char* sock_ipaddr); extern void destroy_conn(struct conn_s *connptr); #endif |