Add SO_ORIGINAL_DST support and SOL_IP constant to socket_get_options()

From: Date: Thu, 30 Sep 2004 18:59:14 +0000
Subject: Add SO_ORIGINAL_DST support and SOL_IP constant to socket_get_options()
Groups: php.internals 
Request: Send a blank email to internals+get-13078@lists.php.net to get a copy of this message
I forgot to explain why did I added this option to the list of supported options: when you implement a transparent proxy, the routing kernel makes a destination address NAT and changes it to 127.0.0.1 and some port you declare when you instruct the kernel to do the redirection through iptables or any other firewall administration utility. When you have an application running listening on that port, and it receives a connection, you can not know what was the original destination address, usually needed to perform the task a transparent proxy should do. However, you can fetch the original destination address of the connection using the getsockopt() with the SO_ORIGINAL_DST option. So that is why this option is useful. Regards Leo -- Leonardo Pedretti Axon Sistemas Líder de Equipo Proyecto Basalto

« previous php.internals (#13078) next »