Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13078 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40305 invoked by uid 1010); 30 Sep 2004 18:59:00 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 36575 invoked from network); 30 Sep 2004 18:58:16 -0000 Received: from unknown (HELO mail.bpservers.com.ar) (200.32.3.79) by pb1.pair.com with SMTP; 30 Sep 2004 18:58:16 -0000 Received: (qmail 2008 invoked by uid 0); 30 Sep 2004 18:58:14 -0000 Received: from unknown (HELO ?192.168.0.240?) (168.226.118.83) by 200-32-3-79.prima.net.ar with SMTP; 30 Sep 2004 18:58:14 -0000 Reply-To: lpedretti@suserver.com Organization: Axon Sistemas To: internals@lists.php.net Date: Thu, 30 Sep 2004 15:59:14 -0300 User-Agent: KMail/1.7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-ID: <200409301559.14081.lpedretti@suserver.com> Subject: Add SO_ORIGINAL_DST support and SOL_IP constant to socket_get_options() From: lpedretti@suserver.com (Leonardo Pedretti) I forgot to explain why did I added this option to the list of supported=20 options: when you implement a transparent proxy, the routing kernel makes a destinat= ion=20 address NAT and changes it to 127.0.0.1 and some port you declare when you= =20 instruct the kernel to do the redirection through iptables or any other=20 firewall administration utility. When you have an application running=20 listening on that port, and it receives a connection, you can not know what= =20 was the original destination address, usually needed to perform the task a= =20 transparent proxy should do. However, you can fetch the original destinatio= n=20 address of the connection using the getsockopt() with the SO_ORIGINAL_DST=20 option. So that is why this option is useful. Regards Leo =2D-=20 Leonardo Pedretti Axon Sistemas L=EDder de Equipo Proyecto Basalto