This queue is for tickets about the IO-Socket-IP CPAN distribution.

Report information
The Basics

Nobody in particular
carsten.dehning [...]

(no value)
Broken in:
(no value)
Fixed in:
(no value)

Subject: MS Windows port, missing functionality
Date: Thu, 19 Dec 2013 18:19:16 +0100 (CET)
From: Carsten Dehning <>
Dear Paul Evans, I am currently extending a multi platform software package (Unix/Linux/Windows, C/C++ and Perl) from IPv4 to IPv6 (dual stack mode). The C-world is fine since I can easily handle the differences between the Unix and Windows world. However there are some issues with the Socket module on the Perl side. As expected, with MS Windows some POSIX calls are missing in the MS winsock libraries or have at least different names, e.g.: inet_ntop() == InetNtop() inet_pton() == InetPton() Furthermore these functions became first available under Vista. My workaround for XP (still some customers :-(() is the use of WSAStringToAddress() WSAAddressToString() Both are available since Window 2000. In the Perl Socket module the XS functions inet_ntop() and inet_pton() are not implemented for Windows since the Makefile.PL sub check_for() cannot find them - which is correct and not a bug. Would it be possible for you to implement these functions also for Windows? My way in the C-world is e.g (USOCKADDR is a union to wrap IPv6 & IPv4). #ifdef _WIN32 DWORD len = countof(str); WSAAddressToStringA(&(usockaddr.saddr),sizeof(USOCKADDR),NULL,str,&len); #else inet_ntop(,&usockaddr,str,sizeof(str)); #endif I believe a similar #ifdef would be possible in the Socket.xs #ifdef _WIN32 // addr must have the proper AF assigned DWORD len = countof(str); WSAAddressToStringA(&addr,sizeof(addr),NULL,str,&len); #else inet_ntop(af, &addr, str, sizeof str); #endif The major work then seems to be the modification of the checks in Makefile.PL to account for the Windows specialities. On the other hand it would be a major advantage for all Perl users to have platform independent POSIX calls also working under Windows. Another option would be to add the WSA calls to the (only implemented with the Windows version) and then I can easily switch between POSIX and the WSA calls inside the Perl code. Right now I cannot implement IPv6 perl under Windows since both, POSIX and WSA, are missing. With best regards Carsten Dehning
Subject: [ #91522]
Date: Thu, 19 Dec 2013 19:26:10 +0100 (CET)
From: Carsten Dehning <>
Dear Paul Evans, I had too fast fingers and did a mistake and sent the ticket to "bug-IO-Socket-IP at". Instead the correct receiver is "bug-Socket at". Please remove the ticket. I am sorry for the inconvenience. With best regards Carsten Dehning
Dupe of #91524 -- Paul Evans

This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with to