LibC (JNA API)
Description: declaration: package: com.sun.jna.platform.linux, interface: LibC

Package com.sun.jna.platform.linux

# Interface LibC

All Superinterfaces:
  `LibCAPI`, `Library`, `Reboot`, `Resource`

public interface LibC extends LibCAPI, Library
LibC structures and functions unique to Linux

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static class`
  `LibC.Statvfs`
  `static class`
  `LibC.Sysinfo`

  ## Nested classes/interfaces inherited from interface com.sun.jna.platform.unix.LibCAPI

  `LibCAPI.size_t, LibCAPI.ssize_t`

  ## Nested classes/interfaces inherited from interface com.sun.jna.Library

  `Library.Handler`

  ## Nested classes/interfaces inherited from interface com.sun.jna.platform.unix.Resource

  `Resource.Rlimit`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final LibC`
  `INSTANCE`
  `static final String`
  `NAME`

  ### Fields inherited from interface com.sun.jna.platform.unix.LibCAPI

  `HOST_NAME_MAX`

  ### Fields inherited from interface com.sun.jna.Library

  `OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER`

  ### Fields inherited from interface com.sun.jna.platform.unix.Reboot

  `RB_AUTOBOOT, RB_DISABLE_CAD, RB_ENABLE_CAD, RB_HALT_SYSTEM, RB_KEXEC, RB_POWER_OFF, RB_SW_SUSPEND`

  ### Fields inherited from interface com.sun.jna.platform.unix.Resource

  `RLIMIT_AS, RLIMIT_CORE, RLIMIT_CPU, RLIMIT_DATA, RLIMIT_FSIZE, RLIMIT_LOCKS, RLIMIT_MEMLOCK, RLIMIT_MSGQUEUE, RLIMIT_NICE, RLIMIT_NLIMITS, RLIMIT_NOFILE, RLIMIT_NPROC, RLIMIT_RSS, RLIMIT_RTPRIO, RLIMIT_RTTIME, RLIMIT_SIGPENDING, RLIMIT_STACK`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `statvfs(String path, LibC.Statvfs buf)`
  The function statvfs() returns information about a mounted filesystem.
  `int`
  `sysinfo(LibC.Sysinfo info)`
  sysinfo() provides a simple way of getting overall system statistics.

  ### Methods inherited from interface com.sun.jna.platform.unix.LibCAPI

  `close, getdomainname, getegid, getenv, geteuid, getgid, gethostname, getloadavg, getuid, msync, munmap, setdomainname, setegid, setenv, seteuid, setgid, sethostname, setuid, unsetenv`

  ### Methods inherited from interface com.sun.jna.platform.unix.Reboot

  `reboot`

  ### Methods inherited from interface com.sun.jna.platform.unix.Resource

  `getrlimit, setrlimit`

- ## Field Details

  - ### NAME

    static final String NAME
    See Also:
      - Constant Field Values

  - ### INSTANCE

    static final LibC INSTANCE

- ## Method Details

  - ### sysinfo

    int sysinfo(LibC.Sysinfo info)
    sysinfo() provides a simple way of getting overall system statistics. This is more portable than reading /dev/kmem.
    Parameters:
      `info` - A Sysinfo structure which will be populated
    Returns:
      On success, zero is returned. On error, -1 is returned, and errno is set appropriately.

  - ### statvfs

    int statvfs(String path, LibC.Statvfs buf)
    The function statvfs() returns information about a mounted filesystem.
    Parameters:
      `path` - the pathname of any file within the mounted filesystem.
      `buf` - a pointer to a statvfs structure
    Returns:
      On success, zero is returned. On error, -1 is returned, and errno is set appropriately.