The client application can implement this interface and pass the object pointer to nf_setIPEventHandler function. nfapi code calls the methods of NF_IPEventHandler to indicate IP packets for filtering/monitoring. The interface is defined as an abstract class with pure virtual functions for C++. If the symbol _C_API is defined, the interface is a structure with function pointers.
C++ (_C_API is not defined): class NF_IPEventHandler { public: virtual void ipReceive(const char * buf, int len, PNF_IP_PACKET_OPTIONS options) = 0; virtual void ipSend(const char * buf, int len, PNF_IP_PACKET_OPTIONS options) = 0; }; C (_C_API is defined): typedef struct _NF_IPEventHandler { void (NFAPI_CC *ipReceive)(const char * buf, int len, PNF_IP_PACKET_OPTIONS options); void (NFAPI_CC *ipSend)(const char * buf, int len, PNF_IP_PACKET_OPTIONS options); } NF_EventHandler, *PNF_EventHandler;
Driver type | WFP |
Header | nfapi.h |
Library | nfapi.lib |