| 888 | } |
| 889 | |
| 890 | int |
| 891 | nhops_dump_sysctl(struct rib_head *rh, struct sysctl_req *w) |
| 892 | { |
| 893 | struct nh_control *ctl; |
| 894 | struct nhop_priv *nh_priv; |
| 895 | int error; |
| 896 | |
| 897 | ctl = rh->nh_control; |
| 898 | |
| 899 | NHOPS_RLOCK(ctl); |
| 900 | DPRINTF("NHDUMP: count=%u", ctl->nh_head.items_count); |
| 901 | CHT_SLIST_FOREACH(&ctl->nh_head, nhops, nh_priv) { |
| 902 | error = dump_nhop_entry(rh, nh_priv->nh, w); |
| 903 | if (error != 0) { |
| 904 | NHOPS_RUNLOCK(ctl); |
| 905 | return (error); |
| 906 | } |
| 907 | } CHT_SLIST_FOREACH_END; |
| 908 | NHOPS_RUNLOCK(ctl); |
| 909 | |
| 910 | return (0); |
| 911 | } |
no test coverage detected