Stack bypass application programming interface
View Patent ↗Methods and apparatus, including computer program products, for a stack bypass application programming interface (API). A stack bypass API for receipt of a packet includes a registration function that registers an application selectable filter function and a receive function that are used during operation by an Ethernet driver.
1. A stack bypass application programming interface (API) for receipt of a packet comprising a registration function that registers an application selectable filter function and a receive function that are used during operation by an Ethernet driver, the filter function returning a response and the response causing the packet to be removed from a direct memory access (DMA) ring in the Ethernet driver and sent to the receive function.
2. A method of receiving a network packet comprising:
enabling a registration function that registers an application selectable filter function and receive function with an Ethernet driver;
calling a filter function, the filter function returning a state;
discarding the packet if the returned state is discard; forwarding the packet to an Internet Protocol (IP) stack if the returned state is forward; and
removing the packet and calling a receive function if the returned state is remove.
3. The method of claim 2 wherein the receive function processes the packet.
4. The method of claim 2 wherein the receive function passes the packet on to a thread.
5. The method of claim 2 wherein the receive function places the packet in a queue for future processing.