Package org.lwjgl.system.linux
Class Msghdr
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct
org.lwjgl.system.linux.Msghdr
- All Implemented Interfaces:
AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class Msghdr
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Layout
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 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 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
ConstructorDescriptionMsghdr
(ByteBuffer container) Creates aMsghdr
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic Msghdr
calloc()
Returns a newMsghdr
instance allocated withmemCalloc
.static Msghdr.Buffer
calloc
(int capacity) Returns a newMsghdr.Buffer
instance allocated withmemCalloc
.static Msghdr.Buffer
calloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newMsghdr.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static Msghdr
calloc
(org.lwjgl.system.MemoryStack stack) Returns a newMsghdr
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static Msghdr
create()
Returns a newMsghdr
instance allocated withBufferUtils
.static Msghdr.Buffer
create
(int capacity) Returns a newMsghdr.Buffer
instance allocated withBufferUtils
.static Msghdr
create
(long address) Returns a newMsghdr
instance for the specified memory address.static Msghdr.Buffer
create
(long address, int capacity) Create aMsghdr.Buffer
instance at the specified memory.static Msghdr
createSafe
(long address) static Msghdr.Buffer
createSafe
(long address, int capacity) static Msghdr
malloc()
Returns a newMsghdr
instance allocated withmemAlloc
.static Msghdr.Buffer
malloc
(int capacity) Returns a newMsghdr.Buffer
instance allocated withmemAlloc
.static Msghdr.Buffer
malloc
(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newMsghdr.Buffer
instance allocated on the specifiedMemoryStack
.static Msghdr
malloc
(org.lwjgl.system.MemoryStack stack) Returns a newMsghdr
instance allocated on the specifiedMemoryStack
.ancillary data (eg BSD filedesc passing)msg_control
(ByteBuffer value) Sets the address of the specifiedByteBuffer
to themsg_control()
field.long
ancillary data buffer lengthint
flags on received messagemsg_flags
(int value) Sets the specified value to themsg_flags()
field.msg_iov()
vector of data to send/receive intomsg_iov
(IOVec.Buffer value) Sets the address of the specifiedIOVec.Buffer
to themsg_iov()
field.long
number of elements in the vectormsg_name()
address to send to/receive frommsg_name
(ByteBuffer value) Sets the address of the specifiedByteBuffer
to themsg_name()
field.int
length ofaddress
datastatic ByteBuffer
nmsg_control
(long struct) Unsafe version ofmsg_control
.static void
nmsg_control
(long struct, ByteBuffer value) Unsafe version ofmsg_control
.static long
nmsg_controllen
(long struct) Unsafe version ofmsg_controllen()
.static void
nmsg_controllen
(long struct, long value) Sets the specified value to themsg_controllen
field of the specifiedstruct
.static int
nmsg_flags
(long struct) Unsafe version ofmsg_flags()
.static void
nmsg_flags
(long struct, int value) Unsafe version ofmsg_flags
.static IOVec.Buffer
nmsg_iov
(long struct) Unsafe version ofmsg_iov()
.static void
nmsg_iov
(long struct, IOVec.Buffer value) Unsafe version ofmsg_iov
.static long
nmsg_iovlen
(long struct) Unsafe version ofmsg_iovlen()
.static void
nmsg_iovlen
(long struct, long value) Sets the specified value to themsg_iovlen
field of the specifiedstruct
.static ByteBuffer
nmsg_name
(long struct) Unsafe version ofmsg_name
.static void
nmsg_name
(long struct, ByteBuffer value) Unsafe version ofmsg_name
.static int
nmsg_namelen
(long struct) Unsafe version ofmsg_namelen()
.static void
nmsg_namelen
(long struct, int value) Sets the specified value to themsg_namelen
field 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.int
sizeof()
static void
validate
(long struct) Validates pointer members that should not beNULL
.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. -
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 aMsghdr
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
-
msg_name
address to send to/receive from -
msg_namelen
public int msg_namelen()length ofaddress
data -
msg_iov
vector of data to send/receive into -
msg_iovlen
public long msg_iovlen()number of elements in the vector -
msg_control
ancillary data (eg BSD filedesc passing) -
msg_controllen
public long msg_controllen()ancillary data buffer length -
msg_flags
public int msg_flags()flags on received message -
msg_name
Sets the address of the specifiedByteBuffer
to themsg_name()
field. -
msg_iov
Sets the address of the specifiedIOVec.Buffer
to themsg_iov()
field. -
msg_control
Sets the address of the specifiedByteBuffer
to themsg_control()
field. -
msg_flags
Sets the specified value to themsg_flags()
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 newMsghdr
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newMsghdr
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newMsghdr
instance allocated withBufferUtils
. -
create
Returns a newMsghdr
instance for the specified memory address. -
createSafe
-
malloc
Returns a newMsghdr.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newMsghdr.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newMsghdr.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aMsghdr.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
malloc
Returns a newMsghdr
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newMsghdr
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newMsghdr.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newMsghdr.Buffer
instance allocated on the specifiedMemoryStack
and 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_namelen
field 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_iovlen
field 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_controllen
field 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
-