Determining one's own IP address.
terryl at tekcrl.LABS.TEK.COM
terryl at tekcrl.LABS.TEK.COM
Wed Dec 13 05:44:55 AEST 1989
In article <604 at bmers58.UUCP> davem at bmers58.UUCP (Dave Mielke) writes:
>In article <4429 at ur-cc.UUCP> leadley at uhura.cc.rochester.edu (Scott Leadley) writes:
>> Assuming (a lot of things, but primarily that) you wish to do this from
>>the shell command line and that you know the network interface name:
>
>I would like to be able to determine my local IP address without
>involving a hosts file or yp lookup, i.e. from memory, from within a c
>program.
Well, as they say (whoever THEY are!! (-:), RTFM (at least for a BSD
system):
sethostid(2), gethostid(2), hostid(1)
More information about the Comp.unix.wizards
mailing list