* returns the packet, byte, rpf-failure count for the source group provided */
| 562 | * returns the packet, byte, rpf-failure count for the source group provided |
| 563 | */ |
| 564 | static int |
| 565 | get_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 |
no test coverage detected