Well, this serves as an example of Unix lameness
I know of no way to bypass root privileges to send ICMP echo packets ... in fact, I believe there isn't a way.
You have to do lame things like execute "ping". If anybody has a secret to using ICMP without root privileges, please share.
Linux and Darwin solutions don't count as these two systems are non-standard.
Darwin has added ICMP support to SOCK_DGRAM for restricted ICMP usage. All other Unix systems only have ICMP support with SOCK_RAW (which requires root privileges).
How does ping work? Notice the sticky bit.
-r-sr-xr-x 1 root wheel 23008 Jan 18 07:41 /sbin/ping