Sent from my iPhone > On Apr 4, 2017, at 10:47 AM, Todd C. Miller <[email protected]> wrote: > >> On Tue, 04 Apr 2017 09:21:45 -0500, Edgar Pettijohn wrote: >> >> This is somewhat a continuation of my previous question about max >> interfaces. I wanted to know how much space I needed for a buffer using >> ioctl(). Then I discovered getifaddrs() > > Good, you want to use getifaddrs() and not the old ioctl() method. > >> But ifconfig only shows one of each interface. Why is getifaddrs() >> giving me 4 lo0 and 2 iwn0? > > I think you'll find the clue in the value of the sa_family field > of the ifa_addr field. > > - todd
Thanks! Testing for AF_INET gave the results I'm looking for. Edgar

