• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/netgraph/

Lines Matching refs:host

45  * seconds when a host is seen to have jumped from one link to
48 * We keep a hashtable that maps Ethernet addresses to host info,
50 * tell us on which link the host may be found. A host's entry will
136 /* Information about a host, stored in a hash table entry */
141 u_int16_t staleness; /* seconds ago host last heard from */
517 const char *name = NG_HOOK_NAME(hent->host.link->hook);
523 hent->host.addr,
525 ary->hosts[i].age = hent->host.age;
527 hent->host.staleness;
644 struct ng_bridge_host *host;
656 SLIST_FOREACH(host, &priv->tab[bucket], next) {
658 host->addr,
660 ary->hosts[i].age = host->age;
661 ary->hosts[i].staleness = host->staleness;
663 NG_HOOK_NAME(host->link->hook),
811 struct ng_bridge_host *host;
859 if ((host = ng_bridge_get(priv, eh->ether_shost)) != NULL)
860 /* Update time since last heard from this host.
864 if (__predict_false(host->staleness > 0))
865 host->staleness = 0;
867 if ((host == NULL && ctx.incoming->learnMac) ||
868 (host != NULL && host->link != ctx.incoming)) {
891 if (host != NULL && host->link != ctx.incoming) {
892 if (host->age < priv->conf.minStableAge) {
909 * If unicast and destination host known, deliver to host's link,
914 if ((host = ng_bridge_get(priv, eh->ether_dhost)) != NULL) {
915 link_p destLink = host->link;
928 /* Destination host is not known */
1024 * Find a host entry in the table.
1030 struct ng_bridge_host *host;
1032 SLIST_FOREACH(host, &priv->tab[bucket], next) {
1033 if (ETHER_EQUAL(host->addr, addr))
1034 return (host);
1040 * Add a host entry to the table. If it already exists, move it
1047 struct ng_bridge_host *host;
1049 if ((host = ng_bridge_get(priv, addr)) != NULL) {
1051 if (host->link == link)
1054 /* Move old host over to new link */
1055 if (host->age >= priv->conf.minStableAge) {
1056 host->link = link;
1057 host->age = 0;
1061 * If the host was recently moved to the old link and
1081 host = malloc(sizeof(*host), M_NETGRAPH_BRIDGE, M_NOWAIT);
1082 if (host == NULL)
1084 bcopy(addr, host->addr, ETHER_ADDR_LEN);
1085 host->link = link;
1086 host->staleness = 0;
1087 host->age = 0;
1090 SLIST_INSERT_HEAD(&priv->tab[bucket], host, next);
1135 struct ng_bridge_host *const host
1139 newBucket = HASH(host->addr, newMask);
1140 SLIST_INSERT_HEAD(&newTab[newBucket], host, next);
1174 struct ng_bridge_host *const host = *hptr;
1176 if (link == NULL || host->link == link) {
1177 *hptr = SLIST_NEXT(host, next);
1178 free(host, M_NETGRAPH_BRIDGE);
1181 hptr = &SLIST_NEXT(host, next);
1220 /* Update host time counters and remove stale entries */
1225 struct ng_bridge_host *const host = *hptr;
1228 if (++host->staleness >= priv->conf.maxStaleness) {
1229 *hptr = SLIST_NEXT(host, next);
1230 free(host, M_NETGRAPH_BRIDGE);
1233 if (host->age < 0xffff)
1234 host->age++;
1235 hptr = &SLIST_NEXT(host, next);