[PATCH] iphlpapi: Implement if_nametoindex.
Bruno Jesus
00cpxxx at gmail.com
Wed May 24 06:37:51 CDT 2017
On Wed, May 24, 2017 at 7:39 AM, Stefan Dösinger <stefan at codeweavers.com> wrote:
> ...
> diff --git a/dlls/iphlpapi/iphlpapi_main.c b/dlls/iphlpapi/iphlpapi_main.c
> index 796950e0f9..4cceb65621 100644
> --- a/dlls/iphlpapi/iphlpapi_main.c
> +++ b/dlls/iphlpapi/iphlpapi_main.c
> @@ -36,6 +36,9 @@
> #ifdef HAVE_RESOLV_H
> # include <resolv.h>
> #endif
> +#ifdef HAVE_NET_IF_H
> +# include <net/if.h>
> +#endif
>
> #define NONAMELESSUNION
> #define NONAMELESSSTRUCT
> @@ -3208,3 +3211,12 @@ DWORD WINAPI ConvertInterfaceNameToLuidW(const WCHAR *name, NET_LUID *luid)
> luid->Info.IfType = row.dwType;
> return NO_ERROR;
> }
> +
> +/******************************************************************
> + * if_nametoindex (IPHLPAPI.@)
> + */
> +IF_INDEX WINAPI IPHLP_if_nametoindex(const char *name)
> +{
> + TRACE("(%s)\n", name);
> + return if_nametoindex(name);
> +}
Hi, this seems to be the ASCII version of GetAdapterIndex, can't you
call getInterfaceIndexByName and avoid the new #include?
Best wishes,
Bruno
More information about the wine-devel
mailing list