7 ms·
Getting downvoted, so: https://stackoverflow.com/questions/13087097/how-to-get-icmp-on-udp-socket-on-unix https://stackoverflow.com/questions/13087097/how-to-g
by throwawaymaths 3y ago
Getting downvoted, so:
https://stackoverflow.com/questions/13087097/how-to-get-icmp-on-udp-socket-on-unix https://stackoverflow.com/questions/13087097/how-to-get-icmp...
Using a udp socket is the "classic" way of implementing ping on low privilege syystems
- yencabulator 3y agoYou can kindly ask the kernel networking stack to inform you of errors, but that is not the same as "using udp to read icmp packets".
- dgl 3y ago“udp” in this context means unprivileged data gram, not UDP the protocol. For some reason go uses the confusing “udp” name in parts of its API. The docs for this kind of socket seem to only exist on the kernel commit: https://lwn.net/Articles/420800/ https://lwn.net/Articles/420800/