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

Function get_sg_cnt

freebsd/netinet/ip_mroute.c:564–581  ·  view source on GitHub ↗

* returns the packet, byte, rpf-failure count for the source group provided */

Source from the content-addressed store, hash-verified

562 * returns the packet, byte, rpf-failure count for the source group provided
563 */
564static int
565get_sg_cnt(struct sioc_sg_req *req)
566{
567 struct mfc *rt;
568
569 MFC_LOCK();
570 rt = mfc_find(&req->src, &req->grp);
571 if (rt == NULL) {
572 MFC_UNLOCK();
573 req->pktcnt = req->bytecnt = req->wrong_if = 0xffffffff;
574 return EADDRNOTAVAIL;
575 }
576 req->pktcnt = rt->mfc_pkt_cnt;
577 req->bytecnt = rt->mfc_byte_cnt;
578 req->wrong_if = rt->mfc_wrong_if;
579 MFC_UNLOCK();
580 return 0;
581}
582
583/*
584 * returns the input and output packet and byte counts on the vif provided

Callers 1

X_mrt_ioctlFunction · 0.70

Calls 1

mfc_findFunction · 0.85

Tested by

no test coverage detected