RtndReceiveFilter
RtndReceiveFilter is called when an incoming Ethernet frame is received from the NIC driver. This function will be called once per frame received. The filter can elect to send the frame up the stack and return TRUE or drop the frame by returning FALSE.
NOTE: Since this routine is called at every receive frame, this routine should complete its work quickly. 1- 2 ms is recommended.
Syntax
BOOL RtndReceiveFilter( EthernetHeader *pEthernetHeader, void *pData, unsigned long ulEthernetDataSize );
Parameters
pEthernetHeader
Pointer to Ethernet header data that contains the value in EthernetHeader format.
pData
Pointer to a data location in theEthernet frame.
ulEthernetDataSize
Size of the Ethernet data in a frame, not including the size of the Ethernet header.
Return Value
A return value of FALSE indicates the frame is being dropped. TRUE indicates that it is being sent to the stack.
Remarks
A filter driver must implement at least one of the following callbacks in each path:
- RtndTransmitFilter or RtndTransmitFilterEx AND
- RtndReceiveFilter or RtndReceiveFilterEx
At runtime, if the filter is enabled, the network driver will attempt first to call the -Ex function, if found. Otherwise, it will call the non -Ex function.
Please note that the packet is dropped if any of the above functions return FALSE.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | RtnApi.h |
Library | RtTcpip.lib |
See Also: