Lines Matching refs:npf
32 * NPF packet handler.
34 * This is the main entry point to the NPF where packet processing happens.
71 #define m_freem(m) npf->mbufops->free(m)
82 npf_reassembly(npf_t *npf, npf_cache_t *npc, bool *mff)
91 if (npf_iscached(npc, NPC_IP4) && npf->ip4_reassembly) {
93 } else if (npf_iscached(npc, NPC_IP6) && npf->ip6_reassembly) {
105 npf_stats_inc(npf, NPF_STAT_REASSFAIL);
112 npf_stats_inc(npf, NPF_STAT_FRAGMENTS);
121 nbuf_init(npf, nbuf, m, nbuf->nb_ifp);
127 npf_stats_inc(npf, NPF_STAT_REASSEMBLY);
144 npfk_packet_handler(npf_t *npf, struct mbuf **mp, ifnet_t *ifp, int di)
161 nbuf_init(npf, &nbuf, *mp, ifp);
163 npc.npc_ctx = npf;
188 error = npf_reassembly(npf, &npc, &mff);
208 npf_stats_inc(npf, NPF_STAT_PASS_CONN);
219 int slock = npf_config_read_enter(npf);
220 npf_ruleset_t *rlset = npf_config_ruleset(npf);
224 const bool pass = npf_default_pass(npf);
225 npf_config_read_exit(npf, slock);
228 npf_stats_inc(npf, NPF_STAT_PASS_DEFAULT);
231 npf_stats_inc(npf, NPF_STAT_BLOCK_DEFAULT);
247 npf_config_read_exit(npf, slock);
256 npf_stats_inc(npf, NPF_STAT_BLOCK_RULESET);
259 npf_stats_inc(npf, NPF_STAT_PASS_RULESET);
347 npfk_layer2_handler(npf_t *npf, struct mbuf **mp, ifnet_t *ifp, int di)
361 nbuf_init(npf, &nbuf, *mp, ifp);
363 npc.npc_ctx = npf;
389 int slock = npf_config_read_enter(npf);
390 npf_ruleset_t *rlset = npf_config_ruleset(npf);
394 npf_config_read_exit(npf, slock);
396 npf_stats_inc(npf, NPF_STAT_PASS_DEFAULT);
402 npf_config_read_exit(npf, slock);
405 npf_stats_inc(npf, NPF_ETHER_STAT_BLOCK);
408 npf_stats_inc(npf, NPF_ETHER_STAT_PASS);