| /src/sys/net/npf/ |
| npfkern.h | 46 const char * (*getname)(npf_t *, struct ifnet *); 47 struct ifnet * (*lookup)(npf_t *, const char *); 48 void (*flush)(npf_t *, void *); 49 void * (*getmeta)(npf_t *, const struct ifnet *); 50 void (*setmeta)(npf_t *, struct ifnet *, void *); 54 struct mbuf * (*alloc)(npf_t *, unsigned, size_t); 69 npf_t * npfk_create(int, const npf_mbufops_t *, const npf_ifops_t *, void *); 70 int npfk_load(npf_t *, const void *, npf_error_t *); 71 int npfk_socket_load(npf_t *, int); 72 void npfk_gc(npf_t *); [all...] |
| npf_impl.h | 117 typedef void (*npf_workfunc_t)(npf_t *); 165 void (*destroy)(npf_t *, npf_nat_t *, npf_conn_t *); 280 void * npf_ext_register(npf_t *, const char *, const npf_ext_ops_t *); 281 int npf_ext_unregister(npf_t *, void *); 289 void npf_config_init(npf_t *); 290 void npf_config_fini(npf_t *); 292 npf_config_t * npf_config_enter(npf_t *); 293 void npf_config_exit(npf_t *); 294 void npf_config_sync(npf_t *); 295 bool npf_config_locked_p(npf_t *); [all...] |
| npf_conn.h | 62 * protected by npf_t::conn_lock. 127 unsigned npf_connkey_import(npf_t *, const nvlist_t *, npf_connkey_t *); 128 nvlist_t * npf_connkey_export(npf_t *, const npf_connkey_t *); 134 void npf_conn_init(npf_t *); 135 void npf_conn_fini(npf_t *); 136 void npf_conn_tracking(npf_t *, bool); 137 void npf_conn_load(npf_t *, npf_conndb_t *, bool); 143 void npf_conn_destroy(npf_t *, npf_conn_t *); 152 bool npf_conn_expired(npf_t *, const npf_conn_t *, uint64_t); 154 void npf_conn_worker(npf_t *); [all...] |
| npf.c | 50 static __read_mostly npf_t * npf_kernel_ctx = NULL; 74 __dso_public npf_t * 78 npf_t *npf; 80 npf = kmem_zalloc(sizeof(npf_t), KM_SLEEP); 104 npfk_destroy(npf_t *npf) 125 kmem_free(npf, sizeof(npf_t)); 135 npfk_load(npf_t *npf, const void *config_ref, npf_error_t *err) 149 npfk_gc(npf_t *npf) 155 npfk_thread_register(npf_t *npf) 161 npfk_thread_unregister(npf_t *npf [all...] |
| npf_conf.c | 44 * For the cases (2) and (3), mutual exclusion (npf_t::config_lock) 64 npf_config_init(npf_t *npf) 113 npf_config_fini(npf_t *npf) 134 npf_config_load(npf_t *npf, npf_config_t *nc, npf_conndb_t *conns, bool flush) 199 npf_config_enter(npf_t *npf) 206 npf_config_exit(npf_t *npf) 212 npf_config_locked_p(npf_t *npf) 218 npf_config_sync(npf_t *npf) 229 npf_config_read_enter(npf_t *npf) 236 npf_config_read_exit(npf_t *npf, int s [all...] |
| npf_if.c | 79 npf_ifmap_init(npf_t *npf, const npf_ifops_t *ifops) 94 npf_ifmap_fini(npf_t *npf) 102 npf_ifmap_lookup(npf_t *npf, const char *ifname) 124 npf_ifmap_register(npf_t *npf, const char *ifname) 156 npf_ifmap_flush(npf_t *npf) 188 npf_ifmap_getid(npf_t *npf, const ifnet_t *ifp) 199 npf_ifmap_copylogname(npf_t *npf, unsigned id, char *buf, size_t len) 218 npf_ifmap_copyname(npf_t *npf, unsigned id, char *buf, size_t len) 226 npfk_ifmap_attach(npf_t *npf, ifnet_t *ifp) 238 npfk_ifmap_detach(npf_t *npf, ifnet_t *ifp [all...] |
| npf_os.c | 113 static const char * npf_ifop_getname(npf_t *, ifnet_t *); 114 static ifnet_t * npf_ifop_lookup(npf_t *, const char *); 115 static void npf_ifop_flush(npf_t *, void *); 116 static void * npf_ifop_getmeta(npf_t *, const ifnet_t *); 117 static void npf_ifop_setmeta(npf_t *, ifnet_t *, void *); 138 npf_t *npf = npf_getkernctx(); 153 npf_t *npf; 226 npf_stats_export(npf_t *npf, void *data) 261 npf_t *npf = npf_getkernctx(); 334 npf_t *npf = npf_getkernctx() [all...] |
| npf_alg.c | 71 npf_alg_init(npf_t *npf) 80 npf_alg_fini(npf_t *npf) 88 npf_alg_lookup(npf_t *npf, const char *name) 105 npf_alg_construct(npf_t *npf, const char *name) 130 npf_alg_register(npf_t *npf, const char *name, const npfa_funcs_t *funcs) 180 npf_alg_unregister(npf_t *npf, npf_alg_t *alg) 221 npf_t *npf = npc->npc_ctx; 257 npf_t *npf = npc->npc_ctx; 296 npf_t *npf = npc->npc_ctx; 321 npf_alg_destroy(npf_t *npf, npf_alg_t *alg, npf_nat_t *nat, npf_conn_t *con [all...] |
| npf_ifaddr.c | 50 lookup_ifnet_table(npf_t *npf, ifnet_t *ifp) 88 replace_ifnet_table(npf_t *npf, npf_table_t *newt) 109 npf_ifaddr_sync(npf_t *npf, ifnet_t *ifp) 154 npf_ifaddr_flush(npf_t *npf, ifnet_t *ifp) 169 npf_ifaddr_syncall(npf_t *npf)
|
| npf_params.c | 53 npf_param_general_register(npf_t *npf) 90 npf_param_init(npf_t *npf) 103 npf_param_fini(npf_t *npf) 135 npf_params_export(const npf_t *npf, nvlist_t *nv) 161 npf_param_allocgroup(npf_t *npf, npf_paramgroup_t group, size_t len) 169 npf_param_freegroup(npf_t *npf, npf_paramgroup_t group, size_t len) 179 npf_param_register(npf_t *npf, npf_param_t *params, unsigned count) 224 npf_param_lookup(npf_t *npf, const char *name) 232 npf_param_check(npf_t *npf, const char *name, int val) 246 npfk_param_get(npf_t *npf, const char *name, int *val [all...] |
| npf_ext_rndblock.c | 138 npf_ext_rndblock_init(npf_t *npf) 158 npf_ext_rndblock_fini(npf_t *npf) 174 npf_t *npf = npf_getkernctx();
|
| npf_worker.c | 60 * Flags for the npf_t::worker_flags field. 132 npf_worker_addfunc(npf_t *npf, npf_workfunc_t work) 147 npf_worker_signal(npf_t *npf) 165 npf_worker_enlist(npf_t *npf) 186 npf_worker_discharge(npf_t *npf) 212 remove_npf_instance(npf_workerinfo_t *winfo, npf_t *npf) 233 process_npf_instance(npf_workerinfo_t *winfo, npf_t *npf) 271 npf_t *npf; 283 npf_t *next = LIST_NEXT(npf, worker_entry);
|
| npf_rproc.c | 81 npf_ext_init(npf_t *npf) 88 npf_ext_fini(npf_t *npf) 102 npf_ext_lookup(npf_t *npf, const char *name, bool autoload) 130 npf_ext_register(npf_t *npf, const char *name, const npf_ext_ops_t *ops) 151 npf_ext_unregister(npf_t *npf, void *extid) 176 npf_ext_construct(npf_t *npf, const char *name,
|
| npf_ext_log.c | 155 npf_ext_log_init(npf_t *npf) 169 npf_ext_log_fini(npf_t *npf) 178 npf_t *npf = npf_getkernctx();
|
| npf_ext_normalize.c | 208 npf_ext_normalize_init(npf_t *npf) 223 npf_ext_normalize_fini(npf_t *npf) 232 npf_t *npf = npf_getkernctx();
|
| npf_state.c | 92 npf_state_sysinit(npf_t *npf) 130 npf_state_sysfini(npf_t *npf) 216 npf_state_etime(npf_t *npf, const npf_state_t *nst, const int proto)
|
| npf_conndb.c | 100 npf_conndb_sysinit(npf_t *npf) 128 npf_conndb_sysfini(npf_t *npf) 164 npf_conndb_lookup(npf_t *npf, const npf_connkey_t *ck, npf_flow_t *flow) 302 npf_conndb_gc_incr(npf_t *npf, npf_conndb_t *cd, const time_t now) 373 gc_freq_tune(const npf_t *npf, const npf_conndb_t *cd, const unsigned n) 389 npf_conndb_gc(npf_t *npf, npf_conndb_t *cd, bool flush, bool sync)
|
| npf_ctl.c | 55 npf_mk_params(npf_t *npf, const nvlist_t *req, nvlist_t *resp, bool set) 142 npf_mk_table(npf_t *npf, const nvlist_t *req, nvlist_t *resp, 196 npf_mk_tables(npf_t *npf, const nvlist_t *req, nvlist_t *resp, npf_config_t *nc) 231 npf_mk_singlerproc(npf_t *npf, const nvlist_t *rproc, nvlist_t *resp) 261 npf_mk_rprocs(npf_t *npf, const nvlist_t *req, nvlist_t *resp, npf_config_t *nc) 294 npf_mk_algs(npf_t *npf, const nvlist_t *req, nvlist_t *resp) 323 npf_mk_singlerule(npf_t *npf, const nvlist_t *req, nvlist_t *resp, 399 npf_mk_rules(npf_t *npf, const nvlist_t *req, nvlist_t *resp, npf_config_t *nc) 440 npf_mk_singlenat(npf_t *npf, const nvlist_t *nat, nvlist_t *resp, 490 npf_mk_natlist(npf_t *npf, const nvlist_t *req, nvlist_t *resp, npf_config_t *nc [all...] |
| npf_conn.c | 100 * npf_t::config_lock -> 142 static int npf_conn_export(npf_t *, npf_conn_t *, nvlist_t *); 149 npf_conn_init(npf_t *npf) 185 npf_conn_fini(npf_t *npf) 209 npf_conn_load(npf_t *npf, npf_conndb_t *ndb, bool track) 249 npf_conn_tracking(npf_t *npf, bool track) 259 const npf_t *npf = npc->npc_ctx; 328 npf_t *npf = npc->npc_ctx; 426 npf_t *npf = npc->npc_ctx; 528 npf_conn_destroy(npf_t *npf, npf_conn_t *con [all...] |
| /src/usr.sbin/npf/npftest/libnpftest/ |
| npf_test_subr.c | 46 static const char * npftest_ifop_getname(npf_t *, ifnet_t *); 47 static ifnet_t * npftest_ifop_lookup(npf_t *, const char *); 48 static void npftest_ifop_flush(npf_t *, void *); 49 static void * npftest_ifop_getmeta(npf_t *, const ifnet_t *); 50 static void npftest_ifop_setmeta(npf_t *, ifnet_t *, void *); 65 npf_t *npf; 89 npf_t *npf = npf_getkernctx(); 116 npf_t *npf = npf_getkernctx(); 176 npftest_ifop_getname(npf_t *npf __unused, ifnet_t *ifp) 182 npftest_ifop_lookup(npf_t *npf __unused, const char *ifname [all...] |
| npf_gc_test.c | 68 npf_t *npf = npf_getkernctx(); 158 run_conndb_tests(npf_t *npf) 176 worker_test_task(npf_t *npf) 183 run_worker_tests(npf_t *npf) 198 npf_t *test_npf; 202 * We will (ab)use npf_t::arg here. 212 test_npf = kmem_zalloc(sizeof(npf_t), KM_SLEEP); 236 kmem_free(test_npf, sizeof(npf_t)); // npfk_destroy() 255 npf_t *npf = npf_getkernctx();
|
| npf_l2rule_test.c | 74 npf_t *npf = npf_getkernctx(); 103 npf_t *npf = npf_getkernctx(); 118 npf_t *npf = npf_getkernctx(); 156 npf_t *npf = npf_getkernctx();
|
| npfl2onlytest.c | 55 npf_t *npf = npf_getkernctx();
|
| npf_perf_test.c | 30 npf_t *npf = npf_getkernctx();
|
| npf_rule_test.c | 229 npf_t *npf = npf_getkernctx(); 257 npf_t *npf = npf_getkernctx(); 272 npf_t *npf = npf_getkernctx(); 312 npf_t *npf = npf_getkernctx();
|