Lines Matching refs:sysctl
31 * Small replacement for netstat. Uses only sysctl(3) to get the info.
36 #include <sys/sysctl.h>
272 if (sysctl(mib, 6, NULL, &rt_len, NULL, 0) == -1) {
273 perror("sysctl size");
282 if (sysctl(mib, 6, rt_buf, &rt_len, NULL, 0) == -1) {
283 perror("sysctl get");
296 if (sysctl(mib, 6, NULL, &if_len, NULL, 0) == -1) {
297 perror("sysctl size");
306 if (sysctl(mib, 6, if_buf, &if_len, NULL, 0) == -1) {
307 perror("sysctl get");
447 if (sysctl(mib, 4, &s, &len, NULL, 0) < 0) {
448 perror("sysctl");
509 if (sysctl(mib, 4, &s, &len, NULL, 0) < 0) {
510 perror("sysctl");
604 if (sysctl(mib, 4, &s, &len, NULL, 0) < 0) {
605 perror("sysctl");
662 if (sysctl(mib, 4, &s, &len, NULL, 0) < 0) {
663 perror("sysctl");
808 warn("sysctl: retrieving cp_time length");
817 warn("sysctl: retrieving clockinfo length");