MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ng_pptpgre_rcvdata

Function ng_pptpgre_rcvdata

freebsd/netgraph/ng_pptpgre.c:504–523  ·  view source on GitHub ↗

* Receive incoming data on a hook. */

Source from the content-addressed store, hash-verified

502 * Receive incoming data on a hook.
503 */
504static int
505ng_pptpgre_rcvdata(hook_p hook, item_p item)
506{
507 const hpriv_p hpriv = NG_HOOK_PRIVATE(hook);
508 int rval;
509
510 /* If not configured, reject */
511 if (!hpriv->conf.enabled) {
512 NG_FREE_ITEM(item);
513 return (ENXIO);
514 }
515
516 mtx_lock(&hpriv->mtx);
517
518 rval = ng_pptpgre_xmit(hpriv, item);
519
520 mtx_assert(&hpriv->mtx, MA_NOTOWNED);
521
522 return (rval);
523}
524
525/*
526 * Hook disconnection

Callers

nothing calls this directly

Calls 3

ng_pptpgre_xmitFunction · 0.85
mtx_assertFunction · 0.85
mtx_lockFunction · 0.50

Tested by

no test coverage detected