Refactored ping support

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>