core: Moved handle ping packets to ping.c