MCPcopy Index your code
hub / github.com/F-Stack/f-stack / sysctlbyname

Function sysctlbyname

tools/compat/sysctlbyname.c:19–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17#include <sys/sysctl.h>
18
19int
20sysctlbyname(const char *name, void *oldp, size_t *oldlenp,
21 const void *newp, size_t newlen)
22{
23 int real_oid[CTL_MAXNAME+2];
24 size_t oidlen;
25
26 oidlen = sizeof(real_oid) / sizeof(int);
27 if (sysctlnametomib(name, real_oid, &oidlen) < 0)
28 return (-1);
29 return (sysctl(real_oid, oidlen, oldp, oldlenp, newp, newlen));
30}

Callers 15

feature_presentFunction · 0.85
kinfo_getvmobjectFunction · 0.85
nhgrp_printFunction · 0.85
mroute6prFunction · 0.85
nhops_printFunction · 0.85
netisr_load_sysctl_uintFunction · 0.85
netisr_load_sysctl_protoFunction · 0.85
netisr_load_sysctl_workFunction · 0.85
routeprFunction · 0.85
mrouteprFunction · 0.85

Calls 2

sysctlnametomibFunction · 0.85
sysctlFunction · 0.85

Tested by

no test coverage detected