[systemd-devel] xinetd REMOTE_IP (feature request)
Lennart Poettering
lennart at poettering.net
Tue Dec 2 17:31:45 PST 2014
On Thu, 13.11.14 13:53, Fisher, Charles J. (Top Echelon) (Charles.Fisher at 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
More information about the systemd-devel
mailing list