Moving the icmp logic to a module