Package oshi.util.platform.unix.freebsd
Class BsdSysctlUtil
java.lang.Object
oshi.util.platform.unix.freebsd.BsdSysctlUtil
Provides access to sysctl calls on FreeBSD
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.sun.jna.Memory
Executes a sysctl call with a Pointer resultstatic int
Executes a sysctl call with an int resultstatic long
Executes a sysctl call with a long resultstatic boolean
Executes a sysctl call with a Structure resultstatic String
Executes a sysctl call with a String result
-
Method Details
-
sysctl
Executes a sysctl call with an int result- Parameters:
name
- name of the sysctldef
- default int value- Returns:
- The int result of the call if successful; the default otherwise
-
sysctl
Executes a sysctl call with a long result- Parameters:
name
- name of the sysctldef
- default long value- Returns:
- The long result of the call if successful; the default otherwise
-
sysctl
Executes a sysctl call with a String result- Parameters:
name
- name of the sysctldef
- default String value- Returns:
- The String result of the call if successful; the default otherwise
-
sysctl
Executes a sysctl call with a Structure result- Parameters:
name
- name of the sysctlstruct
- structure for the result- Returns:
- True if structure is successfuly populated, false otherwise
-
sysctl
Executes a sysctl call with a Pointer result- Parameters:
name
- name of the sysctl- Returns:
- An allocated memory buffer containing the result on success, null otherwise. Its value on failure is undefined.
-