[Win32utils-devel] if_indextoname on Windows?

Daniel Berger djberg96 at gmail.com
Thu Aug 13 07:51:13 EDT 2009


Hi all,

Windows Vista Home Premium
VC++ 9

According to MSDN, the if_indextoname() function should be included on
Vista:

http://msdn.microsoft.com/en-us/library/bb408408%28VS.85%29.aspx

However, I can't get mkmf to see it. I tried all of these:

require 'mkmf'

if have_header('netioapi.h') # yes
  have_func('if_indextoname', 'netioapi.h') # no
  have_func('if_nametoindex', 'netioapi.h') # no
end

if have_header('iphlpapi.h') # yes
  have_func('if_indextoname', 'iphlpapi.h') # no
  have_func('if_nametoindex', 'iphlpapi.h') # no
end

have_library('iphlpapi') # yes
have_library('iphlpapi', 'if_indextoname') # no

What gives?

BTW, this is in an effort to get dnssd to build on Windows.

Regards,

Dan



More information about the win32utils-devel mailing list