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

Function get_vif_cnt

freebsd/netinet/ip_mroute.c:586–604  ·  view source on GitHub ↗

* returns the input and output packet and byte counts on the vif provided */

Source from the content-addressed store, hash-verified

584 * returns the input and output packet and byte counts on the vif provided
585 */
586static int
587get_vif_cnt(struct sioc_vif_req *req)
588{
589 vifi_t vifi = req->vifi;
590
591 VIF_LOCK();
592 if (vifi >= V_numvifs) {
593 VIF_UNLOCK();
594 return EINVAL;
595 }
596
597 req->icount = V_viftable[vifi].v_pkt_in;
598 req->ocount = V_viftable[vifi].v_pkt_out;
599 req->ibytes = V_viftable[vifi].v_bytes_in;
600 req->obytes = V_viftable[vifi].v_bytes_out;
601 VIF_UNLOCK();
602
603 return 0;
604}
605
606static void
607if_detached_event(void *arg __unused, struct ifnet *ifp)

Callers 1

X_mrt_ioctlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected