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

Function nhops_dump_sysctl

freebsd/net/route/nhop_ctl.c:890–911  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

888}
889
890int
891nhops_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}

Callers 1

sysctl_rtsockFunction · 0.85

Calls 1

dump_nhop_entryFunction · 0.85

Tested by

no test coverage detected