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

Function ng_pptpgre_find_session

freebsd/netgraph/ng_pptpgre.c:1217–1229  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1215 * Find the hook with a given session ID.
1216 */
1217static hpriv_p
1218ng_pptpgre_find_session(priv_p privp, u_int16_t cid)
1219{
1220 uint16_t hash = SESSHASH(cid);
1221 hpriv_p hpriv = NULL;
1222
1223 LIST_FOREACH(hpriv, &privp->sesshash[hash], sessions) {
1224 if (hpriv->conf.cid == cid)
1225 break;
1226 }
1227
1228 return (hpriv);
1229}
1230
1231/*
1232 * Reset state (must be called with lock held or from writer)

Callers 2

ng_pptpgre_rcvmsgFunction · 0.85
ng_pptpgre_rcvdata_lowerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected