Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> but at some point they broke raw socket support

Sockets are a transport layer feature e.g. TCP or UDP. ICMP works at the network layer and has no notion of sockets.



The BSD socket API on many systems implements a raw socket type[1], so you can use the socket APIs to talk raw IP.

Some systems (Linux, Darwin) also implement a special icmp socket type which can allow unprivileged ping.

[1]: https://man7.org/linux/man-pages/man7/ip.7.html


Regardless of what layer ICMP works at, its traffic is still transmitted using datagrams, and the call to do so is socket(), yes?

Are you just trying to point out the misnomer?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: