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

Function ng_l2tp_find_session

freebsd/netgraph/ng_l2tp.c:706–718  ·  view source on GitHub ↗

* Find the hook with a given session ID. */

Source from the content-addressed store, hash-verified

704 * Find the hook with a given session ID.
705 */
706static hookpriv_p
707ng_l2tp_find_session(priv_p privp, u_int16_t sid)
708{
709 uint16_t hash = SESSHASH(sid);
710 hookpriv_p hpriv = NULL;
711
712 LIST_FOREACH(hpriv, &privp->sesshash[hash], sessions) {
713 if (hpriv->conf.session_id == sid)
714 break;
715 }
716
717 return (hpriv);
718}
719
720/*
721 * Reset a hook's session state.

Callers 2

ng_l2tp_rcvmsgFunction · 0.85
ng_l2tp_rcvdata_lowerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected