Lines Matching defs:link

48  * algorithm is included which disables a link for priv->conf.loopTimeout
49 * seconds when a host is seen to have jumped from one link to
54 * tell us on which link the host may be found. A host's entry will
94 /* Per-link private data */
98 struct ng_bridge_link_stats stats; /* link stats */
145 /* Store each hook's link number in the private field */
354 /* Check for a link hook */
449 struct ng_bridge_link *link;
452 /* Get link number */
462 if ((link = priv->links[linkNum]) == NULL) {
470 sizeof(link->stats), M_NOWAIT);
475 bcopy(&link->stats,
476 resp->data, sizeof(link->stats));
479 bzero(&link->stats, sizeof(link->stats));
532 struct ng_bridge_link *link;
540 /* Get link number */
544 link = priv->links[linkNum];
545 KASSERT(link != NULL, ("%s: link%d null", __func__, linkNum));
549 link->stats.recvRunts++;
555 link->stats.memoryFailures++;
561 link->stats.recvInvalid++;
567 /* Is link disabled due to a loopback condition? */
568 if (link->loopCount != 0) {
569 link->stats.loopDrops++;
576 link->stats.recvPackets++;
577 link->stats.recvOctets += m->m_pkthdr.len;
580 link->stats.recvBroadcasts++;
583 link->stats.recvMulticasts++;
592 /* Did host jump to a different link? */
596 * If the host's old link was recently established
597 * on the old link and it's already jumped to a new
598 * link, declare a loopback condition.
618 /* Mark link as linka non grata */
619 link->loopCount = priv->conf.loopTimeout;
620 link->stats.loopDetects++;
622 /* Forget all hosts on this link */
626 link->stats.loopDrops++;
632 /* Move host over to new link */
638 link->stats.memoryFailures++;
653 * If unicast and destination host known, deliver to host's link,
654 * unless it is the same link as the packet came in on.
658 /* Determine packet destination link */
663 /* If destination same as incoming link, do nothing */
665 ("%s: link%d null", __func__, host->linkNum));
666 if (destLink == link) {
672 /* Deliver packet out the destination link */
680 link->stats.recvUnknown++;
691 * send the original on its reserved link
694 /* If we never saw a good link, leave. */
705 /* Skip incoming link and disconnected links */
706 if (destLink == NULL || destLink == link) {
711 * This is the first usable link we have found.
720 * It's usable link but not the reserved (first) one.
725 link->stats.memoryFailures++;
750 * on the first link we found.
796 /* Get link number */
801 /* Remove all hosts associated with this link */
804 /* Free associated link information */
805 KASSERT(priv->links[linkNum] != NULL, ("%s: no link", __func__));
947 * Remove all hosts associated with a specific link from the hashtable.
973 * we decrement link->loopCount for those links being muted due to
992 /* Make sure host's link really exists */
994 ("%s: host %6D on nonexistent link %d\n",
1019 struct ng_bridge_link *const link = priv->links[linkNum];
1021 if (link != NULL) {
1022 if (link->loopCount != 0) {
1023 link->loopCount--;
1024 if (link->loopCount == 0
1027 " restoring looped back link%d\n",