Home
last modified time | relevance | path

Searched full:hook (Results 1 – 25 of 1093) sorted by relevance

12345678910>>...44

/freebsd/sys/netgraph/
H A Dnetgraph.h100 typedef int ng_newhook_t(node_p node, hook_p hook, const char *name);
102 typedef int ng_connect_t(hook_p hook);
104 typedef int ng_rcvdata_t(hook_p hook, item_p item);
105 typedef int ng_disconnect_t(hook_p hook);
106 typedef int ng_rcvitem (node_p node, hook_p hook, item_p item);
109 ***************** Hook Structure and Methods **************************
112 * Structure of a hook
116 void *hk_private; /* node dependent ID for this hook */
117 int hk_flags; /* info about this hook/link */
118 int hk_type; /* tbd: hook data link type */
[all …]
H A Dng_tag.c36 * This node type accepts an arbitrary number of hooks. Each hook can be
37 * configured for an mbuf_tags(9) definition and two hook names: a hook
38 * for matched packets, and a hook for packets, that didn't match. Incoming
40 * out via first hook, and not matched out via second. If corresponding hook
43 * A hook can also have an outgoing tag definition configured, so that
44 * all packets leaving the hook will be unconditionally appended with newly
49 * are unconditionally forwarded to non-matching hook on input. There is
54 * If compiled with NG_TAG_DEBUG, each hook also keeps statistics about
80 * Per hook private info.
95 hook_p hi_match; /* matching hook pointer */
[all …]
H A Dng_etf.c128 /* Information we store for each hook on each node */
130 hook_p hook; member
136 hook_p match_hook; /* Hook to use on a match */
193 * Give our ok for a hook to be added...
197 ng_etf_newhook(node_p node, hook_p hook, const char *name) in ng_etf_newhook() argument
203 etfp->downstream_hook.hook = hook; in ng_etf_newhook()
204 NG_HOOK_SET_PRIVATE(hook, &etfp->downstream_hook); in ng_etf_newhook()
208 etfp->nomatch_hook.hook = hook; in ng_etf_newhook()
209 NG_HOOK_SET_PRIVATE(hook, &etfp->nomatch_hook); in ng_etf_newhook()
212 * Any other hook name is valid and can in ng_etf_newhook()
[all …]
H A Dng_bpf.c45 * This node type accepts any number of hook connections. With each hook
46 * is associated a bpf(4) filter program, and two hook names (each possibly
48 * matching packets are delivered out the first named hook (or dropped if
50 * named hook (or dropped if the empty string).
52 * Each hook also keeps statistics about how many packets have matched, etc.
84 /* Per hook private info */
86 hook_p hook; member
109 static int ng_bpf_setprog(hook_p hook, const struct ng_bpf_hookprog *hp);
216 /* Default BPF program for a hook that matches nothing */
218 { '\0' }, /* to be filled in at hook creation time */
[all …]
H A Dng_vlan.c232 ng_vlan_newhook(node_p node, hook_p hook, const char *name) in ng_vlan_newhook() argument
237 priv->downstream_hook = hook; in ng_vlan_newhook()
239 priv->nomatch_hook = hook; in ng_vlan_newhook()
242 * Any other hook name is valid and can in ng_vlan_newhook()
246 NG_HOOK_SET_PRIVATE(hook, NULL); in ng_vlan_newhook()
256 hook_p hook; in ng_vlan_rcvmsg() local
291 /* Check that a referenced hook exists. */ in ng_vlan_rcvmsg()
292 hook = ng_findhook(node, vf->hook_name); in ng_vlan_rcvmsg()
293 if (hook == NULL) { in ng_vlan_rcvmsg()
298 if (hook == priv->downstream_hook || in ng_vlan_rcvmsg()
[all …]
H A Dng_sample.c120 /* Information we store for each hook on each node */
124 hook_p hook; member
168 * Give our ok for a hook to be added...
170 * Possibly decode information out of the hook name.
171 * Add the hook's private info to the hook structure.
175 * pointer of each hook points to the appropriate XXX_hookinfo struct
180 ng_xxx_newhook(node_p node, hook_p hook, const char *name) in ng_xxx_newhook() argument
221 if (xxxp->channel[chan].hook != NULL) in ng_xxx_newhook()
223 NG_HOOK_SET_PRIVATE(hook, xxxp->channel + chan); in ng_xxx_newhook()
224 xxxp->channel[chan].hook = hook; in ng_xxx_newhook()
[all …]
H A Dng_cisco.c90 hook_p hook; /* the hook for this proto */ member
121 static void cisco_keepalive(node_p node, hook_p hook, void *arg1, int arg2);
195 /* Initialise the varous protocol hook holders */ in cisco_constructor()
205 * Check new hook
208 cisco_newhook(node_p node, hook_p hook, const char *name) in cisco_newhook() argument
213 sc->downstream.hook = hook; in cisco_newhook()
214 NG_HOOK_SET_PRIVATE(hook, &sc->downstream); in cisco_newhook()
220 sc->inet.hook = hook; in cisco_newhook()
221 NG_HOOK_SET_PRIVATE(hook, &sc->inet); in cisco_newhook()
223 sc->inet6.hook = hook; in cisco_newhook()
[all …]
H A Dng_base.c87 static struct mtx ng_nodelist_mtx; /* protects global node/hook lists */
234 static int ng_con_part2(node_p node, item_p item, hook_p hook);
235 static int ng_con_part3(node_p node, item_p item, hook_p hook);
242 void ng_destroy_hook(hook_p hook);
246 int ng_path_parse(char *addr, char **node, char **path, char **hook);
254 "netgraph hook structures");
262 #define _NG_ALLOC_HOOK(hook) \ argument
263 hook = malloc(sizeof(*hook), M_NETGRAPH_HOOK, M_NOWAIT | M_ZERO)
296 hook_p hook; in ng_alloc_hook() local
299 hook = LIST_FIRST(&ng_freehooks); in ng_alloc_hook()
[all …]
H A Dng_tee.c69 /* Per hook info */
71 hook_p hook; member
167 * Add a hook
170 ng_tee_newhook(node_p node, hook_p hook, const char *name) in ng_tee_newhook() argument
202 hinfo->hook = hook; in ng_tee_newhook()
204 NG_HOOK_SET_PRIVATE(hook, hinfo); in ng_tee_newhook()
264 if (lasthook == sc->left.hook || lasthook == sc->right.hook) { in ng_tee_rcvmsg()
268 NG_FWD_ITEM_HOOK(error, item, hinfo->dest->hook); in ng_tee_rcvmsg()
284 * Receive data on a hook
290 * on through the appropriate destination hook as if it had come
[all …]
H A Dng_ipfw.c94 /* Information we store for each hook */
96 hook_p hook; member
126 /* Register hook */ in ng_ipfw_mod_event()
152 ng_ipfw_newhook(node_p node, hook_p hook, const char *name) in ng_ipfw_newhook() argument
173 /* Allocate memory for this hook's private data */ in ng_ipfw_newhook()
178 hpriv->hook = hook; in ng_ipfw_newhook()
181 NG_HOOK_SET_PRIVATE(hook, hpriv); in ng_ipfw_newhook()
191 ng_ipfw_connect(hook_p hook) in ng_ipfw_connect() argument
193 NG_HOOK_FORCE_QUEUE(hook); in ng_ipfw_connect()
197 /* Look up hook by name */
[all …]
H A Dng_frame_relay.c47 * It has a 'downstream' hook that goes to the line, and a
48 * hook for each DLCI (eg, 'dlci16').
67 struct ctxinfo { /* one per active hook */
72 hook_p hook; /* if there's a hook assigned.. */ member
225 * Add a new hook
228 * The hook's private info points to our stash of info about that
232 ngfrm_newhook(node_p node, hook_p hook, const char *name) in ngfrm_newhook() argument
240 /* Check if it's our friend the control hook */ in ngfrm_newhook()
242 NG_HOOK_SET_PRIVATE(hook, NULL); /* paranoid */ in ngfrm_newhook()
249 * hook. in ngfrm_newhook()
[all …]
/freebsd/share/man/man9/
H A Dhhook.941 .Nd Helper Hook Framework
57 provides a framework for managing and running arbitrary hook functions at
58 defined hook points within the kernel.
68 Khelp is responsible for registering and deregistering Khelp module hook
75 to instantiate hook points.
79 by defining appropriate hook functions for insertion into hook points.
80 Hook functions must conform to the
90 arguments identify the hook point which has called into the hook function.
91 These are useful when a single hook function is registered for multiple hook
92 points and wants to know which hook point has called into it.
[all …]
H A Dconfig_intrhook.938 .Fn config_intrhook_establish "struct intr_config_hook *hook"
40 .Fn config_intrhook_disestablish "struct intr_config_hook *hook"
42 .Fn config_intrhook_drain "struct intr_config_hook *hook"
55 function removes the entry from the hook queue.
59 function removes the entry from the hook queue in a safe way.
60 If the hook is not currently active it removes
61 .Fa hook
62 from the hook queue and returns
64 If the hook is active, it waits for the hook to complete before returning
66 If the hook has previously completed, it returns
[all …]
/freebsd/sys/net/
H A Dpfil.c250 * pfil_head_register() registers a pfil_head with the packet filter hook
282 * pfil_head_unregister() removes a pfil_head from the packet filter hook
283 * mechanism. The producer of the hook promises that all outstanding
284 * invocations of the hook have completed before it unregisters the hook.
309 struct pfil_hook *hook, *list; in pfil_add_hook() local
313 hook = malloc(sizeof(struct pfil_hook), M_PFIL, M_WAITOK | M_ZERO); in pfil_add_hook()
314 hook->hook_mbuf_chk = pa->pa_mbuf_chk; in pfil_add_hook()
315 hook->hook_mem_chk = pa->pa_mem_chk; in pfil_add_hook()
316 hook->hook_ruleset = pa->pa_ruleset; in pfil_add_hook()
317 hook->hook_flags = pa->pa_flags; in pfil_add_hook()
[all …]
/freebsd/stand/lua/
H A Dhook.lua.831 .Nm hook.lua
32 .Nd FreeBSD hook module
35 contains functionality for defining hook types and attaching hooks.
39 .Dq hook types .
47 .Dl local hook = require("hook")
51 .Bl -tag -width hook.registerType -offset indent
52 .It Fn hook.registerType hooktype
55 as a recognized hook type.
58 .Fn hook.runAll hooktype .
59 .It Fn hook.register hooktype hookfunc
[all …]
/freebsd/share/man/man4/
H A Dng_tag.457 With each hook is associated a tag which will be searched in the list
58 of all tags attached to a packet incoming to this hook, a destination hook
59 for matching packets, a destination hook for non-matching packets,
60 a tag which will be appended to data leaving node through this hook,
73 of tag is checked to be identical to that specified in the hook structure.
76 destination hook, or forwarded to
78 hook otherwise.
83 specified in outgoing hook structure (it is possible to avoid appending
88 values in the structure of the corresponding outgoing hook).
94 with tag addition on outgoing matching hook.
[all …]
H A Dng_etf.444 hook and if the ethertype matches a value which the node has been configured
45 to filter, the packet is forwarded out the hook which was identified
50 hook.
53 hook is not connected, the packet is dropped.
57 hook) are also examined and filtered.
59 into the node, it must have arrived in on the hook for which that value
64 hook.
69 Typically this hook would be connected to a
73 hook.
75 Typically this hook would also be connected to an
[all …]
H A Dng_vlan.453 hook with a tag that the node has been configured to filter
56 hook.
61 hook.
64 hook is not connected, the packet is dropped.
68 hook is passed unmodified to the
70 hook.
76 hook.
81 Typically this hook would be connected to a
85 hook.
87 Typically this hook would also be connected to an
[all …]
H A Dng_bridge.448 Each link (represented by a connected hook) is used to transmit
78 Each connected hook represents a bridged link.
90 hook of an
94 Instead of naming a hook
96 the hook might be also named
102 hook of an
106 hook of the bridge, and ignore the complexity of the outside world.
112 hook is not allowed.
118 hook numbers can be autoassigned.
119 If a new hook name was specified as
[all …]
H A Dnetgraph.4125 needs, and may assign whatever meaning it wants to a hook.
130 A hook has an
145 A hook is always connected to another hook.
148 removing either hook destroys both hooks.
150 A hook can be set into a state where incoming packets are always queued
155 A hook may supply overriding receive data and receive message functions,
156 which should be used for data and messages received through that hook
161 For example, connecting to the hook named
164 the node to start sending debugging information to that hook.
202 hook names as the destination address for the message (relative
[all …]
/freebsd/contrib/jemalloc/include/jemalloc/internal/
H A Dhook.h18 * hook is called. If it is moved, then the alloc hook is called on the new
19 * location, and then the free hook is called on the old location (i.e. both
23 * realloc(NULL, size) only calls the alloc hook, and calling realloc(ptr, 0)
24 * only calls the free hook. (Calling realloc(NULL, 0) is treated as malloc(0),
25 * and only calls the alloc hook).
28 * Reentrancy is guarded against from within the hook implementation. If you
29 * call allocator functions from within a hook, the hooks will not be invoked
32 * The installation of a hook synchronizes with all its uses. If you can
33 * prove the installation of a hook happens-before a jemalloc entry point,
34 * then the hook will get invoked (unless there's a racing removal).
[all …]
/freebsd/sys/kern/
H A Dsubr_autoconf.c86 * If we wait too long for an interrupt-driven config hook to return, print
124 * If hook processing is already active, any newly in run_interrupt_driven_config_hooks()
178 * Register a hook that will be called after "cold"
183 config_intrhook_establish(struct intr_config_hook *hook) in config_intrhook_establish() argument
190 if (hook_entry == hook) in config_intrhook_establish()
195 "already established hook.\n"); in config_intrhook_establish()
198 STAILQ_INSERT_TAIL(&intr_config_hook_list, hook, ich_links); in config_intrhook_establish()
200 next_to_notify = hook; in config_intrhook_establish()
201 hook->ich_state = ICHS_QUEUED; in config_intrhook_establish()
206 * to be re-entered at the time a hook is established. in config_intrhook_establish()
[all …]
/freebsd/contrib/kyua/utils/process/
H A Dexecutor.ipp46 /// Functor to execute a hook in a child process.
48 /// The hook is executed after the process has been isolated per the logic in
51 template< class Hook >
54 Hook _hook;
56 /// Directory where the hook may place control files.
74 /// \param hook Function or functor to invoke in the child.
78 run_child(Hook hook,
82 _hook(hook),
105 /// \tparam Hook Type of the hook.
106 /// \param hook Function or functor to run in the subprocess.
[all …]
/freebsd/usr.sbin/bsnmpd/modules/snmp_netgraph/
H A Dsnmp_netgraph.377 .Fn ng_hook_f "const char *hook" "const u_char *mesg" "size_t len" "void *uarg"
83 .Fn ng_register_hook "const struct lmodule *mod" "const char *hook" "ng_hook_f *func" "void *uarg"
101 .Fn ng_send_data "const char *hook" "const void *sndbuf" "size_t sndlen"
103 .Fn ng_mkpeer_id "ng_ID_t id" "const char *name" "const char *type" "const char *hook" "const char …
115 .Fn ng_rmhook_id "ng_ID_t id" "const char *hook"
117 .Fn ng_rmhook_tee_id "ng_ID_t id" "const char *hook"
121 .Fn ng_next_node_id "ng_ID_t node" "const char *type" "const char *hook"
131 .Fn ng_peer_hook_id "ng_ID_t id" "const char *hook" "char *peerhook"
220 hook through which to send the data, a pointer to the message buffer and
245 is called with a pointer to the received message, the hook on which the
[all …]
/freebsd/contrib/jemalloc/src/
H A Dhook.c3 #include "jemalloc/internal/hook.h"
77 char *hook = (char *)opaque; in hook_remove() local
78 assert(hooks_begin <= hook && hook < hooks_end in hook_remove()
79 && (hook - hooks_begin) % sizeof(seq_hooks_t) == 0); in hook_remove()
110 * - Right now, we turn on reentrancy during things like extent hook in hook_reentrantp()
114 * - If a hook allocates, we may want it to be relatively fast (after in hook_reentrantp()
158 hooks_internal_t hook; in hook_invoke_alloc() local
159 FOR_EACH_HOOK_BEGIN(&hook) in hook_invoke_alloc()
160 hook_alloc h = hook.hooks.alloc_hook; in hook_invoke_alloc()
162 h(hook.hooks.extra, type, result, result_raw, args_raw); in hook_invoke_alloc()
[all …]

12345678910>>...44