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

Function ShowAliasStats

freebsd/netinet/libalias/alias_db.c:473–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

471#endif
472
473static void
474ShowAliasStats(struct libalias *la)
475{
476
477 LIBALIAS_LOCK_ASSERT(la);
478/* Used for debugging */
479 if (la->logDesc) {
480 int tot = la->icmpLinkCount + la->udpLinkCount +
481 (la->sctpLinkCount>>1) + /* sctp counts half associations */
482 la->tcpLinkCount + la->pptpLinkCount +
483 la->protoLinkCount + la->fragmentIdLinkCount +
484 la->fragmentPtrLinkCount;
485
486 AliasLog(la->logDesc,
487 "icmp=%u, udp=%u, tcp=%u, sctp=%u, pptp=%u, proto=%u, frag_id=%u frag_ptr=%u / tot=%u",
488 la->icmpLinkCount,
489 la->udpLinkCount,
490 la->tcpLinkCount,
491 la->sctpLinkCount>>1, /* sctp counts half associations */
492 la->pptpLinkCount,
493 la->protoLinkCount,
494 la->fragmentIdLinkCount,
495 la->fragmentPtrLinkCount, tot);
496#ifndef _KERNEL
497 AliasLog(la->logDesc, " (sock=%u)\n", la->sockCount);
498#endif
499 }
500}
501
502void SctpShowAliasStats(struct libalias *la)
503{

Callers 3

SctpShowAliasStatsFunction · 0.85
DeleteLinkFunction · 0.85
AddLinkFunction · 0.85

Calls 1

AliasLogFunction · 0.85

Tested by

no test coverage detected