Lines Matching refs:hip

246 	hinfo_p hip = NG_HOOK_PRIVATE(hook);
249 if (strcmp(hip->prog->ifMatch, NG_HOOK_NAME(h)) == 0)
250 hip->match = h;
251 if (strcmp(hip->prog->ifNotMatch, NG_HOOK_NAME(h)) == 0)
252 hip->nomatch = h;
259 hinfo_p hip = NG_HOOK_PRIVATE(hook);
262 if (hip->match == h)
263 hip->match = NULL;
264 if (hip->nomatch == h)
265 hip->nomatch = NULL;
275 hinfo_p hip;
280 hip = malloc(sizeof(*hip), M_NETGRAPH_BPF, M_NOWAIT | M_ZERO);
281 if (hip == NULL)
283 hip->hook = hook;
284 NG_HOOK_SET_PRIVATE(hook, hip);
291 free(hip, M_NETGRAPH_BPF);
297 strlcpy(hip->prog->thisHook, name, sizeof(hip->prog->thisHook));
417 const hinfo_p hip = NG_HOOK_PRIVATE(hook);
429 /* atomic_add_int64(&hip->stats.recvFrames, 1); */
430 /* atomic_add_int64(&hip->stats.recvOctets, totlen); */
431 hip->stats.recvFrames++;
432 hip->stats.recvOctets += totlen;
441 if (bpf_jitter_enable != 0 && hip->jit_prog != NULL)
470 len = (*(hip->jit_prog->func))(data, totlen, totlen);
474 len = bpf_filter(hip->prog->bpf_prog, data, totlen, totlen);
476 len = bpf_filter(hip->prog->bpf_prog, (u_char *)m, totlen, 0);
485 hip->stats.recvMatchFrames++;
486 hip->stats.recvMatchOctets += totlen;
494 dest = hip->match;
496 dest = hip->nomatch;
527 const hinfo_p hip = NG_HOOK_PRIVATE(hook);
530 KASSERT(hip != NULL, ("%s: null info", __func__));
535 free(hip->prog, M_NETGRAPH_BPF);
537 if (hip->jit_prog != NULL)
538 bpf_destroy_jit_filter(hip->jit_prog);
540 free(hip, M_NETGRAPH_BPF);
558 const hinfo_p hip = NG_HOOK_PRIVATE(hook);
581 if (hip->prog != NULL)
582 free(hip->prog, M_NETGRAPH_BPF);
583 hip->prog = hp;
585 if (hip->jit_prog != NULL)
586 bpf_destroy_jit_filter(hip->jit_prog);
587 hip->jit_prog = jit_prog;
591 hip->match = ng_findhook(NG_HOOK_NODE(hook), hip->prog->ifMatch);
592 hip->nomatch = ng_findhook(NG_HOOK_NODE(hook), hip->prog->ifNotMatch);