/*
* socktoa - return a numeric host name from a sockaddr_storage structure
*/
-#ifdef SYS_WINNT
-/* Skip asynch rpc inclusion */
-#ifndef __RPCASYNC_H__
-#define __RPCASYNC_H__
-#endif
-#include <windows.h>
-#endif
+
+#include <config.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
-#ifndef HAVE_IPV6
+#ifdef ISC_PLATFORM_NEEDNTOP
#include <isc/net.h>
#endif
ips->srcadr = GET_INADDR(pp->srcadr);
if (client_v6_capable)
ips->v6_flag = 0;
+/* XXX This code is buggy. Replaced with a straightforward assignment
ips->dstadr = (pp->processed) ?
pp->cast_flags == MDF_BCAST ?
GET_INADDR(pp->dstadr->bcast):
GET_INADDR(pp->dstadr->sin):
GET_INADDR(pp->dstadr->bcast):
1 : 5;
+*/
+ ips->dstadr = GET_INADDR(pp->dstadr->sin);
skip = 0;
}
if (!skip){
ip->srcadr6 = GET_INADDR6(pp->srcadr);
ip->v6_flag = 1;
} else {
+/* XXX This code is buggy. Replaced with a straightforward assignment
ip->dstadr = (pp->processed) ?
pp->cast_flags == MDF_BCAST ?
GET_INADDR(pp->dstadr->bcast):
GET_INADDR(pp->dstadr->sin):
GET_INADDR(pp->dstadr->bcast):
2 : 6;
+*/
+ ip->dstadr = GET_INADDR(pp->dstadr->sin);
ip->srcadr = GET_INADDR(pp->srcadr);
if (client_v6_capable)
ip->v6_flag = 0;
# define TIME_WITH_SYS_TIME
# define HAVE_IO_COMPLETION_PORT
# define HAVE_SOCKADDR_IN6
+# define ISC_PLATFORM_NEEDNTOP
# define NEED_S_CHAR_TYPEDEF