Top Description Inners Fields Constructors Methods
org.lwjgl.system.linux

public Class Msghdr

extends Struct<Msghdr>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct msghdr
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

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 and Inner Type Summary

Modifier and TypeClass and Description
public static class
Msghdr.Buffer

An array of Msghdr structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
MSG_CONTROL

The struct member offsets.

public static final int
MSG_CONTROLLEN

The struct member offsets.

public static final int
MSG_FLAGS

The struct member offsets.

public static final int
MSG_IOV

The struct member offsets.

public static final int
MSG_IOVLEN

The struct member offsets.

public static final int
MSG_NAME

The struct member offsets.

public static final int
MSG_NAMELEN

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
Msghdr(long address, ByteBuffer container)

public
Msghdr(ByteBuffer container)

Creates a Msghdr instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static Msghdr
calloc()

Returns a new Msghdr instance allocated with memCalloc.

public static Msghdr.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new Msghdr.Buffer instance allocated with memCalloc.

public static Msghdr
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new Msghdr instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static Msghdr.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new Msghdr.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

protected Msghdr
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static Msghdr
create()

Returns a new Msghdr instance allocated with BufferUtils.

public static Msghdr
create(long address)

Returns a new Msghdr instance for the specified memory address.

public static Msghdr.Buffer
create(int
the buffer capacity
capacity
)

Returns a new Msghdr.Buffer instance allocated with BufferUtils.

public static Msghdr.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a Msghdr.Buffer instance at the specified memory.

public static Msghdr
createSafe(long address)

Like create, but returns null if address is NULL.

public static Msghdr.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public static Msghdr
malloc()

Returns a new Msghdr instance allocated with memAlloc.

public static Msghdr.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new Msghdr.Buffer instance allocated with memAlloc.

public static Msghdr
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new Msghdr instance allocated on the specified MemoryStack.

public static Msghdr.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new Msghdr.Buffer instance allocated on the specified MemoryStack.

public ByteBuffer
msg_control()

ancillary data (eg BSD filedesc passing)

public Msghdr
msg_control(ByteBuffer value)

Sets the address of the specified ByteBuffer to the msg_control field.

public long
msg_controllen()

ancillary data buffer length

public int
msg_flags()

flags on received message

public Msghdr
msg_flags(int value)

Sets the specified value to the msg_flags field.

public IOVec.Buffer
msg_iov()

vector of data to send/receive into

public Msghdr
msg_iov(IOVec.Buffer value)

Sets the address of the specified IOVec.Buffer to the msg_iov field.

public long
msg_iovlen()

number of elements in the vector

public ByteBuffer
msg_name()

address to send to/receive from

public Msghdr
msg_name(ByteBuffer value)

Sets the address of the specified ByteBuffer to the msg_name field.

public int
msg_namelen()

length of address data

public static ByteBuffer
nmsg_control(long struct)

Unsafe version of msg_control.

public static void
nmsg_control(long struct, ByteBuffer value)

Unsafe version of msg_control.

public static long
nmsg_controllen(long struct)

Unsafe version of msg_controllen.

public static void
nmsg_controllen(long struct, long value)

Sets the specified value to the msg_controllen field of the specified struct.

public static int
nmsg_flags(long struct)

Unsafe version of msg_flags.

public static void
nmsg_flags(long struct, int value)

Unsafe version of msg_flags.

public static IOVec.Buffer
nmsg_iov(long struct)

Unsafe version of msg_iov.

public static void
nmsg_iov(long struct, IOVec.Buffer value)

Unsafe version of msg_iov.

public static long
nmsg_iovlen(long struct)

Unsafe version of msg_iovlen.

public static void
nmsg_iovlen(long struct, long value)

Sets the specified value to the msg_iovlen field of the specified struct.

public static ByteBuffer
nmsg_name(long struct)

Unsafe version of msg_name.

public static void
nmsg_name(long struct, ByteBuffer value)

Unsafe version of msg_name.

public static int
nmsg_namelen(long struct)

Unsafe version of msg_namelen.

public static void
nmsg_namelen(long struct, int value)

Sets the specified value to the msg_namelen field of the specified struct.

public Msghdr
set(ByteBuffer msg_name, IOVec.Buffer msg_iov, ByteBuffer msg_control, int msg_flags)

Initializes this struct with the specified values.

public Msghdr

Returns:

