Пожалуйста, не относись к ICMP как к па́сынку.
Please consider adding a union member _ICMP_FILTER to the struct _TRANSPORT_LAYER_FILTER so the received ICMP packets, which do not have a matching “Type” and “Code” fields, do not get indicated to the User Mode unnecessarily …just like it is possible to filter out indications of the tcp and udp traffic, which does not have a matching source and destination port ranges.
For example something like this:
struct _ICMP_FILTER
{
unsigned long m_ValidFields;
CODE_RANGE m_TypeRange;
CODE_RANGE m_CodeRange;
};