>>>>> "Casey" == Casey Marshall <[EMAIL PROTECTED]> writes:

Casey> There are apparently a bunch of ways to get this data. This version is
Casey> based on the 'sysctl' one described in W. Richard Stevens' book, UNIX
Casey> Network Programming. This seems to work fine on Darwin; I'll try it on
Casey> Linux when I get a chance.

The sysctl man page on linux says:

    The object names vary between kernel versions.  THIS MAKES THIS
    SYSTEM CALL WORTHLESS FOR APPLICATIONS.

... not exactly confidence inspiring, but perhaps the man page is not
really correct.

FWIW in libgcj we use getifaddrs if it is available (this is a nice,
easy-to-use API) or some horrible ioctls (SIOCGIFCONF and SIOCGIFADDR)
otherwise.  We've also got a Windows port you could lift... if you had
a way to build it I suppose.

If Darwin has getifaddrs, I'd prefer we use it.  The ioctl stuff could
probably just be ignored, I'd imagine it is more of a legacy system
thing.

Casey> I've also changed some of the "RawData" functions in jcl.c.

A separate patch here would be good...

Casey> JCL_GetRawData depends on the static variable `rawData_fid' being
Casey> initialized, which only gets set in `JCL_NewRawDataObject.'

The library should either initialize itself or we should require VMs
using it to initialize it.

Casey>  * java/net/NetworkInterface.java (name, inetAddresses): removed.
Casey>  (netif): new field.

This change is a bit of a pain since it means existing users all have
to be updated.  If you think it is really important, we should still
do it, of course ... but I'd prefer not to if possible.

If we do change it, this has to be documented in NEWS, as it is a VM
interface change.

Tom

Reply via email to