this struct
set
(Msghdr
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

MSG_CONTROLback to summary
public static final int MSG_CONTROL

The struct member offsets.

MSG_CONTROLLENback to summary
public static final int MSG_CONTROLLEN

The struct member offsets.

MSG_FLAGSback to summary
public static final int MSG_FLAGS

The struct member offsets.

MSG_IOVback to summary
public static final int MSG_IOV

The struct member offsets.

MSG_IOVLENback to summary
public static final int MSG_IOVLEN

The struct member offsets.

MSG_NAMEback to summary
public static final int MSG_NAME

The struct member offsets.

MSG_NAMELENback to summary
public static final int MSG_NAMELEN

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

Msghdrback to summary
protected Msghdr(long address, ByteBuffer container)
Msghdrback to summary
public Msghdr(ByteBuffer container)

Creates a Msghdr instance at the current position of the specified ByteBuffer 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 Detail

callocback to summary
public static Msghdr calloc()

Returns a new Msghdr instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static Msghdr.Buffer calloc(int capacity)

Returns a new Msghdr.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static Msghdr calloc(MemoryStack stack)

Returns a new Msghdr instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static Msghdr.Buffer calloc(int capacity, MemoryStack stack)

Returns a new Msghdr.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

createback to summary
protected Msghdr create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static Msghdr create()

Returns a new Msghdr instance allocated with BufferUtils.

createback to summary
public static Msghdr create(long address)

Returns a new Msghdr instance for the specified memory address.

createback to summary
public static Msghdr.Buffer create(int capacity)

Returns a new Msghdr.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static Msghdr.Buffer create(long address, int capacity)

Create a Msghdr.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static Msghdr createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static Msghdr.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
mallocback to summary
public static Msghdr malloc()

Returns a new Msghdr instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static Msghdr.Buffer malloc(int capacity)

Returns a new Msghdr.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static Msghdr malloc(MemoryStack stack)

Returns a new Msghdr instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static Msghdr.Buffer malloc(int capacity, MemoryStack stack)

Returns a new Msghdr.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

msg_controlback to summary
public ByteBuffer msg_control()

ancillary data (eg BSD filedesc passing)

Annotations
@NativeType:void *
msg_controlback to summary
public Msghdr msg_control(ByteBuffer value)

Sets the address of the specified ByteBuffer to the msg_control field.

msg_controllenback to summary
public long msg_controllen()

ancillary data buffer length

Annotations
@NativeType:size_t
msg_flagsback to summary
public int msg_flags()

flags on received message

msg_flagsback to summary
public Msghdr msg_flags(int value)

Sets the specified value to the msg_flags field.

msg_iovback to summary
public IOVec.Buffer msg_iov()

vector of data to send/receive into

Annotations
@NativeType:struct iovec *
msg_iovback to summary
public Msghdr msg_iov(IOVec.Buffer value)

Sets the address of the specified IOVec.Buffer to the msg_iov field.

msg_iovlenback to summary
public long msg_iovlen()

number of elements in the vector

Annotations
@NativeType:size_t
msg_nameback to summary
public ByteBuffer msg_name()

address to send to/receive from

Annotations
@NativeType:void *
msg_nameback to summary
public Msghdr msg_name(ByteBuffer value)

Sets the address of the specified ByteBuffer to the msg_name field.

msg_namelenback to summary
public int msg_namelen()

length of address data

Annotations
@NativeType:socklen_t
nmsg_controlback to summary
public static ByteBuffer nmsg_control(long struct)

Unsafe version of msg_control.

nmsg_controlback to summary
public static void nmsg_control(long struct, ByteBuffer value)

Unsafe version of msg_control.

nmsg_controllenback to summary
public static long nmsg_controllen(long struct)

Unsafe version of msg_controllen.

nmsg_controllenback to summary
public static void nmsg_controllen(long struct, long value)

Sets the specified value to the msg_controllen field of the specified struct.

nmsg_flagsback to summary
public static int nmsg_flags(long struct)

Unsafe version of msg_flags.

nmsg_flagsback to summary
public static void nmsg_flags(long struct, int value)

Unsafe version of msg_flags.

nmsg_iovback to summary
public static IOVec.Buffer nmsg_iov(long struct)

Unsafe version of msg_iov.

nmsg_iovback to summary
public static void nmsg_iov(long struct, IOVec.Buffer value)

Unsafe version of msg_iov.

nmsg_iovlenback to summary
public static long nmsg_iovlen(long struct)

Unsafe version of msg_iovlen.

nmsg_iovlenback to summary
public static void nmsg_iovlen(long struct, long value)

Sets the specified value to the msg_iovlen field of the specified struct.

nmsg_nameback to summary
public static ByteBuffer nmsg_name(long struct)

Unsafe version of msg_name.

nmsg_nameback to summary
public static void nmsg_name(long struct, ByteBuffer value)

Unsafe version of msg_name.

nmsg_namelenback to summary
public static int nmsg_namelen(long struct)

Unsafe version of msg_namelen.

nmsg_namelenback to summary
public static void nmsg_namelen(long struct, int value)

Sets the specified value to the msg_namelen field of the specified struct.

setback to summary
public Msghdr set(ByteBuffer msg_name, IOVec.Buffer msg_iov, ByteBuffer msg_control, int msg_flags)

Initializes this struct with the specified values.

setback to summary
public Msghdr set(Msghdr src)

Copies the specified struct data to this struct.

Parameters
src:Msghdr

the source struct

Returns:Msghdr

this struct

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
validateback to summary
public static void validate(long struct)

Validates pointer members that should not be NULL.

Parameters
struct:long

the struct to validate

org.lwjgl.system.linux back to summary

public Class Msghdr.Buffer

extends StructBuffer<Msghdr, Msghdr.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of Msghdr structs.

Field Summary

Modifier and TypeField and Description
private static final Msghdr

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new Msghdr.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
protected Msghdr
public ByteBuffer

Returns:

a ByteBuffer view of the data pointed to by the Msghdr#msg_control field.
msg_control
()

public Msghdr.Buffer
msg_control(ByteBuffer value)

Sets the address of the specified ByteBuffer to the Msghdr#msg_control field.

public long

Returns:

the value of the Msghdr#msg_controllen field.
msg_controllen
()

public int

Returns:

the value of the Msghdr#msg_flags field.
msg_flags
()

public Msghdr.Buffer
msg_flags(int value)

Sets the specified value to the Msghdr#msg_flags field.

public IOVec.Buffer

Returns:

a IOVec.Buffer view of the struct array pointed to by the Msghdr#msg_iov field.
msg_iov
()

public Msghdr.Buffer
msg_iov(IOVec.Buffer value)

Sets the address of the specified IOVec.Buffer to the Msghdr#msg_iov field.

public long

Returns:

the value of the Msghdr#msg_iovlen field.
msg_iovlen
()

public ByteBuffer

Returns:

a ByteBuffer view of the data pointed to by the Msghdr#msg_name field.
msg_name
()

public Msghdr.Buffer
msg_name(ByteBuffer value)

Sets the address of the specified ByteBuffer to the Msghdr#msg_name field.

public int

Returns:

the value of the Msghdr#msg_namelen field.
msg_namelen
()

protected Msghdr.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final Msghdr ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new Msghdr.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by Msghdr#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

getElementFactoryback to summary
protected Msghdr getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
msg_controlback to summary
public ByteBuffer msg_control()
Returns:ByteBuffer

a ByteBuffer view of the data pointed to by the Msghdr#msg_control field.

Annotations
@NativeType:void *
msg_controlback to summary
public Msghdr.Buffer msg_control(ByteBuffer value)

Sets the address of the specified ByteBuffer to the Msghdr#msg_control field.

msg_controllenback to summary
public long msg_controllen()
Returns:long

the value of the Msghdr#msg_controllen field.

Annotations
@NativeType:size_t
msg_flagsback to summary
public int msg_flags()
Returns:int

the value of the Msghdr#msg_flags field.

msg_flagsback to summary
public Msghdr.Buffer msg_flags(int value)

Sets the specified value to the Msghdr#msg_flags field.

msg_iovback to summary
public IOVec.Buffer msg_iov()
Returns:IOVec.Buffer

a IOVec.Buffer view of the struct array pointed to by the Msghdr#msg_iov field.

Annotations
@NativeType:struct iovec *
msg_iovback to summary
public Msghdr.Buffer msg_iov(IOVec.Buffer value)

Sets the address of the specified IOVec.Buffer to the Msghdr#msg_iov field.

msg_iovlenback to summary
public long msg_iovlen()
Returns:long

the value of the Msghdr#msg_iovlen field.

Annotations
@NativeType:size_t
msg_nameback to summary
public ByteBuffer msg_name()
Returns:ByteBuffer

a ByteBuffer view of the data pointed to by the Msghdr#msg_name field.

Annotations
@NativeType:void *
msg_nameback to summary
public Msghdr.Buffer msg_name(ByteBuffer value)

Sets the address of the specified ByteBuffer to the Msghdr#msg_name field.

msg_namelenback to summary
public int msg_namelen()
Returns:int

the value of the Msghdr#msg_namelen field.

Annotations
@NativeType:socklen_t
selfback to summary
protected Msghdr.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override