nf_srv_addRule

Add the specified filtering rule to driver.

NF_STATUS nf_srv_addRule(PNF_SRV_RULE pRule, int toHead)

Parameters

pRule
A pointer to NF_SRV_RULE structure.
toHead
TRUE (1) - add rule to list head, FALSE (0) - add rule to list tail

Return Values

NF_STATUS_SUCCESS on success, or other NF_STATUS error code on fail.

Remarks

The driver scans the list of rules from the beginning and uses the filtering flag of a first matching rule. The new rules are added to the list head or tail, depending on toHead parameter. The driver doesn't filter the network activity of the attached process. In effect the rules are not applied to the sockets created by a process that uses driver API.

Requirements

Header nfsrvapi.h
Library nfsrvapi.lib