| /NextBSD/sys/netgraph/ |
| HD | netgraph.h | 96 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); 141 void ng_unref_hook(hook_p hook); /* don't move this */ 142 #define _NG_HOOK_REF(hook) refcount_acquire(&(hook)->hk_refs) argument 143 #define _NG_HOOK_NAME(hook) ((hook)->hk_name) argument 144 #define _NG_HOOK_UNREF(hook) ng_unref_hook(hook) argument 145 #define _NG_HOOK_SET_PRIVATE(hook, val) do {(hook)->hk_private = val;} while (0) argument [all …]
|
| HD | ng_etf.c | 130 hook_p hook; member 199 ng_etf_newhook(node_p node, hook_p hook, const char *name) in ng_etf_newhook() argument 205 etfp->downstream_hook.hook = hook; in ng_etf_newhook() 206 NG_HOOK_SET_PRIVATE(hook, &etfp->downstream_hook); in ng_etf_newhook() 210 etfp->nomatch_hook.hook = hook; in ng_etf_newhook() 211 NG_HOOK_SET_PRIVATE(hook, &etfp->nomatch_hook); in ng_etf_newhook() 223 NG_HOOK_SET_PRIVATE(hook, hpriv); in ng_etf_newhook() 224 hpriv->hook = hook; in ng_etf_newhook() 284 hook_p hook; in ng_etf_rcvmsg() local 294 hook = ng_findhook(node, f->matchhook); in ng_etf_rcvmsg() [all …]
|
| HD | ng_sample.c | 126 hook_p hook; member 182 ng_xxx_newhook(node_p node, hook_p hook, const char *name) in ng_xxx_newhook() argument 223 if (xxxp->channel[chan].hook != NULL) in ng_xxx_newhook() 225 NG_HOOK_SET_PRIVATE(hook, xxxp->channel + chan); in ng_xxx_newhook() 226 xxxp->channel[chan].hook = hook; in ng_xxx_newhook() 231 xxxp->downstream_hook.hook = hook; in ng_xxx_newhook() 232 NG_HOOK_SET_PRIVATE(hook, &xxxp->downstream_hook); in ng_xxx_newhook() 235 xxxp->debughook = hook; in ng_xxx_newhook() 236 NG_HOOK_SET_PRIVATE(hook, NULL); in ng_xxx_newhook() 325 ng_xxx_rcvdata(hook_p hook, item_p item ) in ng_xxx_rcvdata() argument [all …]
|
| HD | ng_base.c | 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); 260 #define _NG_ALLOC_HOOK(hook) \ argument 261 hook = malloc(sizeof(*hook), M_NETGRAPH_HOOK, M_NOWAIT | M_ZERO) 294 hook_p hook; in ng_alloc_hook() local 297 hook = LIST_FIRST(&ng_freehooks); in ng_alloc_hook() 298 if (hook) { in ng_alloc_hook() 299 LIST_REMOVE(hook, hk_hooks); in ng_alloc_hook() [all …]
|
| HD | ng_vlan.c | 234 ng_vlan_newhook(node_p node, hook_p hook, const char *name) in ng_vlan_newhook() argument 239 priv->downstream_hook = hook; in ng_vlan_newhook() 241 priv->nomatch_hook = hook; in ng_vlan_newhook() 248 NG_HOOK_SET_PRIVATE(hook, NULL); in ng_vlan_newhook() 258 hook_p hook; in ng_vlan_rcvmsg() local 294 hook = ng_findhook(node, vf->hook_name); in ng_vlan_rcvmsg() 295 if (hook == NULL) { in ng_vlan_rcvmsg() 300 if (hook == priv->downstream_hook || in ng_vlan_rcvmsg() 301 hook == priv->nomatch_hook) { in ng_vlan_rcvmsg() 306 if (IS_HOOK_VLAN_SET(NG_HOOK_PRIVATE(hook))) { in ng_vlan_rcvmsg() [all …]
|
| HD | ng_tag.c | 123 static int ng_tag_setdata_in(hook_p hook, const struct ng_tag_hookin *hp); 124 static int ng_tag_setdata_out(hook_p hook, const struct ng_tag_hookout *hp); 300 ng_tag_newhook(node_p node, hook_p hook, const char *name) in ng_tag_newhook() argument 309 NG_HOOK_SET_PRIVATE(hook, hip); in ng_tag_newhook() 319 if ((error = ng_tag_setdata_in(hook, &ng_tag_default_in)) != 0) { in ng_tag_newhook() 325 if ((error = ng_tag_setdata_out(hook, &ng_tag_default_out)) != 0) { in ng_tag_newhook() 361 hook_p hook; in ng_tag_rcvmsg() local 370 if ((hook = ng_findhook(node, hp->thisHook)) == NULL) in ng_tag_rcvmsg() 374 if ((error = ng_tag_setdata_in(hook, hp)) != 0) in ng_tag_rcvmsg() 383 hook_p hook; in ng_tag_rcvmsg() local [all …]
|
| HD | ng_cisco.c | 92 hook_p hook; /* the hook for this proto */ member 123 static void cisco_keepalive(node_p node, hook_p hook, void *arg1, int arg2); 210 cisco_newhook(node_p node, hook_p hook, const char *name) in cisco_newhook() argument 215 sc->downstream.hook = hook; in cisco_newhook() 216 NG_HOOK_SET_PRIVATE(hook, &sc->downstream); in cisco_newhook() 222 sc->inet.hook = hook; in cisco_newhook() 223 NG_HOOK_SET_PRIVATE(hook, &sc->inet); in cisco_newhook() 225 sc->inet6.hook = hook; in cisco_newhook() 226 NG_HOOK_SET_PRIVATE(hook, &sc->inet6); in cisco_newhook() 228 sc->atalk.hook = hook; in cisco_newhook() [all …]
|
| HD | ng_bpf.c | 88 hook_p hook; member 111 static int ng_bpf_setprog(hook_p hook, const struct ng_bpf_hookprog *hp); 244 ng_bpf_addrefs(hook_p hook, void* arg) in ng_bpf_addrefs() argument 246 hinfo_p hip = NG_HOOK_PRIVATE(hook); in ng_bpf_addrefs() 257 ng_bpf_remrefs(hook_p hook, void* arg) in ng_bpf_remrefs() argument 259 hinfo_p hip = NG_HOOK_PRIVATE(hook); in ng_bpf_remrefs() 273 ng_bpf_newhook(node_p node, hook_p hook, const char *name) in ng_bpf_newhook() argument 283 hip->hook = hook; in ng_bpf_newhook() 284 NG_HOOK_SET_PRIVATE(hook, hip); in ng_bpf_newhook() 287 NG_NODE_FOREACH_HOOK(node, ng_bpf_addrefs, hook, tmp); in ng_bpf_newhook() [all …]
|
| HD | ng_frame_relay.c | 74 hook_p hook; /* if there's a hook assigned.. */ member 234 ngfrm_newhook(node_p node, hook_p hook, const char *name) in ngfrm_newhook() argument 244 NG_HOOK_SET_PRIVATE(hook, NULL); /* paranoid */ in ngfrm_newhook() 261 if (sc->downstream.hook) in ngfrm_newhook() 265 NG_HOOK_SET_PRIVATE(hook, &sc->downstream); in ngfrm_newhook() 266 sc->downstream.hook = hook; in ngfrm_newhook() 295 if (sc->channel[ctxnum].hook != NULL) in ngfrm_newhook() 302 NG_HOOK_SET_PRIVATE(hook, sc->channel + ctxnum); in ngfrm_newhook() 303 sc->channel[ctxnum].hook = hook; in ngfrm_newhook() 329 ngfrm_rcvdata(hook_p hook, item_p item) in ngfrm_rcvdata() argument [all …]
|
| HD | ng_split.c | 102 ng_split_newhook(node_p node, hook_p hook, const char *name) in ng_split_newhook() argument 118 *localhook = hook; in ng_split_newhook() 119 NG_HOOK_SET_PRIVATE(hook, localhook); in ng_split_newhook() 128 ng_split_rcvdata(hook_p hook, item_p item) in ng_split_rcvdata() argument 130 const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); in ng_split_rcvdata() 133 if (hook == priv->out) { in ng_split_rcvdata() 137 } else if ((hook == priv->in) && (priv->mixed != NULL)) { in ng_split_rcvdata() 139 } else if ((hook == priv->mixed) && (priv->out != NULL)) { in ng_split_rcvdata() 165 ng_split_disconnect(hook_p hook) in ng_split_disconnect() argument 167 hook_p *localhook = NG_HOOK_PRIVATE(hook); in ng_split_disconnect() [all …]
|
| HD | ng_ipfw.c | 97 hook_p hook; member 153 ng_ipfw_newhook(node_p node, hook_p hook, const char *name) in ng_ipfw_newhook() argument 179 hpriv->hook = hook; in ng_ipfw_newhook() 182 NG_HOOK_SET_PRIVATE(hook, hpriv); in ng_ipfw_newhook() 192 ng_ipfw_connect(hook_p hook) in ng_ipfw_connect() argument 194 NG_HOOK_FORCE_QUEUE(hook); in ng_ipfw_connect() 215 hook_p hook; in ng_ipfw_findhook1() local 218 LIST_FOREACH(hook, &node->nd_hooks, hk_hooks) { in ng_ipfw_findhook1() 219 hpriv = NG_HOOK_PRIVATE(hook); in ng_ipfw_findhook1() 220 if (NG_HOOK_IS_VALID(hook) && (hpriv->rulenum == rulenum)) in ng_ipfw_findhook1() [all …]
|
| HD | ng_tee.c | 67 hook_p hook; member 166 ng_tee_newhook(node_p node, hook_p hook, const char *name) in ng_tee_newhook() argument 198 hinfo->hook = hook; in ng_tee_newhook() 200 NG_HOOK_SET_PRIVATE(hook, hinfo); in ng_tee_newhook() 260 if (lasthook == sc->left.hook || lasthook == sc->right.hook) { in ng_tee_rcvmsg() 264 NG_FWD_ITEM_HOOK(error, item, hinfo->dest->hook); in ng_tee_rcvmsg() 290 ng_tee_rcvdata(hook_p hook, item_p item) in ng_tee_rcvdata() argument 292 const hi_p hinfo = NG_HOOK_PRIVATE(hook); in ng_tee_rcvdata() 312 NG_SEND_DATA_ONLY(error, h->hook, m2); in ng_tee_rcvdata() 324 NG_FWD_ITEM_HOOK(error, item, h->hook); in ng_tee_rcvdata() [all …]
|
| HD | ng_hole.c | 130 ngh_newhook(node_p node, hook_p hook, const char *name) in ngh_newhook() argument 138 NG_HOOK_SET_PRIVATE(hook, hip); in ngh_newhook() 152 hook_p hook; in ngh_rcvmsg() local 167 hook = ng_findhook(node, (char *)msg->data); in ngh_rcvmsg() 168 if (hook == NULL) { in ngh_rcvmsg() 172 stats = &((hinfo_p)NG_HOOK_PRIVATE(hook))->stats; in ngh_rcvmsg() 205 ngh_rcvdata(hook_p hook, item_p item) in ngh_rcvdata() argument 207 const hinfo_p hip = NG_HOOK_PRIVATE(hook); in ngh_rcvdata() 219 ngh_disconnect(hook_p hook) in ngh_disconnect() argument 222 free(NG_HOOK_PRIVATE(hook), M_NETGRAPH); in ngh_disconnect() [all …]
|
| HD | ng_UI.c | 115 ng_UI_newhook(node_p node, hook_p hook, const char *name) in ng_UI_newhook() argument 122 priv->downlink = hook; in ng_UI_newhook() 126 priv->uplink = hook; in ng_UI_newhook() 168 ng_UI_rcvdata(hook_p hook, item_p item) in ng_UI_rcvdata() argument 170 const node_p node = NG_HOOK_NODE(hook); in ng_UI_rcvdata() 176 if (hook == priv->downlink) { in ng_UI_rcvdata() 190 } else if (hook == priv->uplink) { in ng_UI_rcvdata() 225 ng_UI_disconnect(hook_p hook) in ng_UI_disconnect() argument 227 const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); in ng_UI_disconnect() 229 if (hook == priv->downlink) in ng_UI_disconnect() [all …]
|
| HD | ng_tty.c | 89 hook_p hook; /* Netgraph hook */ member 174 ngt_newhook(node_p node, hook_p hook, const char *name) in ngt_newhook() argument 181 if (sc->hook) in ngt_newhook() 185 sc->hook = hook; in ngt_newhook() 197 ngt_connect(hook_p hook) in ngt_connect() argument 199 NG_HOOK_FORCE_QUEUE(hook); in ngt_connect() 207 ngt_disconnect(hook_p hook) in ngt_disconnect() argument 209 const sc_p sc = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); in ngt_disconnect() 211 if (hook != sc->hook) in ngt_disconnect() 215 sc->hook = NULL; in ngt_disconnect() [all …]
|
| HD | ng_pppoe.c | 239 hook_p hook; member 283 static void pppoe_ticker(node_p node, hook_p hook, void *arg1, int arg2); 450 sp?sp->hook:NULL, (const char *)(tag + 1)); in pppoe_match_svc() 452 return (sp?sp->hook:NULL); in pppoe_match_svc() 474 NG_SEND_DATA_ONLY(error, sp->hook, m); in pppoe_broadcast_padi() 496 return (sp->hook); in pppoe_find_svc() 509 const priv_p privp = NG_NODE_PRIVATE(NG_HOOK_NODE(sp->hook)); in pppoe_getnewsession() 545 const priv_p privp = NG_NODE_PRIVATE(NG_HOOK_NODE(sp->hook)); in pppoe_addsession() 557 const priv_p privp = NG_NODE_PRIVATE(NG_HOOK_NODE(sp->hook)); in pppoe_delsession() 582 CTR3(KTR_NET, "%20s: matched %p for %d", __func__, sp?sp->hook:NULL, in pppoe_findsession() [all …]
|
| HD | ng_one2many.c | 66 hook_p hook; /* netgraph hook */ member 206 ng_one2many_newhook(node_p node, hook_p hook, const char *name) in ng_one2many_newhook() argument 234 if (link->hook != NULL) in ng_one2many_newhook() 238 NG_HOOK_SET_PRIVATE(hook, (void *)(intptr_t)linkNum); in ng_one2many_newhook() 239 link->hook = hook; in ng_one2many_newhook() 412 ng_one2many_rcvdata(hook_p hook, item_p item) in ng_one2many_rcvdata() argument 414 const node_p node = NG_HOOK_NODE(hook); in ng_one2many_rcvdata() 425 linkNum = (intptr_t)NG_HOOK_PRIVATE(hook); in ng_one2many_rcvdata() 433 KASSERT(src->hook != NULL, ("%s: no src%d", __func__, linkNum)); in ng_one2many_rcvdata() 472 NG_SEND_DATA_ONLY(error, mdst->hook, m2); in ng_one2many_rcvdata() [all …]
|
| HD | ng_rfc1490.c | 183 ng_rfc1490_newhook(node_p node, hook_p hook, const char *name) in ng_rfc1490_newhook() argument 190 priv->downlink = hook; in ng_rfc1490_newhook() 194 priv->ppp = hook; in ng_rfc1490_newhook() 198 priv->inet = hook; in ng_rfc1490_newhook() 202 priv->ethernet = hook; in ng_rfc1490_newhook() 306 ng_rfc1490_rcvdata(hook_p hook, item_p item) in ng_rfc1490_rcvdata() argument 308 const node_p node = NG_HOOK_NODE(hook); in ng_rfc1490_rcvdata() 314 if (hook == priv->downlink) { in ng_rfc1490_rcvdata() 387 } else if (hook == priv->ppp) { in ng_rfc1490_rcvdata() 394 } else if (hook == priv->inet) { in ng_rfc1490_rcvdata() [all …]
|
| HD | ng_lmi.c | 99 static int nglmi_checkdata(hook_p hook, struct mbuf *m); 145 static void LMI_ticker(node_p node, hook_p hook, void *arg1, int arg2); 146 static void nglmi_startup_fixed(sc_p sc, hook_p hook); 205 nglmi_newhook(node_p node, hook_p hook, const char *name) in nglmi_newhook() argument 210 NG_HOOK_SET_PRIVATE(hook, NULL); in nglmi_newhook() 218 sc->lmi_annexA = hook; in nglmi_newhook() 219 NG_HOOK_SET_PRIVATE(hook, NG_NODE_PRIVATE(node)); in nglmi_newhook() 223 nglmi_startup_fixed(sc, hook); in nglmi_newhook() 225 sc->lmi_annexD = hook; in nglmi_newhook() 226 NG_HOOK_SET_PRIVATE(hook, NG_NODE_PRIVATE(node)); in nglmi_newhook() [all …]
|
| HD | ng_atmllc.c | 117 ng_atmllc_newhook(node_p node, hook_p hook, const char *name) in ng_atmllc_newhook() argument 127 priv->atm = hook; in ng_atmllc_newhook() 132 priv->ether = hook; in ng_atmllc_newhook() 137 priv->fddi = hook; in ng_atmllc_newhook() 146 ng_atmllc_rcvdata(hook_p hook, item_p item) in ng_atmllc_rcvdata() argument 155 priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); in ng_atmllc_rcvdata() 160 if (hook == priv->atm) { in ng_atmllc_rcvdata() 203 } else if (hook == priv->ether) { in ng_atmllc_rcvdata() 220 } else if (hook == priv->fddi) { in ng_atmllc_rcvdata() 250 ng_atmllc_disconnect(hook_p hook) in ng_atmllc_disconnect() argument [all …]
|
| HD | ng_gif_demux.c | 134 static iffam_p get_iffam_from_hook(priv_p priv, hook_p hook); 186 get_iffam_from_hook(priv_p priv, hook_p hook) in get_iffam_from_hook() argument 191 if (priv->hooks[k] == hook) in get_iffam_from_hook() 249 ng_gif_demux_newhook(node_p node, hook_p hook, const char *name) in ng_gif_demux_newhook() argument 265 *hookptr = hook; in ng_gif_demux_newhook() 304 ng_gif_demux_rcvdata(hook_p hook, item_p item) in ng_gif_demux_rcvdata() argument 306 const node_p node = NG_HOOK_NODE(hook); in ng_gif_demux_rcvdata() 316 if (hook == priv->gif) { in ng_gif_demux_rcvdata() 343 iffam = get_iffam_from_hook(priv, hook); in ng_gif_demux_rcvdata() 381 ng_gif_demux_disconnect(hook_p hook) in ng_gif_demux_disconnect() argument [all …]
|
| /NextBSD/contrib/subversion/subversion/libsvn_repos/ |
| HD | hooks.c | 315 check_hook_cmd(const char *hook, svn_boolean_t *broken_link, apr_pool_t *pool) in check_hook_cmd() argument 337 (**extn ? apr_pstrcat(pool, hook, *extn, SVN_VA_NULL) : hook); in check_hook_cmd() 450 hook_symlink_error(const char *hook) in hook_symlink_error() argument 454 _("Failed to run '%s' hook; broken symlink"), hook); in hook_symlink_error() 465 const char *hook = svn_repos_start_commit_hook(repos, pool); in svn_repos__hooks_start_commit() local 468 if ((hook = check_hook_cmd(hook, &broken_link, pool)) && broken_link) in svn_repos__hooks_start_commit() 470 return hook_symlink_error(hook); in svn_repos__hooks_start_commit() 472 else if (hook) in svn_repos__hooks_start_commit() 490 args[0] = hook; in svn_repos__hooks_start_commit() 497 SVN_ERR(run_hook_cmd(NULL, SVN_REPOS__HOOK_START_COMMIT, hook, args, in svn_repos__hooks_start_commit() [all …]
|
| /NextBSD/sys/netgraph/bluetooth/socket/ |
| HD | ng_btsocket_l2cap_raw.c | 231 ng_btsocket_l2cap_raw_node_newhook(node_p node, hook_p hook, char const *name) in ng_btsocket_l2cap_raw_node_newhook() argument 241 ng_btsocket_l2cap_raw_node_connect(hook_p hook) in ng_btsocket_l2cap_raw_node_connect() argument 243 NG_HOOK_SET_PRIVATE(hook, NULL); in ng_btsocket_l2cap_raw_node_connect() 244 NG_HOOK_REF(hook); /* Keep extra reference to the hook */ in ng_btsocket_l2cap_raw_node_connect() 254 ng_btsocket_l2cap_raw_node_disconnect(hook_p hook) in ng_btsocket_l2cap_raw_node_disconnect() argument 264 if (NG_HOOK_PRIVATE(hook) != NULL) in ng_btsocket_l2cap_raw_node_disconnect() 267 NG_HOOK_UNREF(hook); /* Remove extra reference */ in ng_btsocket_l2cap_raw_node_disconnect() 277 ng_btsocket_l2cap_raw_node_rcvmsg(node_p node, item_p item, hook_p hook) in ng_btsocket_l2cap_raw_node_rcvmsg() argument 307 if (hook != NULL) { in ng_btsocket_l2cap_raw_node_rcvmsg() 308 NG_HOOK_REF(hook); in ng_btsocket_l2cap_raw_node_rcvmsg() [all …]
|
| HD | ng_btsocket_sco.c | 258 ng_btsocket_sco_node_newhook(node_p node, hook_p hook, char const *name) in ng_btsocket_sco_node_newhook() argument 268 ng_btsocket_sco_node_connect(hook_p hook) in ng_btsocket_sco_node_connect() argument 270 NG_HOOK_SET_PRIVATE(hook, NULL); in ng_btsocket_sco_node_connect() 271 NG_HOOK_REF(hook); /* Keep extra reference to the hook */ in ng_btsocket_sco_node_connect() 274 NG_HOOK_FORCE_QUEUE(NG_HOOK_PEER(hook)); in ng_btsocket_sco_node_connect() 275 NG_HOOK_FORCE_QUEUE(hook); in ng_btsocket_sco_node_connect() 286 ng_btsocket_sco_node_disconnect(hook_p hook) in ng_btsocket_sco_node_disconnect() argument 296 if (NG_HOOK_PRIVATE(hook) != NULL) in ng_btsocket_sco_node_disconnect() 299 NG_HOOK_UNREF(hook); /* Remove extra reference */ in ng_btsocket_sco_node_disconnect() 309 ng_btsocket_sco_node_rcvmsg(node_p node, item_p item, hook_p hook) in ng_btsocket_sco_node_rcvmsg() argument [all …]
|
| /NextBSD/sys/netgraph/netflow/ |
| HD | ng_netflow.c | 277 ng_netflow_newhook(node_p node, hook_p hook, const char *name) in ng_netflow_newhook() argument 297 if (priv->ifaces[ifnum].hook != NULL) in ng_netflow_newhook() 303 NG_HOOK_SET_PRIVATE(hook, iface); in ng_netflow_newhook() 304 iface->hook = hook; in ng_netflow_newhook() 335 NG_HOOK_SET_PRIVATE(hook, iface); in ng_netflow_newhook() 336 iface->out = hook; in ng_netflow_newhook() 347 priv->export = hook; in ng_netflow_newhook() 357 priv->export9 = hook; in ng_netflow_newhook() 407 if (priv->ifaces[*index].hook == NULL) in ng_netflow_rcvmsg() 433 if (iface->hook == NULL) in ng_netflow_rcvmsg() [all …]
|