Open insinfo opened 3 weeks ago
That would be wonderful, but I doubt POSIX-like socket API related fns like socket (PF_INET, SOCK_RAW, ...)
, setsockopt()
and select()
are portable enough in the world of WinAPI.
I guess @Cygwin or @Midipix would be a better choice for that.
The relevant source code, eg: https://github.com/guillemj/inetutils/blob/cf091304a3218efa3bc267b483cad71b6f65c24e/src/traceroute.c#L673-L748
I think this was already ported to Windows at some point in the past by Ray Satiro https://gnuwin32.sourceforge.net/packages/inetutils.htm
I'm not an experienced C programmer, but from what I researched WinSock and POSIX sockets work in a similar manner - mainly because Windows sockets were originally based on code from BSD:
Although these proprietary BSD derivatives were largely superseded by the UNIX System V Release 4 and OSF/1 systems in the 1990s (both of which incorporated BSD code and are the basis of other modern Unix systems), later BSD releases provided a basis for several open source development projects, e.g. FreeBSD, OpenBSD, NetBSD, Darwin or PC-BSD, that are ongoing. These, in turn, have been incorporated in whole or in part in modern proprietary operating systems, e.g. the TCP/IP (IPv4 only) networking code in Microsoft Windows and most of the foundation of Apple's OS X and iOS.
https://web.fe.up.pt/~jmcruz/etc/sockets/winsock11.pdf https://gist.github.com/willeccles/3ba0741143b573b74b1c0a7aea2bdb40 https://github.com/saprykin/plibsys/blob/master/src/psocket.c https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-select https://learn.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-setsockopt
Description / Steps to reproduce the issue
enable traceroute in inetutils MSYS2 package
Expected behavior
traceroute
Actual behavior
error: target not found
Verification
Windows Version
MSYS_NT-10.0-22631
Are you willing to submit a PR?
No response