On Thu, 13.11.14 13:53, Fisher, Charles J. (Top Echelon) 
(charles.fis...@alcoa.com) wrote:

> The xinetd server from previous versions of RedHat defined a REMOTE_IP 
> environment variable.
> 
> I realize that I can extract that data with the following code:
> 
> {
> struct sockaddr_in thisconn;
> int thislen = sizeof(thisconn);
> getpeername( /* STDIN */ 0, &thisconn, &thislen);
> printf("%s\n", inet_ntoa(thisconn.sin_addr));
> }
> 
> ...but it would be nice if the behavior matched xinetd.

Makes sense to set this for per-connection socket activated
services. Added to TODO list. Any other renv vars xinetd was setting?

I wonder though whether it wouldn't be nicer to follow the variable
naming used by CGI here, and introduce $REMOTE_ADDR and $REMOTE_PORT
instead of $REMOTE_IP.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to