public interface CLibrary
extends com.sun.jna.platform.unix.LibCAPI, com.sun.jna.Library
Modifier and Type | Interface and Description |
---|---|
static class |
CLibrary.Addrinfo |
static class |
CLibrary.Sockaddr |
static class |
CLibrary.Timeval
Return type for BSD sysctl kern.boottime
|
Modifier and Type | Field and Description |
---|---|
static int |
AI_CANONNAME
Constant
AI_CANONNAME=2 |
RB_AUTOBOOT, RB_DISABLE_CAD, RB_ENABLE_CAD, RB_HALT_SYSTEM, RB_KEXEC, RB_POWER_OFF, RB_SW_SUSPEND
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
Modifier and Type | Method and Description |
---|---|
void |
freeaddrinfo(com.sun.jna.Pointer res)
Frees the memory that was allocated for the dynamically allocated linked list
res.
|
String |
gai_strerror(int e)
Translates getaddrinfo error codes to a human readable string, suitable for
error reporting.
|
int |
getaddrinfo(String node,
String service,
CLibrary.Addrinfo hints,
com.sun.jna.ptr.PointerByReference res)
Given node and service, which identify an Internet host and a service,
getaddrinfo() returns one or more addrinfo structures, each of which contains
an Internet address that can be specified in a call to bind(2) or connect(2).
|
int |
getpid()
Returns the process ID of the calling process.
|
static final int AI_CANONNAME
AI_CANONNAME=2
int getpid()
int getaddrinfo(String node, String service, CLibrary.Addrinfo hints, com.sun.jna.ptr.PointerByReference res)
node
- a numerical network address or a network hostname, whose network
addresses are looked up and resolved.service
- sets the port in each returned address structure.hints
- specifies criteria for selecting the socket address structures
returned in the list pointed to by res.res
- returned address structurevoid freeaddrinfo(com.sun.jna.Pointer res)
res
- Pointer to linked list returned by getaddrinfoString gai_strerror(int e)
e
- Error code from getaddrinfoCopyright © 2010–2020 oshi. All rights reserved.