Refactor icmp.h