Platform SDK: Quality of Service

TC_GEN_FILTER

The TC_GEN_FILTER structure creates a filter that matches a certain set of packet attributes or criteria, which can subsequently be used to associate packets that meet the attribute criteria with a particular flow. The TC_GEN_FILTER structure uses its AddressType member to indicate a specific filter type to apply to the filter.

typedef struct _TC_GEN_FILTER {
  USHORT    AddressType,    // defines specific filter type, 
                            // Defined in ntddndis.h: 
                            //  NDIS_PROTOCOL_ID_TCP_IP
                            //  NDIS_PROTOCOL_ID_IPX, etc.
  ULONG     PatternSize,    // sizeof specific pattern
  PVOID     Pattern,        // specific format, e.g. IP_PATTERN
  PVOID     Mask            // same type as Pattern
} TC_GEN_FILTER, *TC_GEN_FILTER;

Members

AddressType
Defines the filter type to be applied with the filter, as defined in Ntddndis.h. With the designation of a specific filter in AddressType, the generic filter structure TC_GEN_FILTER provides a specific filter type.
PatternSize
Size of the Pattern member.
Pattern
Indicates the specific format of the pattern to be applied to the filter, such as IP_PATTERN. The pattern specifies which bits of a given packet should be evaluated when determining whether a packet is included in the filter.
Mask
A bitmask applied to the bits designated in the Pattern member. The application of the Mask member to the Pattern member determines which bits in the Pattern member are significant (should be applied to the filter criteria). Note that the Mask member must be of the same type as the Pattern member.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Traffic.h.