ICMP over SOCK_DGRAM is already used in ndispproxy.sys. But apps may also use ICMP directly over SOCK_RAW (Hardspace: Shipbreaker is an example) and that requires admin privileges on Linux (or setcap cap_net_raw+ep on wineserver).
AF_INET / SOCK_RAW / IPPROTO_ICMP works on Windows without admin privileges.
Comments: - IP, ICMP header structures and chksum() functions are taken from ndisproxy.sys:icmp_echo.c; - ICMP over DGRAM, while designed specifically to allow ICMP without admin permissions, still needs some setup Linux, /proc/sys/net/ipv4/ping_group_range controls that. Such socket creation fails on Testbot Debian machines so I left skip() path in test_icmp(); - Linux substitute local port number instead of provided ICMP packet id, while the referenced game depends on reply id matching the id it provided in request. So the last part performs the fixup.