Package org.lwjgl.system.linux
Class Msghdr
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct msghdr {
void * msg_name;
socklen_t msg_namelen;
struct iovec * msg_iov;
size_t msg_iovlen;
void * msg_control;
size_t msg_controllen;
int msg_flags;
}-
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 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
ConstructorsConstructorDescriptionMsghdr(ByteBuffer container) Creates aMsghdrinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic Msghdrcalloc()Returns a newMsghdrinstance allocated withmemCalloc.static Msghdr.Buffercalloc(int capacity) Returns a newMsghdr.Bufferinstance allocated withmemCalloc.static Msghdr.Buffercalloc(int capacity, MemoryStack stack) Returns a newMsghdr.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static Msghdrcalloc(MemoryStack stack) Returns a newMsghdrinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static Msghdrcreate()Returns a newMsghdrinstance allocated withBufferUtils.static Msghdr.Buffercreate(int capacity) Returns a newMsghdr.Bufferinstance allocated withBufferUtils.static Msghdrcreate(long address) Returns a newMsghdrinstance for the specified memory address.static Msghdr.Buffercreate(long address, int capacity) Create aMsghdr.Bufferinstance at the specified memory.static @Nullable MsghdrcreateSafe(long address) static @Nullable Msghdr.BuffercreateSafe(long address, int capacity) static Msghdrmalloc()Returns a newMsghdrinstance allocated withmemAlloc.static Msghdr.Buffermalloc(int capacity) Returns a newMsghdr.Bufferinstance allocated withmemAlloc.static Msghdr.Buffermalloc(int capacity, MemoryStack stack) Returns a newMsghdr.Bufferinstance allocated on the specifiedMemoryStack.static Msghdrmalloc(MemoryStack stack) Returns a newMsghdrinstance allocated on the specifiedMemoryStack.msg_control(ByteBuffer value) Sets the address of the specifiedByteBufferto themsg_controlfield.longintmsg_flags(int value) Sets the specified value to themsg_flagsfield.msg_iov()msg_iov(IOVec.Buffer value) Sets the address of the specifiedIOVec.Bufferto themsg_iovfield.longmsg_name()msg_name(ByteBuffer value) Sets the address of the specifiedByteBufferto themsg_namefield.intstatic ByteBuffernmsg_control(long struct) Unsafe version ofmsg_control.static voidnmsg_control(long struct, ByteBuffer value) Unsafe version ofmsg_control.static longnmsg_controllen(long struct) Unsafe version ofmsg_controllen().static voidnmsg_controllen(long struct, long value) Sets the specified value to themsg_controllenfield of the specifiedstruct.static intnmsg_flags(long struct) Unsafe version ofmsg_flags().static voidnmsg_flags(long struct, int value) Unsafe version ofmsg_flags.static IOVec.Buffernmsg_iov(long struct) Unsafe version ofmsg_iov().static voidnmsg_iov(long struct, IOVec.Buffer value) Unsafe version ofmsg_iov.static longnmsg_iovlen(long struct) Unsafe version ofmsg_iovlen().static voidnmsg_iovlen(long struct, long value) Sets the specified value to themsg_iovlenfield of the specifiedstruct.static ByteBuffernmsg_name(long struct) Unsafe version ofmsg_name.static voidnmsg_name(long struct, ByteBuffer value) Unsafe version ofmsg_name.static intnmsg_namelen(long struct) Unsafe version ofmsg_namelen().static voidnmsg_namelen(long struct, int value) Sets the specified value to themsg_namelenfield of the specifiedstruct.set(ByteBuffer msg_name, IOVec.Buffer msg_iov, ByteBuffer msg_control, int msg_flags) Initializes this struct with the specified values.Copies the specified struct data to this struct.intsizeof()Returnssizeof(struct).static voidvalidate(long struct) Validates pointer members that should not beNULL.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. -
MSG_NAME
public static final int MSG_NAMEThe struct member offsets. -
MSG_NAMELEN
public static final int MSG_NAMELENThe struct member offsets. -
MSG_IOV
public static final int MSG_IOVThe struct member offsets. -
MSG_IOVLEN
public static final int MSG_IOVLENThe struct member offsets. -
MSG_CONTROL
public static final int MSG_CONTROLThe struct member offsets. -
MSG_CONTROLLEN
public static final int MSG_CONTROLLENThe struct member offsets. -
MSG_FLAGS
public static final int MSG_FLAGSThe struct member offsets.
-
-
Constructor Details
-
Msghdr
Creates aMsghdrinstance 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). -
msg_name
- Returns:
- a
ByteBufferview of the data pointed to by themsg_namefield.
-
msg_namelen
public int msg_namelen()- Returns:
- the value of the
msg_namelenfield.
-
msg_iov
- Returns:
- a
IOVec.Bufferview of the struct array pointed to by themsg_iovfield.
-
msg_iovlen
public long msg_iovlen()- Returns:
- the value of the
msg_iovlenfield.
-
msg_control
- Returns:
- a
ByteBufferview of the data pointed to by themsg_controlfield.
-
msg_controllen
public long msg_controllen()- Returns:
- the value of the
msg_controllenfield.
-
msg_flags
public int msg_flags()- Returns:
- the value of the
msg_flagsfield.
-
msg_name
Sets the address of the specifiedByteBufferto themsg_namefield. -
msg_iov
Sets the address of the specifiedIOVec.Bufferto themsg_iovfield. -
msg_control
Sets the address of the specifiedByteBufferto themsg_controlfield. -
msg_flags
Sets the specified value to themsg_flagsfield. -
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 newMsghdrinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newMsghdrinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newMsghdrinstance allocated withBufferUtils. -
create
Returns a newMsghdrinstance for the specified memory address. -
createSafe
-
malloc
Returns a newMsghdr.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newMsghdr.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newMsghdr.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aMsghdr.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
malloc
Returns a newMsghdrinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newMsghdrinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newMsghdr.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newMsghdr.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nmsg_name
Unsafe version ofmsg_name. -
nmsg_namelen
public static int nmsg_namelen(long struct) Unsafe version ofmsg_namelen(). -
nmsg_iov
Unsafe version ofmsg_iov(). -
nmsg_iovlen
public static long nmsg_iovlen(long struct) Unsafe version ofmsg_iovlen(). -
nmsg_control
Unsafe version ofmsg_control. -
nmsg_controllen
public static long nmsg_controllen(long struct) Unsafe version ofmsg_controllen(). -
nmsg_flags
public static int nmsg_flags(long struct) Unsafe version ofmsg_flags(). -
nmsg_name
Unsafe version ofmsg_name. -
nmsg_namelen
public static void nmsg_namelen(long struct, int value) Sets the specified value to themsg_namelenfield of the specifiedstruct. -
nmsg_iov
Unsafe version ofmsg_iov. -
nmsg_iovlen
public static void nmsg_iovlen(long struct, long value) Sets the specified value to themsg_iovlenfield of the specifiedstruct. -
nmsg_control
Unsafe version ofmsg_control. -
nmsg_controllen
public static void nmsg_controllen(long struct, long value) Sets the specified value to themsg_controllenfield of the specifiedstruct. -
nmsg_flags
public static void nmsg_flags(long struct, int value) Unsafe version ofmsg_flags. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-