(launchd) (inetdCompatibility) Remote IP -- how?

Remote IP is an essential property of incoming connection. As it often happens with essetial properties, they are forgotten. So far, I can see no way to detect the address of the other side. I have looked into man launchd.plist, I have searched on the Internet. Nobody demands knowledge of Remote IP???

I have checked environment variables and arguments. No any trace of remote IP. It looks really stupid. How can one do something advanced without being aware of an host he is dealing with?

Hackintosh, Mac OS X (10.4.8)

Posted on Apr 21, 2009 2:00 PM

Reply
5 replies

Apr 21, 2009 5:20 PM in response to OCTAGRAM {8-3}__

I do not understand what it is you want.

Are you trying to figure out the IP address of some random remote system which is connecting to your system?

Then I would ask what method is being used to make the connection?

You might look at lsof (lsof -i)
You might look at netstat

A better explanation of exactly what you want to find and under what conditions might make things easier.

Apr 22, 2009 12:21 AM in response to Camelot

launchproxy is the actual daemon responsible for dealing with connections: listening, accepting etc. launchproxy is no doubt able to determine remote IP, but how should I get it from it? launchproxy invokes my nntpd.sh for every connection, and I can see no IP from this point.


BTW I use this to debug processes not owned by me:
sudo mkfifo -m 0666 /FIFO
( while true; do cat /FIFO | growlnotify; done ) & # I execute this line from my Terminal session
previously, I used:
( while true; do cat /FIFO | open -f; done ) & # the same, but opens in TextEdit windows

Having done that I can see debug output without regards to the session/uid/etc. of the running process: "echo something > /FIFO" works everywhere.


It seems that I must use another superserver. Can anybody suggest me another one well suited for Mac OS X?

Apr 22, 2009 2:09 PM in response to OCTAGRAM {8-3}__

I have downloaded launchd sources. I confirm that there was no mechanism for supplying connection information. I haven't sought one, at least.

I have patched launchproxy so that it pass connection info in the environment variables:

Patch:

http://octagram.gorodok.net/launchd-8g.patch

Picture:

http://octagram.gorodok.net/images/launchd-patch-works.png

Everything seems to be fine now.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

(launchd) (inetdCompatibility) Remote IP -- how?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.