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

Function ng_bridge_get

freebsd/netgraph/ng_bridge.c:879–890  ·  view source on GitHub ↗

* Find a host entry in the table. */

Source from the content-addressed store, hash-verified

877 * Find a host entry in the table.
878 */
879static struct ng_bridge_host *
880ng_bridge_get(priv_p priv, const u_char *addr)
881{
882 const int bucket = HASH(addr, priv->hashMask);
883 struct ng_bridge_hent *hent;
884
885 SLIST_FOREACH(hent, &priv->tab[bucket], next) {
886 if (ETHER_EQUAL(hent->host.addr, addr))
887 return (&hent->host);
888 }
889 return (NULL);
890}
891
892/*
893 * Add a new host entry to the table. This assumes the host doesn't

Callers 1

ng_bridge_rcvdataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected