Doug Rixmann <email@example.com> wrote:
Is there a method without opening a socket? This is what ifconfig does?
ifconfig() opens a socket and does an ioctl.
I don’t think there is a way without opening a socket.
“Xiaodan Tang” <> firstname.lastname@example.org> > wrote in message
news:a97vmm$ar0$> email@example.com> …
Doug Rixmann <> firstname.lastname@example.org> > wrote:
Is there a call that returns the ip of a certain interface? I can parse
hosts file but that’s crude, I could catch and parse the output from
popen(“ifconfig en1”) - again crude. Perhaps the low down and dirty that
ifconfig actually calls?
ioclt SIOCGIFADDR on a opened socket.
QNX Training Services
Please followup in this newsgroup if you have further questions.