HomeSort by: relevance | last modified time | path
    Searched refs:npf (Results 1 - 25 of 96) sorted by relevancy

1 2 3 4

  /src/sys/net/npf/
npf_if.c 32 * NPF network interface handling.
34 * NPF uses its own interface IDs (npf-if-id). These IDs start from 1.
40 * - Bind a symbolic interface name to NPF interface ID.
41 * - Associate NPF interface ID when the network interface is attached.
43 * When NPF configuration is (re)loaded, each referenced network interface
49 * To avoid race conditions when an active NPF configuration is updated or
74 #define NPF_IFMAP_SLOT2ID(npf, slot) ((npf)->ifmap_off + (slot) + 1)
75 #define NPF_IFMAP_ID2SLOT(npf, id)
    [all...]
npf_conf.c 31 * NPF configuration loading mechanism.
64 npf_config_init(npf_t *npf)
68 mutex_init(&npf->config_lock, MUTEX_DEFAULT, IPL_SOFTNET);
80 npf_config_load(npf, nc, NULL, true);
81 KASSERT(npf->config != NULL);
113 npf_config_fini(npf_t *npf)
118 mutex_enter(&npf->config_lock);
119 npf_conn_tracking(npf, false);
120 npf_ebr_full_sync(npf->ebr);
121 npf_conn_load(npf, cd, false)
    [all...]
npf.c 31 * NPF main: dynamic load/initialisation and unload routines.
36 __KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.44 2020/08/27 18:50:25 riastradh Exp $");
78 npf_t *npf; local in function:npfk_create
80 npf = kmem_zalloc(sizeof(npf_t), KM_SLEEP);
81 npf->ebr = npf_ebr_create();
82 npf->stats_percpu = percpu_alloc(NPF_STATS_SIZE);
83 npf->mbufops = mbufops;
84 npf->arg = arg;
86 npf_param_init(npf);
87 npf_state_sysinit(npf);
    [all...]
npf_alg.c 31 * NPF interface for the Application Level Gateways (ALGs).
71 npf_alg_init(npf_t *npf)
76 npf->algset = aset;
80 npf_alg_fini(npf_t *npf)
82 npf_algset_t *aset = npf->algset;
88 npf_alg_lookup(npf_t *npf, const char *name)
90 npf_algset_t *aset = npf->algset;
92 KASSERT(npf_config_locked_p(npf));
105 npf_alg_construct(npf_t *npf, const char *name)
109 npf_config_enter(npf);
221 npf_t *npf = npc->npc_ctx; local in function:npf_alg_match
257 npf_t *npf = npc->npc_ctx; local in function:npf_alg_exec
296 npf_t *npf = npc->npc_ctx; local in function:npf_alg_conn
    [all...]
npf_ifaddr.c 31 * NPF network interface handling module.
50 lookup_ifnet_table(npf_t *npf, ifnet_t *ifp)
52 const npf_ifops_t *ifops = npf->ifops;
60 ifname = ifops->getname(npf, ifp);
64 nc = npf_config_enter(npf);
75 /* Create a new NPF table for the interface. */
82 npf_config_exit(npf);
88 replace_ifnet_table(npf_t *npf, npf_table_t *newt)
90 npf_tableset_t *ts = atomic_load_relaxed(&npf->config)->tableset;
93 KASSERT(npf_config_locked_p(npf));
    [all...]
