abstract class SockAddrUnix
extends jnr.ffi.Struct
Modifier and Type | Class and Description |
---|---|
(package private) static class |
SockAddrUnix.BSDSockAddrUnix
An implementation of
SockAddrUnix for BSD systems |
(package private) static class |
SockAddrUnix.DefaultSockAddrUnix
An implementation of
SockAddrUnix for Linux, Solaris, et, al |
jnr.ffi.Struct.AbstractBoolean, jnr.ffi.Struct.AbstractMember, jnr.ffi.Struct.Address, jnr.ffi.Struct.Alignment, jnr.ffi.Struct.AsciiString, jnr.ffi.Struct.AsciiStringRef, jnr.ffi.Struct.blkcnt_t, jnr.ffi.Struct.blksize_t, jnr.ffi.Struct.BOOL16, jnr.ffi.Struct.Boolean, jnr.ffi.Struct.BYTE, jnr.ffi.Struct.caddr_t, jnr.ffi.Struct.clock_t, jnr.ffi.Struct.dev_t, jnr.ffi.Struct.Double, jnr.ffi.Struct.DWORD, jnr.ffi.Struct.Enum<T extends java.lang.Enum<T>>, jnr.ffi.Struct.Enum16<E extends java.lang.Enum<E>>, jnr.ffi.Struct.Enum32<E extends java.lang.Enum<E>>, jnr.ffi.Struct.Enum64<E extends java.lang.Enum<E>>, jnr.ffi.Struct.Enum8<E extends java.lang.Enum<E>>, jnr.ffi.Struct.EnumField<E>, jnr.ffi.Struct.EnumLong<E extends java.lang.Enum<E>>, jnr.ffi.Struct.Float, jnr.ffi.Struct.fsblkcnt_t, jnr.ffi.Struct.fsfilcnt_t, jnr.ffi.Struct.Function<T>, jnr.ffi.Struct.gid_t, jnr.ffi.Struct.id_t, jnr.ffi.Struct.in_addr_t, jnr.ffi.Struct.in_port_t, jnr.ffi.Struct.ino_t, jnr.ffi.Struct.ino64_t, jnr.ffi.Struct.int16_t, jnr.ffi.Struct.int32_t, jnr.ffi.Struct.int64_t, jnr.ffi.Struct.int8_t, jnr.ffi.Struct.IntegerAlias, jnr.ffi.Struct.intptr_t, jnr.ffi.Struct.key_t, jnr.ffi.Struct.LONG, jnr.ffi.Struct.Member, jnr.ffi.Struct.mode_t, jnr.ffi.Struct.nlink_t, jnr.ffi.Struct.NumberField, jnr.ffi.Struct.off_t, jnr.ffi.Struct.Offset, jnr.ffi.Struct.Padding, jnr.ffi.Struct.pid_t, jnr.ffi.Struct.Pointer, jnr.ffi.Struct.PointerField, jnr.ffi.Struct.rlim_t, jnr.ffi.Struct.sa_family_t, jnr.ffi.Struct.Signed16, jnr.ffi.Struct.Signed32, jnr.ffi.Struct.Signed64, jnr.ffi.Struct.Signed8, jnr.ffi.Struct.SignedLong, jnr.ffi.Struct.size_t, jnr.ffi.Struct.socklen_t, jnr.ffi.Struct.ssize_t, jnr.ffi.Struct.String, jnr.ffi.Struct.StructRef<T extends jnr.ffi.Struct>, jnr.ffi.Struct.swblk_t, jnr.ffi.Struct.time_t, jnr.ffi.Struct.u_int16_t, jnr.ffi.Struct.u_int32_t, jnr.ffi.Struct.u_int64_t, jnr.ffi.Struct.u_int8_t, jnr.ffi.Struct.uid_t, jnr.ffi.Struct.uintptr_t, jnr.ffi.Struct.Unsigned16, jnr.ffi.Struct.Unsigned32, jnr.ffi.Struct.Unsigned64, jnr.ffi.Struct.Unsigned8, jnr.ffi.Struct.UnsignedLong, jnr.ffi.Struct.UTF8String, jnr.ffi.Struct.UTF8StringRef, jnr.ffi.Struct.UTFString, jnr.ffi.Struct.UTFStringRef, jnr.ffi.Struct.WBOOL, jnr.ffi.Struct.WORD
Modifier and Type | Field and Description |
---|---|
static int |
ADDR_LENGTH |
private java.lang.String |
cachedPath |
private static jnr.ffi.Platform.OS |
currentOS |
static int |
HEADER_LENGTH |
Constructor and Description |
---|
SockAddrUnix() |
Modifier and Type | Method and Description |
---|---|
(package private) static SockAddrUnix |
create()
Creates a new instance of SockAddrUnix
|
(package private) jnr.constants.platform.ProtocolFamily |
getFamily()
Gets the protocol family of this unix socket address.
|
protected abstract jnr.ffi.Struct.NumberField |
getFamilyField() |
(package private) int |
getHeaderLength()
Gets len/family header length
|
(package private) int |
getMaximumLength()
Gets the maximum length of this address (including len/family header)
|
(package private) java.lang.String |
getPath()
Gets the file system path of this socket address
|
(package private) java.lang.String |
getPath(int len)
Gets the path of this socket address, supporting abstract namespace on Linux.
|
protected abstract jnr.ffi.Struct.UTF8String |
getPathField() |
(package private) int |
length()
Gets the actual length of this address (including len/family header)
|
(package private) void |
setFamily(jnr.constants.platform.ProtocolFamily family)
Sets the protocol family of this unix socket address.
|
(package private) void |
setPath(java.lang.String path)
Sets the file system path of this socket address
|
private static int |
strlen(jnr.ffi.Struct.UTF8String str) |
(package private) void |
updatePath(int len)
Updates the file system path of this socket address.
|
alignment, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, array, arrayBegin, arrayEnd, arrayOf, function, getMemory, getMemory, getRuntime, inner, isDirect, size, toString, useMemory
private static transient jnr.ffi.Platform.OS currentOS
public static final int ADDR_LENGTH
public static final int HEADER_LENGTH
private java.lang.String cachedPath
protected abstract jnr.ffi.Struct.UTF8String getPathField()
protected abstract jnr.ffi.Struct.NumberField getFamilyField()
final void setFamily(jnr.constants.platform.ProtocolFamily family)
family
- The protocol family, usually ProtocolFamily.PF_UNIX
final jnr.constants.platform.ProtocolFamily getFamily()
void setPath(java.lang.String path)
path
- The unix socket addressvoid updatePath(int len)
len
- the value of the addrlen var, set by the above syscalls.final java.lang.String getPath()
final java.lang.String getPath(int len)
len
- The desired length of the string.
If the first character of the path is NUL, then this value ist considered
exact, otherwise it includes a trailing NUL charater and therefore the actual
string length is len - 1.int getMaximumLength()
int length()
int getHeaderLength()
static SockAddrUnix create()
private static final int strlen(jnr.ffi.Struct.UTF8String str)