RttcpipfltReceiveEx
RttcpipfltReceiveEx is called every time the TCP/IP Stack receives an Ethernet frame from the network. The filter can pass the frame up to the TCP/IP Stack by returning TRUE or drop the frame by returning FALSE. This function is like RttcpipfltReceive, but it includes a pointer to the network device that received the frame.
Note: Since this routine is called for every received frame, it should complete its work as quickly as possible.
Syntax
BOOL RttcpipfltReceiveEx(
[in] RTTCPIPFLT_ETHERNET_HEADER *pEthernetHeader,
[in] VOID *pData,
[in] ULONG ulEthernetDataSize,
[in] VOID *ndp
);
Parameters
pEthernetHeader
Pointer to a data structure representing the 14-byte Ethernet header of the received frame.
pData
Pointer to the first byte of Ethernet payload (just after the 14-byte Ethernet header) of the received frame.
ulEthernetDataSize
Size of the Ethernet payload (this does NOT include the 14-byte Ethernet header).
ndp
Network device pointer. This is an opaque pointer that identifies the NIC that received the Ethernet frame. This pointer can be used as a parameter of various TCP/IP Stack API functions, such as RttcpipGetDeviceName, RttcpipGetIpAddress, etc.
Return Value
If the frame must be passed to the TCP/IP Stack, it returns TRUE. If the frame must be dropped, it returns FALSE.
Remarks
A filter driver must implement at least one of the following callbacks in each path:
- RttcpipfltTransmit or RttcpipfltTransmitEx AND
- RttcpipfltReceive or RttcpipfltReceiveEx
At Runtime, if the filter is enabled, the TCP/IP Stack will attempt first to call the -Ex function, if found. Otherwise, it will call the non -Ex function.
Requirements
| Minimum supported version | Header | Library |
|---|---|---|
|
eRTOS 1.0 SDK |
Rttcpipflt.h |
Rttcpip.lib |
See Also: