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

Function syncache_lookup

freebsd/netinet/tcp_syncache.c:583–599  ·  view source on GitHub ↗

* Find an entry in the syncache. * Returns always with locked syncache_head plus a matching entry or NULL. */

Source from the content-addressed store, hash-verified

581 * Returns always with locked syncache_head plus a matching entry or NULL.
582 */
583static struct syncache *
584syncache_lookup(struct in_conninfo *inc, struct syncache_head **schp)
585{
586 struct syncache *sc;
587 struct syncache_head *sch;
588
589 *schp = sch = syncache_hashbucket(inc);
590 SCH_LOCK(sch);
591
592 /* Circle through bucket row to find matching entry. */
593 TAILQ_FOREACH(sc, &sch->sch_bucket, sc_hash)
594 if (bcmp(&inc->inc_ie, &sc->sc_inc.inc_ie,
595 sizeof(struct in_endpoints)) == 0)
596 break;
597
598 return (sc); /* Always returns with locked sch. */
599}
600
601/*
602 * This function is called when we get a RST for a

Callers 5

syncache_chkrstFunction · 0.85
syncache_badackFunction · 0.85
syncache_unreachFunction · 0.85
syncache_expandFunction · 0.85
syncache_addFunction · 0.85

Calls 1

syncache_hashbucketFunction · 0.85

Tested by

no test coverage detected