Package org.lwjgl.system.linux
Class CMsghdr
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct
org.lwjgl.system.linux.CMsghdr
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class CMsghdr
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Layout
struct cmsghdr {
socklen_t cmsg_len()
;
int cmsg_level()
;
int cmsg_type()
;
char cmsg_data[0];
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionCMsghdr
(ByteBuffer container) Creates aCMsghdr
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic CMsghdr
calloc()
Returns a newCMsghdr
instance allocated withmemCalloc
.static CMsghdr.Buffer
calloc
(int capacity) Returns a newCMsghdr.Buffer
instance allocated withmemCalloc
.static CMsghdr.Buffer
calloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCMsghdr.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static CMsghdr
calloc
(org.lwjgl.system.MemoryStack stack) Returns a newCMsghdr
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.byte
cmsg_data
(int index) cmsg_data
(int index, byte value) Sets the specified value at the specified index of thecmsg_data
field.cmsg_data
(ByteBuffer value) Copies the specifiedByteBuffer
to thecmsg_data
field.int
cmsg_len()
data byte count, including headercmsg_len
(int value) Sets the specified value to thecmsg_len()
field.int
originating protocolcmsg_level
(int value) Sets the specified value to thecmsg_level()
field.int
protocol-specific typecmsg_type
(int value) Sets the specified value to thecmsg_type()
field.static CMsghdr
create()
Returns a newCMsghdr
instance allocated withBufferUtils
.static CMsghdr.Buffer
create
(int capacity) Returns a newCMsghdr.Buffer
instance allocated withBufferUtils
.static CMsghdr
create
(long address) Returns a newCMsghdr
instance for the specified memory address.static CMsghdr.Buffer
create
(long address, int capacity) Create aCMsghdr.Buffer
instance at the specified memory.static CMsghdr
createSafe
(long address) static CMsghdr.Buffer
createSafe
(long address, int capacity) static CMsghdr
malloc()
Returns a newCMsghdr
instance allocated withmemAlloc
.static CMsghdr.Buffer
malloc
(int capacity) Returns a newCMsghdr.Buffer
instance allocated withmemAlloc
.static CMsghdr.Buffer
malloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newCMsghdr.Buffer
instance allocated on the specifiedMemoryStack
.static CMsghdr
malloc
(org.lwjgl.system.MemoryStack stack) Returns a newCMsghdr
instance allocated on the specifiedMemoryStack
.static ByteBuffer
ncmsg_data
(long struct) Unsafe version ofcmsg_data()
.static byte
ncmsg_data
(long struct, int index) Unsafe version ofcmsg_data
.static void
ncmsg_data
(long struct, int index, byte value) Unsafe version ofcmsg_data
.static void
ncmsg_data
(long struct, ByteBuffer value) Unsafe version ofcmsg_data
.static int
ncmsg_len
(long struct) Unsafe version ofcmsg_len()
.static void
ncmsg_len
(long struct, int value) Unsafe version ofcmsg_len
.static int
ncmsg_level
(long struct) Unsafe version ofcmsg_level()
.static void
ncmsg_level
(long struct, int value) Unsafe version ofcmsg_level
.static int
ncmsg_type
(long struct) Unsafe version ofcmsg_type()
.static void
ncmsg_type
(long struct, int value) Unsafe version ofcmsg_type
.set
(int cmsg_len, int cmsg_level, int cmsg_type, ByteBuffer cmsg_data) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
CMSG_LEN
public static final int CMSG_LENThe struct member offsets. -
CMSG_LEVEL
public static final int CMSG_LEVELThe struct member offsets. -
CMSG_TYPE
public static final int CMSG_TYPEThe struct member offsets. -
CMSG_DATA
public static final int CMSG_DATAThe struct member offsets.
-
-
Constructor Details
-
CMsghdr
Creates aCMsghdr
instance at the current position of the specifiedByteBuffer
container. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Details
-
sizeof
public int sizeof()- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
cmsg_len
public int cmsg_len()data byte count, including header -
cmsg_level
public int cmsg_level()originating protocol -
cmsg_type
public int cmsg_type()protocol-specific type -
cmsg_data
- Returns:
- a
ByteBuffer
view of thecmsg_data
field.
-
cmsg_data
public byte cmsg_data(int index) - Returns:
- the value at the specified index of the
cmsg_data
field.
-
cmsg_len
Sets the specified value to thecmsg_len()
field. -
cmsg_level
Sets the specified value to thecmsg_level()
field. -
cmsg_type
Sets the specified value to thecmsg_type()
field. -
cmsg_data
Copies the specifiedByteBuffer
to thecmsg_data
field. -
cmsg_data
Sets the specified value at the specified index of thecmsg_data
field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newCMsghdr
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newCMsghdr
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newCMsghdr
instance allocated withBufferUtils
. -
create
Returns a newCMsghdr
instance for the specified memory address. -
createSafe
-
malloc
Returns a newCMsghdr.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newCMsghdr.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newCMsghdr.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aCMsghdr.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newCMsghdr
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newCMsghdr
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newCMsghdr.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newCMsghdr.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
ncmsg_len
public static int ncmsg_len(long struct) Unsafe version ofcmsg_len()
. -
ncmsg_level
public static int ncmsg_level(long struct) Unsafe version ofcmsg_level()
. -
ncmsg_type
public static int ncmsg_type(long struct) Unsafe version ofcmsg_type()
. -
ncmsg_data
Unsafe version ofcmsg_data()
. -
ncmsg_data
public static byte ncmsg_data(long struct, int index) Unsafe version ofcmsg_data
. -
ncmsg_len
public static void ncmsg_len(long struct, int value) Unsafe version ofcmsg_len
. -
ncmsg_level
public static void ncmsg_level(long struct, int value) Unsafe version ofcmsg_level
. -
ncmsg_type
public static void ncmsg_type(long struct, int value) Unsafe version ofcmsg_type
. -
ncmsg_data
Unsafe version ofcmsg_data
. -
ncmsg_data
public static void ncmsg_data(long struct, int index, byte value) Unsafe version ofcmsg_data
.
-