So this is really strange. I've tried multiple expressions but I have not yet found a proper boolean expression to recognize if a packet is an ICMP or ARP packet. I've tried
packet.ipv4.icmp != null
which resulted in the program entering the block even though the packet is not ICMP I've also tried
packet.ipv4.Protocol == IpV4Protocol.InternetControlMessageProtocol
but then the program never enters the block even though the packet is ICMP any ideas?