Kyle Jones <kyle_jones(a)wonderworks.com> writes:
Before we wade into this morass, a question needs to be answered.
this worth doing? My opinion so far is that, no, it isn't.
If it's worth doing, we should probably lift from sendmail's code that
initializes the 'w' class. sendmail is ported to a bunch of platforms
already, so I think a lot of effort would be saved
The right way to solve this really depends on _what_ you want to do with
the IP address. If you are going to send it across the wire to someone,
getting it with ioctl's or ifconfig is completely bogus. You should create
a socket, connect to the endpoint, and then do a getsockname(). This will
allow things like socks or remote-winsock under windows to give you the
correct information to work through the proxy.
Didier, why do you want this information to begin with?