dillon at apollo.backplane.com
Sun Jan 4 19:53:48 PST 2004
:Thanks, actually, that was my original intention, hence using -r (for reverse)
:and leaving -i for interface. I just knew whacking out the code for reverse
:would be quicker (that, and I had a need for it). I'll add some interface
:probing code and resubmit. I assume using sysctl(3) is the correct method
:for grabbing the interface details (I'm using ifconfig(8) as a reference) and
:using the first IP address found on the given interface would be appropriate?
:bsd at xxxxxxxxxx
Take a look at the code to ifconfig in /usr/src/sbin/ifconfig/, which
appears to use sysctl to retrieve the interface list and a socket/ioctl
combo to retrieve the interface's info.
<dillon at xxxxxxxxxxxxx>
More information about the Submit