MSYS2-packages icon indicating copy to clipboard operation
MSYS2-packages copied to clipboard

enable traceroute in inetutils MSYS2 package

Open insinfo opened this issue 1 year ago • 4 comments

Description / Steps to reproduce the issue

enable traceroute in inetutils MSYS2 package

Expected behavior

traceroute

Actual behavior

error: target not found

Verification

  • [X] I have verified that my MSYS2 is up-to-date before submitting the report (see https://www.msys2.org/docs/updating/)

Windows Version

MSYS_NT-10.0-22631

Are you willing to submit a PR?

No response

insinfo avatar May 08 '24 17:05 insinfo

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.

sskras avatar May 08 '24 20:05 sskras

The relevant source code, eg: https://github.com/guillemj/inetutils/blob/cf091304a3218efa3bc267b483cad71b6f65c24e/src/traceroute.c#L673-L748

sskras avatar May 08 '24 20:05 sskras

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

insinfo avatar May 08 '24 21:05 insinfo

I don't have any PR to submit, but would definitely be appreciative if traceroute were added to MSYS2 inetutils.

bill-e-ghote avatar May 19 '25 17:05 bill-e-ghote