Top Inners Fields Methods
com.sun.jna.platform.mac

public Interface SystemB

extends LibCAPI, Library
Imports
com.sun.jna.Library, .Native, .NativeLong, .Pointer, .Structure, com.sun.jna.platform.unix.LibCAPI, com.sun.jna.ptr.IntByReference, .LongByReference, .PointerByReference

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
SystemB.Group

Return type for getgrgid

public static class
public static class
public static class
SystemB.IFdata

Data type as part of IFmsgHdr

public static class
SystemB.IFdata64

Data type as part of IFmsgHdr

public static class
SystemB.IFmsgHdr

Return type for sysctl CTL_NET,PF_ROUTE

public static class
SystemB.IFmsgHdr2

Return type for sysctl CTL_NET,PF_ROUTE

public static class
SystemB.Passwd

Return type for getpwuid

public static class
public static class
public static class
public static class
public static class
SystemB.Statfs

The statfs() routine returns information about a mounted file system.

public static class
SystemB.Timeval

Time value

public static class
public static class
public static class
public static class
public static class
public static class
public static class
SystemB.XswUsage

Return type for sysctl vm.swapusage

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final SystemB
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
Inherited from com.sun.jna.Library:
OPTION_ALLOW_OBJECTSOPTION_CALLING_CONVENTIONOPTION_CLASSLOADEROPTION_FUNCTION_MAPPEROPTION_INVOCATION_MAPPEROPTION_OPEN_FLAGSOPTION_STRING_ENCODINGOPTION_STRUCTURE_ALIGNMENTOPTION_SYMBOL_PROVIDEROPTION_TYPE_MAPPER
Inherited from com.sun.jna.platform.unix.LibCAPI:
HOST_NAME_MAX

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

Upon successful completion, the number of statfs structures is returned. Otherwise, -1 is returned and the global variable errno is set to indicate the error.
getfsstat64
(SystemB.Statfs[]
Array of statfs structures that will be filled with results. If buf is given as NULL, getfsstat() returns just the number of mounted file systems.
buf
,
int
Size of the buffer to fill
bufsize
,
int
If flags is set to MNT_NOWAIT, getfsstat() will directly return the information retained in the kernel to avoid delays caused by waiting for updated information from a file system that is perhaps temporarily unable to respond. Some of the information returned may be out of date, however; if flags is set to MNT_WAIT or MNT_DWAIT instead, getfsstat() will request updated information from each mounted filesystem before returning.
flags
)

The getfsstat() function returns information about all mounted file systems.

public SystemB.Group

Returns:

a Group structure matching that group
getgrgid
(int
The group ID
gid
)

This function searches the group database for the given group name pointed to by the group id given by gid, returning the first one encountered.

public int

Returns:

the process ID of the calling process.
getpid
()

Returns the process ID of the calling process.

public SystemB.Passwd

Returns:

a Passwd structure matching that user
getpwuid
(int
The user ID
uid
)

This function searches the password database for the given user uid, always returning the first one encountered.

public int

Returns:

A 0 return value indicates that the call succeeded. A -1 return value indicates an error occurred, and in this case an error code is stored into the global variable errno.
gettimeofday
(SystemB.Timeval
Timeval structure
tp
,
SystemB.Timezone
Timezone structure
tzp
)

The system's notion of the current Greenwich time and the current time zone is obtained with the gettimeofday() call, and set with the settimeofday() call.

public int

Returns:

0 on success; sets errno on failure
host_page_size
(int
The name (or control) port for the host for which the page size is desired.
hostPort
,
LongByReference
The host's page size (in bytes), set on success.
pPageSize
)

The host_page_size function returns the page size for the given host.

public int

Returns:

0 on success; sets errno on failure
host_processor_info
(int
The control port for the host for which information is to be obtained.
hostPort
,
int
The type of information requested.
flavor
,
IntByReference
Pointer to the number of processors
procCount
,
PointerByReference
Pointer to the structure corresponding to the requested flavor
procInfo
,
IntByReference
Pointer to number of elements in the returned structure
procInfoCount
)

The host_processor_info function returns information about processors.

public int

Returns:

0 on success; sets errno on failure
host_statistics
(int
The control port for the host for which information is to be obtained.
hostPort
,
int
The type of statistics desired (HOST_LOAD_INFO, HOST_VM_INFO, or HOST_CPU_LOAD_INFO)
hostStat
,
Structure
Statistics about the specified host.
stats
,
IntByReference
On input, the maximum size of the buffer; on output, the size returned (in natural-sized units).
count
)

The host_statistics function returns scheduling and virtual memory statistics concerning the host as specified by hostStat.

public int

Returns:

0 on success; sets errno on failure
host_statistics64
(int
The control port for the host for which information is to be obtained.
hostPort
,
int
The type of statistics desired (HOST_VM_INFO64)
hostStat
,
Structure
Statistics about the specified host.
stats
,
IntByReference
On input, the maximum size of the buffer; on output, the size returned (in natural-sized units).
count
)

The host_statistics64 function returns 64-bit virtual memory statistics concerning the host as specified by hostStat.

public int

Returns:

the host's name port
mach_host_self
()

The mach_host_self system call returns the calling thread's host name port.

public int

Returns:

0 if successful, a kern_return_t code otherwise.
mach_port_deallocate
(int
The port holding the right.
port
,
int
The port's name for the right.
name
)

Decrement the target port right's user reference count.

public int

Returns:

the task's kernel port
mach_task_self
()

The mach_task_self system call returns the calling thread's task_self port.

public int

Returns:

the number of bytes of data returned in the provided buffer; -1 if an error was encountered;
proc_listpids
(int
types of processes to be searched
type
,
int
adjunct information for type
typeinfo
,
int[]
a C array of int-sized values to be filled with process identifiers that hold an open file reference matching the specified path or volume. Pass NULL to obtain the minimum buffer size needed to hold the currently active processes.
buffer
,
int
the size (in bytes) of the provided buffer.
buffersize
)

Search through the current processes

public int

Returns:

0 on success; or -1 on failure, with errno set to indicate the specific error.
proc_pid_rusage
(int
the process identifier
pid
,
int
the type of information requested
flavor
,
SystemB.RUsageInfoV2
holds results
buffer
)

Return resource usage information for the given pid, which can be a live process or a zombie.

public int

Returns:

the number of bytes of data returned in the provided buffer; -1 if an error was encountered;
proc_pidinfo
(int
the process identifier
pid
,
int
the type of information requested
flavor
,
long
argument possibly needed for some flavors
arg
,
Structure
holds results
buffer
,
int
size of results
buffersize
)

Return in buffer a proc_*info structure corresponding to the flavor for the specified process

public int

Returns:

the length of the name returned in buffer if successful; 0 otherwise
proc_pidpath
(int
the process identifier
pid
,
Pointer
holds results
buffer
,
int
size of results
buffersize
)

Return in buffer the name of the specified process

public int

Returns:

0 on success; sets errno on failure
sysctl
(int[]
a Management Information Base (MIB) array of integers
name
,
int
the length of the array in name
namelen
,
Pointer
A buffer to hold the information retrieved
oldp
,
LibCAPI.size_t.ByReference
Size of the buffer, a pointer to a com.sun.jna.platform.unix.LibCAPI.size_t value
oldlenp
,
Pointer
To set a new value, a buffer of information to be written. May be null if no value is to be set.
newp
,
LibCAPI.size_t
Size of the information to be written. May be 0 if no value is to be set.
newlen
)

The sysctl() function retrieves system information and allows processes with appropriate privileges to set system information.

public int
public int

Returns:

0 on success; sets errno on failure
sysctlbyname
(String
ASCII representation of the MIB name
name
,
Pointer
A buffer to hold the information retrieved
oldp
,
LibCAPI.size_t.ByReference
Size of the buffer, a pointer to a com.sun.jna.platform.unix.LibCAPI.size_t value
oldlenp
,
Pointer
To set a new value, a buffer of information to be written. May be null if no value is to be set.
newp
,
LibCAPI.size_t
Size of the information to be written. May be 0 if no value is to be set.
newlen
)

The sysctlbyname() function accepts an ASCII representation of the name and internally looks up the integer name vector.

public int
public int

Returns:

0 on success; sets errno on failure
sysctlnametomib
(String
ASCII representation of the name
name
,
Pointer
Integer array containing the corresponding name vector.
mibp
,
LibCAPI.size_t.ByReference
On input, number of elements in the returned array; on output, the number of entries copied.
sizep
)

This function accepts an ASCII representation of the name, looks up the integer name vector, and returns the numeric representation in the mib array pointed to by mibp.

public int
Inherited from com.sun.jna.platform.unix.LibCAPI:
closegetdomainnamegetegidgetenvgeteuidgetgidgethostnamegetloadavggetuidmsyncmunmapsetdomainnamesetegidsetenvseteuidsetgidsethostnamesetuidunsetenv