add cmd_ping() function, define cmd_ping_t and define marco PING & PONG