An implementation of the ping functionality