Add ping.c

Signed-off-by: Javelin <javelinanddart@gmail.com>