Package org.lwjgl.system.linux
Class CMsghdr
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct cmsghdr {
socklen_t cmsg_len;
int cmsg_level;
int cmsg_type;
char cmsg_data[0];
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCMsghdr(ByteBuffer container) Creates aCMsghdrinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic CMsghdrcalloc()Returns a newCMsghdrinstance allocated withmemCalloc.static CMsghdr.Buffercalloc(int capacity) Returns a newCMsghdr.Bufferinstance allocated withmemCalloc.static CMsghdr.Buffercalloc(int capacity, MemoryStack stack) Returns a newCMsghdr.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static CMsghdrcalloc(MemoryStack stack) Returns a newCMsghdrinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.bytecmsg_data(int index) cmsg_data(int index, byte value) Sets the specified value at the specified index of thecmsg_datafield.cmsg_data(ByteBuffer value) Copies the specifiedByteBufferto thecmsg_datafield.intcmsg_len()cmsg_len(int value) Sets the specified value to thecmsg_lenfield.intcmsg_level(int value) Sets the specified value to thecmsg_levelfield.intcmsg_type(int value) Sets the specified value to thecmsg_typefield.static CMsghdrcreate()Returns a newCMsghdrinstance allocated withBufferUtils.static CMsghdr.Buffercreate(int capacity) Returns a newCMsghdr.Bufferinstance allocated withBufferUtils.static CMsghdrcreate(long address) Returns a newCMsghdrinstance for the specified memory address.static CMsghdr.Buffercreate(long address, int capacity) Create aCMsghdr.Bufferinstance at the specified memory.static @Nullable CMsghdrcreateSafe(long address) static @Nullable CMsghdr.BuffercreateSafe(long address, int capacity) static CMsghdrmalloc()Returns a newCMsghdrinstance allocated withmemAlloc.static CMsghdr.Buffermalloc(int capacity) Returns a newCMsghdr.Bufferinstance allocated withmemAlloc.static CMsghdr.Buffermalloc(int capacity, MemoryStack stack) Returns a newCMsghdr.Bufferinstance allocated on the specifiedMemoryStack.static CMsghdrmalloc(MemoryStack stack) Returns a newCMsghdrinstance allocated on the specifiedMemoryStack.static ByteBufferncmsg_data(long struct) Unsafe version ofcmsg_data().static bytencmsg_data(long struct, int index) Unsafe version ofcmsg_data.static voidncmsg_data(long struct, int index, byte value) Unsafe version ofcmsg_data.static voidncmsg_data(long struct, ByteBuffer value) Unsafe version ofcmsg_data.static intncmsg_len(long struct) Unsafe version ofcmsg_len().static voidncmsg_len(long struct, int value) Unsafe version ofcmsg_len.static intncmsg_level(long struct) Unsafe version ofcmsg_level().static voidncmsg_level(long struct, int value) Unsafe version ofcmsg_level.static intncmsg_type(long struct) Unsafe version ofcmsg_type().static voidncmsg_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.intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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 aCMsghdrinstance at the current position of the specifiedByteBuffercontainer. 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()Description copied from class:StructReturnssizeof(struct). -
cmsg_len
public int cmsg_len()- Returns:
- the value of the
cmsg_lenfield.
-
cmsg_level
public int cmsg_level()- Returns:
- the value of the
cmsg_levelfield.
-
cmsg_type
public int cmsg_type()- Returns:
- the value of the
cmsg_typefield.
-
cmsg_data
- Returns:
- a
ByteBufferview of thecmsg_datafield.
-
cmsg_data
public byte cmsg_data(int index) - Returns:
- the value at the specified index of the
cmsg_datafield.
-
cmsg_len
Sets the specified value to thecmsg_lenfield. -
cmsg_level
Sets the specified value to thecmsg_levelfield. -
cmsg_type
Sets the specified value to thecmsg_typefield. -
cmsg_data
Copies the specifiedByteBufferto thecmsg_datafield. -
cmsg_data
Sets the specified value at the specified index of thecmsg_datafield. -
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 newCMsghdrinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newCMsghdrinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newCMsghdrinstance allocated withBufferUtils. -
create
Returns a newCMsghdrinstance for the specified memory address. -
createSafe
-
malloc
Returns a newCMsghdr.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newCMsghdr.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newCMsghdr.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aCMsghdr.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newCMsghdrinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newCMsghdrinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newCMsghdr.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newCMsghdr.Bufferinstance allocated on the specifiedMemoryStackand 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.
-