PING: Fix struct incompatibility for both IPv4 and IPv6

Change-Id: I4654a8632e344eadc1f46ee8f23c2737161be341