ReportFilteredNetBufferLists routine

The ReportFilteredNetBufferLists function reports on one or more network packets that were dropped or excluded from port delivery by the extensible switch extension. Each network packet is defined through a NET_BUFFER_LIST structure.

Syntax


VOID ReportFilteredNetBufferLists(
  _In_      NDIS_SWITCH_CONTEXT NdisSwitchContext,
  _In_      PUNICODE_STRING ExtensionGuid,
  _In_      PUNICODE_STRING ExtensionFriendlyName,
  _In_      NDIS_SWITCH_PORT_ID PortId,
  _In_      UINT32 Flags,
  _In_      UINT32 NumberOfNetBufferLists,
  _In_      PNET_BUFFER_LIST NetBufferLists,
  _In_opt_  PUNICODE_STRING FilterReason
);

Parameters

NdisSwitchContext [in]

An NDIS_SWITCH_CONTEXT value that contains the handle of the extensible switch module to which the Hyper-V extensible switch extension is attached. When the extension calls NdisFGetOptionalSwitchHandlers, this handle is returned through the NdisSwitchContext parameter.

ExtensionGuid [in]

A pointer to a UNICODE_STRING structure that contains the GUID of the extension. NDIS specifies this GUID in the FilterModuleGuidName member of the NDIS_FILTER_ATTACH_PARAMETERS structure. NDIS passes a pointer to this structure in the AttachParameters parameter when it calls the extension's FilterAttach function.

ExtensionFriendlyName [in]

A pointer to a UNICODE_STRING structure that contains the user-friendly name of the extension. This name is defined by the DisplayName entry in the AddService Directive of the extension's INF file.

PortId [in]

An NDIS_SWITCH_PORT_ID value that specifies an extensible switch port. For more information, see the Remarks section.

Flags [in]

A UINT32 value. When the NDIS_SWITCH_REPORT_FILTERED_NBL_FLAGS_IS_INCOMING flag is specified, it indicates that the PortId member defines the source of the dropped packet. When it is not specified, the PortId member defines the destination extensible switch port. For more information, see the Remarks section.

NumberOfNetBufferLists [in]

A UINT32 value that contains the number of NET_BUFFER_LIST structures that is specified by the NetBufferLists parameter.

NetBufferLists [in]

A pointer to a linked list of NET_BUFFER_LIST structures.

FilterReason [in, optional]

A pointer to a UNICODE_STRING structure that contains a user-friendly description of the reason for the drop or exclusion of the packets. For more information, see the Remarks section.

Return value

This routine does not return a value.

Remarks

When the extension excludes the delivery of a packet to an extensible switch port, it must call ReportFilteredNetBufferLists. When this function is called, the extensible switch module increments counters and logs events for the dropped or excluded packets. When it logs an event for a dropped or excluded set of packets, the extensible switch module uses the user-friendly description that is specified by the FilterReason parameter.

The extension can exclude the delivery of a packet in the following ways:

The extension must follow these guidelines when it calls ReportFilteredNetBufferLists:

  • The NetBufferLists parameter specified a linked-list of NET_BUFFER_LIST structures. All of the packets specified by these structures must have been received from or sent to the same port, and were dropped or excluded for the same reason.

  • If the packet is being dropped due to policy based on the source port, the NDIS_SWITCH_REPORT_FILTERED_NBL_FLAGS_IS_INCOMING flag must be specified. The extension must also set the PortId parameter to the identifier of the port from which the packet was received.

  • If the packet is being dropped due to policy based on the destination port, the NDIS_SWITCH_REPORT_FILTERED_NBL_FLAGS_IS_INCOMING flag must not be specified. The extension must also set the PortId parameter to the identifier of the port to which the packet was to be sent.

Requirements

Version

Supported in NDIS 6.30 and later.

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH_LEVEL

See also

FilterAttach
INF AddService Directive
NDIS_FILTER_ATTACH_PARAMETERS
NDIS_SWITCH_PORT_DESTINATION
NdisFGetOptionalSwitchHandlers
NET_BUFFER_LIST
UNICODE_STRING

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.