fix warnings, add counter.h, icmp.c