npf_worker.c 51 LIST_HEAD(, npf) instances;
132 npf_worker_addfunc(npf_t *npf, npf_workfunc_t work)
134 KASSERTMSG(npf->worker_flags == 0,
138 if (npf->worker_funcs[i] == NULL) {
139 npf->worker_funcs[i] = work;
147 npf_worker_signal(npf_t *npf)
151 if ((npf->worker_flags & WFLAG_ACTIVE) == 0) {
162 * npf_worker_enlist: add the NPF instance for worker(s) to process.
165 npf_worker_enlist(npf_t *npf)
169 KASSERT(npf->worker_flags == 0)
271 npf_t *npf; local in function:npf_worker
    [all...]
Makefile 7 INCS= npf.h
npf_handler.c 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)
    [all...]
npf_os.c 31 * NPF main: dynamic load/initialisation and unload routines.
40 #if NPF > 0
41 #error "NPF and PF are mutually exclusive; please select one"
81 MODULE(MODULE_CLASS_MISC, npf, "bpf");
83 /* This module autoloads via /dev/npf so it needs to be a driver */
84 MODULE(MODULE_CLASS_DRIVER, npf, "bpf");
138 npf_t *npf = npf_getkernctx(); local in function:npf_fini
145 npfk_destroy(npf);
153 npf_t *npf; local in function:npf_init
159 npf = npfk_create(0, NULL, &kern_ifops, NULL)
261 npf_t *npf = npf_getkernctx(); local in function:npf_dev_ioctl
334 npf_t *npf = npf_getkernctx(); local in function:npf_autounload_p
393 npf_t *npf = npf_getkernctx(); local in function:npfos_packet_handler
400 npf_t *npf = npf_getkernctx(); local in function:npfos_layer2_handler
410 npf_t *npf = npf_getkernctx(); local in function:npf_ifhook
428 npf_t *npf = npf_getkernctx(); local in function:npf_ifaddrhook
509 npf_t *npf = npf_getkernctx(); local in function:npf_pfil_register
580 npf_t *npf = npf_getkernctx(); local in function:npf_pfil_unregister
    [all...]
npf_params.c 53 npf_param_general_register(npf_t *npf)
58 &npf->ip4_reassembly,
64 &npf->ip6_reassembly,
69 npf_param_register(npf, param_map, __arraycount(param_map));
90 npf_param_init(npf_t *npf)
96 npf->paraminfo = paraminfo;
99 npf_param_general_register(npf);
103 npf_param_fini(npf_t *npf)
105 npf_paraminfo_t *pinfo = npf->paraminfo;
135 npf_params_export(const npf_t *npf, nvlist_t *nv
    [all...]
npf_rproc.c 31 * NPF extension and rule procedure interface.
81 npf_ext_init(npf_t *npf)
83 mutex_init(&npf->ext_lock, MUTEX_DEFAULT, IPL_NONE);
84 LIST_INIT(&npf->ext_list);
88 npf_ext_fini(npf_t *npf)
90 KASSERT(LIST_EMPTY(&npf->ext_list));
91 mutex_destroy(&npf->ext_lock);
95 * NPF extension management for the rule procedures.
102 npf_ext_lookup(npf_t *npf, const char *name, bool autoload)
108 KASSERT(mutex_owned(&npf->ext_lock))
    [all...]
npf_ext_rndblock.c 28 * NPF random blocking extension - kernel module.
46 * NPF extension module definition and the identifier.
138 npf_ext_rndblock_init(npf_t *npf)
149 * Initialize the NPF extension. Register the "rndblock" extension
152 npf_ext_rndblock_id = npf_ext_register(npf, "rndblock",
158 npf_ext_rndblock_fini(npf_t *npf)
161 * Remove the rndblock extension. NPF may return an if there
164 return npf_ext_unregister(npf, npf_ext_rndblock_id);
174 npf_t *npf = npf_getkernctx(); local in function:npf_ext_rndblock_modcmd
178 return npf_ext_rndblock_init(npf);
    [all...]
npf_conndb.c 31 * NPF connection storage.
49 * network stack invokes NPF at IPL_SOFTNET or lower, but not higher.
100 npf_conndb_sysinit(npf_t *npf)
102 npf_conndb_params_t *params = npf_param_allocgroup(npf,
124 npf_param_register(npf, param_map, __arraycount(param_map));
128 npf_conndb_sysfini(npf_t *npf)
131 npf_param_freegroup(npf, NPF_PARAMS_CONNDB, len);
164 npf_conndb_lookup(npf_t *npf, const npf_connkey_t *ck, npf_flow_t *flow)
166 npf_conndb_t *cd = atomic_load_relaxed(&npf->conn_db);
174 int s = npf_config_read_enter(npf);
    [all...]
npf_conn.c 32 * NPF connection tracking for stateful filtering and translation.
149 npf_conn_init(npf_t *npf)
151 npf_conn_params_t *params = npf_param_allocgroup(npf,
167 npf_param_register(npf, param_map, __arraycount(param_map));
169 npf->conn_cache[0] = pool_cache_init(
172 npf->conn_cache[1] = pool_cache_init(
176 mutex_init(&npf->conn_lock, MUTEX_DEFAULT, IPL_NONE);
177 atomic_store_relaxed(&npf->conn_tracking, CONN_TRACKING_OFF);
178 npf->conn_db = npf_conndb_create();
179 npf_conndb_sysinit(npf);
259 const npf_t *npf = npc->npc_ctx; local in function:npf_conn_trackable_p
328 npf_t *npf = npc->npc_ctx; local in function:npf_conn_lookup
426 npf_t *npf = npc->npc_ctx; local in function:npf_conn_establish
568 npf_t *npf = npc->npc_ctx; local in function:npf_conn_setnat
    [all...]
npf_state.c 31 * NPF state engine to track connection.
92 npf_state_sysinit(npf_t *npf)
94 npf_state_params_t *params = npf_param_allocgroup(npf,
125 npf_param_register(npf, param_map, __arraycount(param_map));
126 npf_state_tcp_sysinit(npf);
130 npf_state_sysfini(npf_t *npf)
133 npf_param_freegroup(npf, NPF_PARAMS_GENERIC_STATE, len);
134 npf_state_tcp_sysfini(npf);
216 npf_state_etime(npf_t *npf, const npf_state_t *nst, const int proto)
225 timeout = npf_state_tcp_timeout(npf, nst)
    [all...]
  /src/share/examples/npf/
Makefile 8 FILES= host-npf.conf soho_gw-npf.conf hashtablefile treetablefile
9 FILES+= l2tp_gw-npf.conf
10 FILESDIR= /usr/share/examples/npf
  /src/lib/libnpf/
Makefile 7 LIB= npf
10 SRCS= npf.c
12 INCS= npf.h
19 CPPFLAGS.npf.c += -I${NVSRC_DISTPATH}
  /src/etc/rc.d/
npf_boot 13 rcvar="npf"
19 if [ -f /etc/npf.boot.conf ]; then
20 /sbin/npfctl reload /etc/npf.boot.conf
21 elif [ -f /etc/defaults/npf.boot.conf ]; then
22 /sbin/npfctl reload /etc/defaults/npf.boot.conf
24 warn "can't load initial npf rules; npf start aborted."
33 load_rc_config_var npf npf
  /src/lib/npf/
mod.mk 15 LIBDIR= ${LIBROOTDIR}/${MLIBDIR}/npf
17 SHLIBINSTALLDIR=${LIBROOTDIR}/${MLIBDIR}/npf
19 LIBDIR= ${LIBROOTDIR}/npf
21 SHLIBINSTALLDIR=${LIBROOTDIR}/npf
25 SRCS= npf${MOD}.c
26 LIBDPLIBS+= npf ${NETBSDSRCDIR}/lib/libnpf
  /src/tests/net/npf/
Makefile 6 TESTSDIR= ${TESTSBASE}/net/npf
10 FILES= ../../../usr.sbin/npf/npftest/npftest.conf
11 FILES+= ../../../usr.sbin/npf/npftest/npftestl3.conf
t_npf.sh 33 atf_check -o ignore -e ignore npfctl debug -c "$(atf_get_srcdir)/npftestl3.conf" -o ./npf.plist
35 atf_check -o ignore -e ignore npfctl debug -c "$(atf_get_srcdir)/npftest.conf" -o ./npf.plist
38 atf_check -o ignore npftest -c npf.plist -T "${name}"
  /src/usr.sbin/npf/
Makefile 11 MAN= npf.7 npf-params.7
  /src/usr.sbin/npf/npftest/libnpftest/
npf_gc_test.c 2 * NPF connection tests.
12 #include "npf.h"
68 npf_t *npf = npf_getkernctx(); local in function:run_conn_gc
72 npf->conn_db = cd;
97 npf_conndb_gc(npf, cd, false, false);
105 npf_conndb_gc(npf, cd, true, false);
107 npf->conn_db = NULL;
158 run_conndb_tests(npf_t *npf)
160 npf_conndb_t *orig_cd = npf->conn_db;
163 npf_config_enter(npf);
255 npf_t *npf = npf_getkernctx(); local in function:npf_gc_test
    [all...]
npf_test_subr.c 2 * NPF initialisation and handler routines.
33 * Standalone NPF: we define the same struct ifnet members
65 npf_t *npf; local in function:npf_test_init
69 if ((npf = npf_getkernctx()) != NULL) {
70 npf_worker_discharge(npf);
74 npf = npfk_create(0, &npftest_mbufops, &npftest_ifops, NULL);
75 npfk_thread_register(npf);
76 npf_setkernctx(npf);
89 npf_t *npf = npf_getkernctx(); local in function:npf_test_fini
91 npfk_thread_unregister(npf);
116 npf_t *npf = npf_getkernctx(); local in function:npf_test_addif
224 npf_t *npf = npf_getkernctx(); local in function:npf_test_statetrack
    [all...]
npf_l2rule_test.c 2 * NPF layer 2 ruleset tests.
74 npf_t *npf = npf_getkernctx(); local in function:run_raw_testcase
83 slock = npf_config_read_enter(npf);
84 rl = npf_ruleset_inspect(npc, npf_config_ruleset(npf), t->di, NPF_RULE_LAYER_2);
91 npf_config_read_exit(npf, slock);
103 npf_t *npf = npf_getkernctx(); local in function:run_handler_testcase
108 error = npfk_layer2_handler(npf, &m, ifp, t->di);
118 npf_t *npf = npf_getkernctx(); local in function:npf_blockall_rule
124 rl = npf_rule_alloc(npf, rule);
156 npf_t *npf = npf_getkernctx() local in function:test_dynamic
    [all...]

Completed in 24 milliseconds

1 2 3 4