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:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class Msghdr extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct msghdr { void *msg_name(); socklen_tmsg_namelen();struct iovec*msg_iov(); size_tmsg_iovlen(); void *msg_control(); size_tmsg_controllen(); intmsg_flags(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMsghdr.BufferAn array ofMsghdrstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intMSG_CONTROL
MSG_CONTROLLEN
MSG_FLAGS
MSG_IOV
MSG_IOVLEN
MSG_NAME
MSG_NAMELENThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description Msghdr(java.nio.ByteBuffer container)Creates aMsghdrinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Msghdrcalloc()Returns a newMsghdrinstance allocated withmemCalloc.static Msghdr.Buffercalloc(int capacity)Returns a newMsghdr.Bufferinstance allocated withmemCalloc.static Msghdr.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newMsghdr.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static Msghdrcalloc(org.lwjgl.system.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 MsghdrcreateSafe(long address)static 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, org.lwjgl.system.MemoryStack stack)Returns a newMsghdr.Bufferinstance allocated on the specifiedMemoryStack.static Msghdrmalloc(org.lwjgl.system.MemoryStack stack)Returns a newMsghdrinstance allocated on the specifiedMemoryStack.java.nio.ByteBuffermsg_control()ancillary data (eg BSD filedesc passing)Msghdrmsg_control(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto themsg_control()field.longmsg_controllen()ancillary data buffer lengthintmsg_flags()flags on received messageMsghdrmsg_flags(int value)Sets the specified value to themsg_flags()field.IOVec.Buffermsg_iov()vector of data to send/receive intoMsghdrmsg_iov(IOVec.Buffer value)Sets the address of the specifiedIOVec.Bufferto themsg_iov()field.longmsg_iovlen()number of elements in the vectorjava.nio.ByteBuffermsg_name()address to send to/receive fromMsghdrmsg_name(java.nio.ByteBuffer value)Sets the address of the specifiedByteBufferto themsg_name()field.intmsg_namelen()length ofaddressdatastatic java.nio.ByteBuffernmsg_control(long struct)Unsafe version ofmsg_control.static voidnmsg_control(long struct, java.nio.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 java.nio.ByteBuffernmsg_name(long struct)Unsafe version ofmsg_name.static voidnmsg_name(long struct, java.nio.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.Msghdrset(java.nio.ByteBuffer msg_name, IOVec.Buffer msg_iov, java.nio.ByteBuffer msg_control, int msg_flags)Initializes this struct with the specified values.Msghdrset(Msghdr src)Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
Msghdr
public Msghdr(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
msg_name
public java.nio.ByteBuffer msg_name()
address to send to/receive from
-
msg_namelen
public int msg_namelen()
length ofaddressdata
-
msg_iov
public IOVec.Buffer msg_iov()
vector of data to send/receive into
-
msg_iovlen
public long msg_iovlen()
number of elements in the vector
-
msg_control
public java.nio.ByteBuffer 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
public Msghdr msg_name(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto themsg_name()field.
-
msg_iov
public Msghdr msg_iov(IOVec.Buffer value)
Sets the address of the specifiedIOVec.Bufferto themsg_iov()field.
-
msg_control
public Msghdr msg_control(java.nio.ByteBuffer value)
Sets the address of the specifiedByteBufferto themsg_control()field.
-
msg_flags
public Msghdr msg_flags(int value)
Sets the specified value to themsg_flags()field.
-
set
public Msghdr set(java.nio.ByteBuffer msg_name, IOVec.Buffer msg_iov, java.nio.ByteBuffer msg_control, int msg_flags)
Initializes this struct with the specified values.
-
set
public Msghdr set(Msghdr src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static Msghdr malloc()
Returns a newMsghdrinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static Msghdr calloc()
Returns a newMsghdrinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static Msghdr create()
Returns a newMsghdrinstance allocated withBufferUtils.
-
create
public static Msghdr create(long address)
Returns a newMsghdrinstance for the specified memory address.
-
createSafe
@Nullable public static Msghdr createSafe(long address)
-
malloc
public static Msghdr.Buffer malloc(int capacity)
Returns a newMsghdr.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static Msghdr.Buffer calloc(int capacity)
Returns a newMsghdr.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static Msghdr.Buffer create(int capacity)
Returns a newMsghdr.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static Msghdr.Buffer create(long address, int capacity)
Create aMsghdr.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static Msghdr.Buffer createSafe(long address, int capacity)
-
malloc
public static Msghdr malloc(org.lwjgl.system.MemoryStack stack)
Returns a newMsghdrinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static Msghdr calloc(org.lwjgl.system.MemoryStack stack)
Returns a newMsghdrinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static Msghdr.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMsghdr.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static Msghdr.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newMsghdr.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nmsg_name
public static java.nio.ByteBuffer nmsg_name(long struct)
Unsafe version ofmsg_name.
-
nmsg_namelen
public static int nmsg_namelen(long struct)
Unsafe version ofmsg_namelen().
-
nmsg_iov
public static IOVec.Buffer nmsg_iov(long struct)
Unsafe version ofmsg_iov().
-
nmsg_iovlen
public static long nmsg_iovlen(long struct)
Unsafe version ofmsg_iovlen().
-
nmsg_control
public static java.nio.ByteBuffer nmsg_control(long struct)
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
public static void nmsg_name(long struct, java.nio.ByteBuffer value)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
public static void nmsg_iov(long struct, IOVec.Buffer value)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
public static void nmsg_control(long struct, java.nio.ByteBuffer value)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
-
-