Searched refs:hook (Results 1 - 25 of 166) sorted by relevance

1234567

/freebsd-9.3-release/usr.sbin/ctladm/
H A Dctladm.h45 char *cget(void *hook, char *name);
46 int iget(void *hook, char *name);
47 void arg_put(void *hook, int letter, void *arg, int count, char *name);
/freebsd-9.3-release/sys/netgraph/
H A Dnetgraph.h96 typedef int ng_newhook_t(node_p node, hook_p hook, const char *name);
98 typedef int ng_connect_t(hook_p hook);
100 typedef int ng_rcvdata_t(hook_p hook, item_p item);
101 typedef int ng_disconnect_t(hook_p hook);
102 typedef int ng_rcvitem (node_p node, hook_p hook, item_p item);
108 * Structure of a hook
112 void *hk_private; /* node dependant ID for this hook */
113 int hk_flags; /* info about this hook/link */
114 int hk_type; /* tbd: hook data link type */
116 struct ng_node *hk_node; /* The node this hook i
191 _chkhook(hook_p hook, char *file, int line) argument
202 _ng_hook_ref(hook_p hook, char * file, int line) argument
209 _ng_hook_name(hook_p hook, char * file, int line) argument
216 _ng_hook_unref(hook_p hook, char * file, int line) argument
223 _ng_hook_set_private(hook_p hook, void *val, char * file, int line) argument
230 _ng_hook_set_rcvmsg(hook_p hook, ng_rcvmsg_t *val, char * file, int line) argument
237 _ng_hook_set_rcvdata(hook_p hook, ng_rcvdata_t *val, char * file, int line) argument
244 _ng_hook_private(hook_p hook, char * file, int line) argument
251 _ng_hook_not_valid(hook_p hook, char * file, int line) argument
258 _ng_hook_is_valid(hook_p hook, char * file, int line) argument
265 _ng_hook_node(hook_p hook, char * file, int line) argument
272 _ng_hook_peer(hook_p hook, char * file, int line) argument
279 _ng_hook_force_writer(hook_p hook, char * file, int line) argument
286 _ng_hook_force_queue(hook_p hook, char * file, int line) argument
293 _ng_hook_set_to_inbound(hook_p hook, char * file, int line) argument
300 _ng_hook_hi_stack(hook_p hook, char * file, int line) argument
571 hook_p hook; local
[all...]
H A Dng_sample.c122 /* Information we store for each hook on each node */
126 hook_p hook; member in struct:XXX_hookinfo
170 * Give our ok for a hook to be added...
172 * Possibly decode information out of the hook name.
173 * Add the hook's private info to the hook structure.
177 * pointer of each hook points to the appropriate XXX_hookinfo struct
182 ng_xxx_newhook(node_p node, hook_p hook, const char *name) argument
223 if (xxxp->channel[chan].hook != NULL)
225 NG_HOOK_SET_PRIVATE(hook, xxx
325 ng_xxx_rcvdata(hook_p hook, item_p item ) argument
447 ng_xxx_connect(hook_p hook) argument
487 ng_xxx_disconnect(hook_p hook) argument
[all...]
H A Dng_etf.c128 /* Information we store for each hook on each node */
130 hook_p hook; member in struct:ETF_hookinfo
195 * Give our ok for a hook to be added...
199 ng_etf_newhook(node_p node, hook_p hook, const char *name) argument
205 etfp->downstream_hook.hook = hook;
206 NG_HOOK_SET_PRIVATE(hook, &etfp->downstream_hook);
210 etfp->nomatch_hook.hook = hook;
211 NG_HOOK_SET_PRIVATE(hook,
284 hook_p hook; local
364 ng_etf_rcvdata(hook_p hook, item_p item ) argument
450 ng_etf_disconnect(hook_p hook) argument
[all...]
H A Dng_split.c99 * Give our ok for a hook to be added
102 ng_split_newhook(node_p node, hook_p hook, const char *name) argument
118 *localhook = hook;
119 NG_HOOK_SET_PRIVATE(hook, localhook);
125 * Recive data from a hook.
128 ng_split_rcvdata(hook_p hook, item_p item) argument
130 const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook));
133 if (hook == priv->out) {
134 printf("ng_split: got packet from out hook!\n");
137 } else if ((hook
165 ng_split_disconnect(hook_p hook) argument
[all...]
H A Dng_echo.c101 nge_rcvdata(hook_p hook, item_p item) argument
105 NG_FWD_ITEM_HOOK(error, item, hook);
113 nge_disconnect(hook_p hook) argument
115 if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
116 && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) {
117 ng_rmnode_self(NG_HOOK_NODE(hook));
H A Dng_UI.c112 * Give our ok for a hook to be added
115 ng_UI_newhook(node_p node, hook_p hook, const char *name) argument
122 priv->downlink = hook;
126 priv->uplink = hook;
168 ng_UI_rcvdata(hook_p hook, item_p item) argument
170 const node_p node = NG_HOOK_NODE(hook);
176 if (hook == priv->downlink) {
190 } else if (hook == priv->uplink) {
225 ng_UI_disconnect(hook_p hook) argument
227 const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook));
[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 als
300 ng_tag_newhook(node_p node, hook_p hook, const char *name) argument
360 hook_p hook; local
382 hook_p hook; local
403 hook_p hook; local
427 hook_p hook; local
454 hook_p hook; local
502 ng_tag_rcvdata(hook_p hook, item_p item) argument
607 ng_tag_disconnect(hook_p hook) argument
643 ng_tag_setdata_in(hook_p hook, const struct ng_tag_hookin *hp0) argument
693 ng_tag_setdata_out(hook_p hook, const struct ng_tag_hookout *hp0) argument
[all...]
H A Dng_vlan.c132 hook_p hook; member in struct:filter
172 ng_vlan_newhook(node_p node, hook_p hook, const char *name) argument
177 priv->downstream_hook = hook;
179 priv->nomatch_hook = hook;
182 * Any other hook name is valid and can
186 NG_HOOK_SET_PRIVATE(hook, NULL);
198 hook_p hook; local
219 /* Check that a referenced hook exists. */
220 hook = ng_findhook(node, vf->hook);
338 ng_vlan_rcvdata(hook_p hook, item_p item) argument
444 ng_vlan_disconnect(hook_p hook) argument
[all...]
H A Dng_hole.c58 /* Per hook private info. */
127 * Add a hook.
130 ngh_newhook(node_p node, hook_p hook, const char *name) argument
134 /* Create hook private structure. */
138 NG_HOOK_SET_PRIVATE(hook, hip);
152 hook_p hook; local
166 /* Find hook. */
167 hook = ng_findhook(node, (char *)msg->data);
168 if (hook == NULL) {
172 stats = &((hinfo_p)NG_HOOK_PRIVATE(hook))
205 ngh_rcvdata(hook_p hook, item_p item) argument
219 ngh_disconnect(hook_p hook) argument
[all...]
H A Dng_frame_relay.c49 * It has a 'downstream' hook that goes to the line, and a
50 * hook for each DLCI (eg, 'dlci16').
69 struct ctxinfo { /* one per active hook */
74 hook_p hook; /* if there's a hook assigned.. */ member in struct:ctxinfo
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) argument
240 /* Check if it's our friend the control hook */
242 NG_HOOK_SET_PRIVATE(hook, NUL
327 ngfrm_rcvdata(hook_p hook, item_p item) argument
494 ngfrm_disconnect(hook_p hook) argument
[all...]
H A Dng_base.c85 static struct mtx ng_nodelist_mtx; /* protects global node/hook lists */
232 static int ng_con_part2(node_p node, item_p item, hook_p hook);
233 static int ng_con_part3(node_p node, item_p item, hook_p hook);
240 void ng_destroy_hook(hook_p hook);
244 int ng_path_parse(char *addr, char **node, char **path, char **hook);
252 "netgraph hook structures");
260 #define _NG_ALLOC_HOOK(hook) \
261 hook = malloc(sizeof(*hook), M_NETGRAPH_HOOK, M_NOWAIT | M_ZERO)
294 hook_p hook; local
715 hook_p hook; local
1044 ng_unref_hook(hook_p hook) argument
1064 hook_p hook; local
1125 hook_p hook; local
1156 ng_destroy_hook(hook_p hook) argument
1339 ng_con_part3(node_p node, item_p item, hook_p hook) argument
1382 ng_con_part2(node_p node, item_p item, hook_p hook) argument
1480 hook_p hook; local
1619 ng_rmhook_part2(node_p node, hook_p hook, void *arg1, int arg2) argument
1626 ng_rmhook_self(hook_p hook) argument
1656 char *node, *path, *hook; local
1783 hook_p hook; local
2224 hook_p hook; local
2362 hook_p hook; local
2578 hook_p hook; local
2614 hook_p hook; local
3260 dumphook(hook_p hook, char *file, int line) argument
3358 hook_p hook; local
3575 ng_address_hook(node_p here, item_p item, hook_p hook, ng_ID_t retaddr) argument
3614 hook_p hook = NULL; local
3663 ng_package_msg_self(node_p here, hook_p hook, struct ng_mesg *msg) argument
3695 ng_send_fn(node_p node, hook_p hook, ng_item_fn *fn, void * arg1, int arg2) argument
3702 ng_send_fn1(node_p node, hook_p hook, ng_item_fn *fn, void * arg1, int arg2, int flags) argument
3732 ng_send_fn2(node_p node, hook_p hook, item_p pitem, ng_item_fn2 *fn, void *arg1, int arg2, int flags) argument
3781 ng_callout(struct callout *c, node_p node, hook_p hook, int ticks, ng_item_fn *fn, void * arg1, int arg2) argument
[all...]
H A Dng_ipfw.c94 /* Information we store for each hook */
96 hook_p hook; member in struct:ng_ipfw_hook_priv
126 /* Register hook */
152 ng_ipfw_newhook(node_p node, hook_p hook, const char *name) argument
173 /* Allocate memory for this hook's private data */
178 hpriv->hook = hook;
181 NG_HOOK_SET_PRIVATE(hook, hpriv);
191 ng_ipfw_connect(hook_p hook) argument
193 NG_HOOK_FORCE_QUEUE(hook);
214 hook_p hook; local
228 ng_ipfw_rcvdata(hook_p hook, item_p item) argument
292 hook_p hook; local
355 ng_ipfw_disconnect(hook_p hook) argument
[all...]
H A Dng_ether_echo.c105 ngee_rcvdata(hook_p hook, item_p item) argument
129 NG_FWD_NEW_DATA(error, item, hook, m);
137 ngee_disconnect(hook_p hook) argument
139 if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
140 && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) {
141 ng_rmnode_self(NG_HOOK_NODE(hook));
H A Dng_bpf.c47 * This node type accepts any number of hook connections. With each hook
48 * is associated a bpf(4) filter program, and two hook names (each possibly
50 * matching packets are delivered out the first named hook (or dropped if
52 * named hook (or dropped if the empty string).
54 * Each hook also keeps statistics about how many packets have matched, etc.
86 /* Per hook private info */
88 hook_p hook; member in struct:ng_bpf_hookinfo
111 static int ng_bpf_setprog(hook_p hook, const struct ng_bpf_hookprog *hp);
218 /* Default BPF program for a hook tha
244 ng_bpf_addrefs(hook_p hook, void* arg) argument
257 ng_bpf_remrefs(hook_p hook, void* arg) argument
273 ng_bpf_newhook(node_p node, hook_p hook, const char *name) argument
319 hook_p hook; local
340 hook_p hook; local
367 hook_p hook; local
415 ng_bpf_rcvdata(hook_p hook, item_p item) argument
524 ng_bpf_disconnect(hook_p hook) argument
556 ng_bpf_setprog(hook_p hook, const struct ng_bpf_hookprog *hp0) argument
[all...]
H A Dng_hub.c118 ng_hub_rcvdata(hook_p hook, item_p item) argument
120 const node_p node = NG_HOOK_NODE(hook);
131 if (hook2 == hook)
164 ng_hub_disconnect(hook_p hook) argument
166 const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook));
168 if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0 &&
169 NG_NODE_IS_VALID(NG_HOOK_NODE(hook)) && !priv->persistent)
170 ng_rmnode_self(NG_HOOK_NODE(hook));
H A Dng_tee.c65 /* Per hook info */
67 hook_p hook; member in struct:hookinfo
163 * Add a hook
166 ng_tee_newhook(node_p node, hook_p hook, const char *name) argument
198 hinfo->hook = hook;
200 NG_HOOK_SET_PRIVATE(hook, hinfo);
260 if (lasthook == sc->left.hook || lasthook == sc->right.hook) {
264 NG_FWD_ITEM_HOOK(error, item, hinfo->dest->hook);
290 ng_tee_rcvdata(hook_p hook, item_p item) argument
366 ng_tee_disconnect(hook_p hook) argument
[all...]
H A Dng_ip_input.c118 ngipi_rcvdata(hook_p hook, item_p item) argument
135 ngipi_disconnect(hook_p hook) argument
137 if (NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0)
138 ng_rmnode_self(NG_HOOK_NODE(hook));
H A Dng_lmi.h51 /* My hook names */
67 u_char proto[12]; /* Active proto (same as hook name) */
68 u_char hook[12]; /* Active hook */ member in struct:nglmistat
H A Dng_vlan.h51 char hook[NG_HOOKSIZ]; member in struct:ng_vlan_filter
57 { "hook", &ng_parse_hookbuf_type }, \
H A Dng_rfc1490.c180 * Give our ok for a hook to be added
183 ng_rfc1490_newhook(node_p node, hook_p hook, const char *name) argument
190 priv->downlink = hook;
194 priv->ppp = hook;
198 priv->inet = hook;
202 priv->ethernet = hook;
271 * Receive data on a hook and encapsulate according to RFC 1490.
306 ng_rfc1490_rcvdata(hook_p hook, item_p item) argument
308 const node_p node = NG_HOOK_NODE(hook);
314 if (hook
470 ng_rfc1490_disconnect(hook_p hook) argument
[all...]
/freebsd-9.3-release/sys/kern/
H A Dsubr_autoconf.c66 * If we wait too long for an interrupt-driven config hook to return, print
103 * If hook processing is already active, any newly
153 * Register a hook that will be called after "cold"
158 config_intrhook_establish(struct intr_config_hook *hook) argument
164 if (hook_entry == hook)
169 "already established hook.\n");
172 TAILQ_INSERT_TAIL(&intr_config_hook_list, hook, ich_links);
174 next_to_notify = hook;
179 * to be re-entered at the time a hook is established.
187 config_intrhook_disestablish(struct intr_config_hook *hook) argument
[all...]
/freebsd-9.3-release/usr.sbin/ngctl/
H A Dwrite.c54 "write hook < -f file | byte ... >",
55 "Send a data packet down the hook named by \"hook\".",
67 const char *hook; local
76 hook = av[1];
109 sag->sg_len = 3 + strlen(hook);
111 strlcpy(sag->sg_data, hook, sizeof(sagbuf) - 2);
114 warn("writing to hook \"%s\"", hook);
/freebsd-9.3-release/sbin/camcontrol/
H A Dcamcontrol.h59 char *cget(void *hook, char *name);
60 int iget(void *hook, char *name);
61 void arg_put(void *hook, int letter, void *arg, int count, char *name);
H A Dutil.c64 iget(void *hook, char *name) argument
66 struct get_hook *h = (struct get_hook *)hook;
87 cget(void *hook, char *name) argument
89 struct get_hook *h = (struct get_hook *)hook;
110 arg_put(void *hook __unused, int letter, void *arg, int count, char *name)

Completed in 177 milliseconds

1234567