Fix errors in internetwork stack, implement ping