On Sun, May 01, 2005 at 04:24:02PM -0300, Ulisses Penna wrote:
> I realy need the local address. The xinetd is listening to all
> possible local interfaces: "eth0:1" and "eth0:2" and "eth0:3" and so on.

It's a bit more work on the xinetd side, but you can set up xinetd to bind on
each "interface" separately, then modify the invocation of your shell script so
that the interface name is passed to it as part of the command line.  A bit of
an ugly hack, but it would certainly do the job for you.

Check out the "bind" parameter (or its synonym "interface") in the man page
for xinetd.conf.

> Is there a clue/tip at the /proc/${PID} or something that can tell me?
> Or other location at /proc? Or some environment variable? Do I have
> to write a C app to find out the local IP?

Perhaps xinetd might set an environment variable that you can use?  Would be
easier than copying a xinetd configuration dozens (hundreds?) of times...

Cheers,
Vic Cross

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to