iphlpapi: Move the Icmp6 stubs to iphlpapi_main.c.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2021-10-06 10:12:57 +01:00 committed by Alexandre Julliard
parent f6ca752201
commit 9d8abb1ee5
2 changed files with 23 additions and 58 deletions

View File

@ -353,64 +353,6 @@ done:
* Exported Routines.
*/
/***********************************************************************
* Icmp6CreateFile (IPHLPAPI.@)
*/
HANDLE WINAPI Icmp6CreateFile(VOID)
{
icmp_t* icp;
int sid=socket(AF_INET6,SOCK_RAW,IPPROTO_ICMPV6);
if (sid < 0)
{
/* Some systems (e.g. Linux 3.0+ and Mac OS X) support
non-privileged ICMP via SOCK_DGRAM type. */
sid=socket(AF_INET6,SOCK_DGRAM,IPPROTO_ICMPV6);
}
if (sid < 0) {
ERR_(winediag)("Failed to use ICMPV6 (network ping), this requires special permissions.\n");
SetLastError(ERROR_ACCESS_DENIED);
return INVALID_HANDLE_VALUE;
}
icp=HeapAlloc(GetProcessHeap(), 0, sizeof(*icp));
if (icp==NULL) {
close(sid);
SetLastError(IP_NO_RESOURCES);
return INVALID_HANDLE_VALUE;
}
icp->sid=sid;
icp->default_opts.OptionsSize=IP_OPTS_UNKNOWN;
return (HANDLE)icp;
}
/***********************************************************************
* Icmp6SendEcho2 (IPHLPAPI.@)
*/
DWORD WINAPI Icmp6SendEcho2(
HANDLE IcmpHandle,
HANDLE Event,
PIO_APC_ROUTINE ApcRoutine,
PVOID ApcContext,
struct sockaddr_in6* SourceAddress,
struct sockaddr_in6* DestinationAddress,
LPVOID RequestData,
WORD RequestSize,
PIP_OPTION_INFORMATION RequestOptions,
LPVOID ReplyBuffer,
DWORD ReplySize,
DWORD Timeout
)
{
FIXME("(%p, %p, %p, %p, %p, %p, %p, %d, %p, %p, %d, %d): stub\n", IcmpHandle, Event,
ApcRoutine, ApcContext, SourceAddress, DestinationAddress, RequestData,
RequestSize, RequestOptions, ReplyBuffer, ReplySize, Timeout);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/***********************************************************************
* IcmpCreateFile (IPHLPAPI.@)
*/

View File

@ -4555,3 +4555,26 @@ DWORD WINAPI IcmpParseReplies( void *reply, DWORD reply_size )
if (!num_pkts) SetLastError( icmp_reply->Status );
return num_pkts;
}
/***********************************************************************
* Icmp6CreateFile (IPHLPAPI.@)
*/
HANDLE WINAPI Icmp6CreateFile( void )
{
FIXME( "stub\n" );
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
return INVALID_HANDLE_VALUE;
}
/***********************************************************************
* Icmp6SendEcho2 (IPHLPAPI.@)
*/
DWORD WINAPI Icmp6SendEcho2( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc_routine, void *apc_ctxt,
struct sockaddr_in6 *src, struct sockaddr_in6 *dst, void *request, WORD request_size,
IP_OPTION_INFORMATION *opts, void *reply, DWORD reply_size, DWORD timeout )
{
FIXME( "(%p, %p, %p, %p, %p, %p, %p, %d, %p, %p, %d, %d): stub\n", handle, event,
apc_routine, apc_ctxt, src, dst, request, request_size, opts, reply, reply_size, timeout );
SetLastError( ERROR_CALL_NOT_IMPLEMENTED );
return 0;
}