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

public Class CMsghdr

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

Layout


struct cmsghdr {
    socklen_t cmsg_len;
    int cmsg_level;
    int cmsg_type;
    char cmsg_data[0];
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
CMsghdr.Buffer

An array of CMsghdr structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
CMSG_DATA

The struct member offsets.

public static final int
CMSG_LEN

The struct member offsets.

public static final int
CMSG_LEVEL

The struct member offsets.

public static final int
CMSG_TYPE

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
CMsghdr(long address, ByteBuffer container)

public
CMsghdr(ByteBuffer container)

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

Method Summary

Modifier and TypeMethod and Description
public static CMsghdr
calloc()

Returns a new CMsghdr instance allocated with memCalloc.

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

Returns a new CMsghdr.Buffer instance allocated with memCalloc.

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

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

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

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

public ByteBuffer

Returns:

a ByteBuffer view of the cmsg_data field.
cmsg_data
()

public byte

Returns:

the value at the specified index of the cmsg_data field.
cmsg_data
(int index)

public CMsghdr
cmsg_data(ByteBuffer value)

Copies the specified ByteBuffer to the cmsg_data field.

public CMsghdr
cmsg_data(int index, byte value)

Sets the specified value at the specified index of the cmsg_data field.

public int
cmsg_len()

data byte count, including header

public CMsghdr
cmsg_len(int value)

Sets the specified value to the cmsg_len field.

public int
cmsg_level()

originating protocol

public CMsghdr
cmsg_level(int value)

Sets the specified value to the cmsg_level field.

public int
cmsg_type()

protocol-specific type

public CMsghdr
cmsg_type(int value)

Sets the specified value to the cmsg_type field.

protected CMsghdr
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 CMsghdr
create()

Returns a new CMsghdr instance allocated with BufferUtils.

public static CMsghdr
create(long address)

Returns a new CMsghdr instance for the specified memory address.

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

Returns a new CMsghdr.Buffer instance allocated with BufferUtils.

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

Create a CMsghdr.Buffer instance at the specified memory.

public static CMsghdr
createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

public static CMsghdr
malloc()

Returns a new CMsghdr instance allocated with memAlloc.

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

Returns a new CMsghdr.Buffer instance allocated with memAlloc.

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

Returns a new CMsghdr instance allocated on the specified MemoryStack.

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

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

public static ByteBuffer
ncmsg_data(long struct)

Unsafe version of cmsg_data.

public static byte
ncmsg_data(long struct, int index)

Unsafe version of cmsg_data.

public static void
ncmsg_data(long struct, ByteBuffer value)

Unsafe version of cmsg_data.

public static void
ncmsg_data(long struct, int index, byte value)

Unsafe version of cmsg_data.

public static int
ncmsg_len(long struct)

Unsafe version of cmsg_len.

public static void
ncmsg_len(long struct, int value)

Unsafe version of cmsg_len.

public static int
ncmsg_level(long struct)

Unsafe version of cmsg_level.

public static void
ncmsg_level(long struct, int value)

Unsafe version of cmsg_level.

public static int
ncmsg_type(long struct)

Unsafe version of cmsg_type.

public static void
ncmsg_type(long struct, int value)

Unsafe version of cmsg_type.

public CMsghdr
set(int cmsg_len, int cmsg_level, int cmsg_type, ByteBuffer cmsg_data)

Initializes this struct with the specified values.

public CMsghdr

Returns:

this struct
set
(CMsghdr
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).
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.

CMSG_DATAback to summary
public static final int CMSG_DATA

The struct member offsets.

CMSG_LENback to summary
public static final int CMSG_LEN

The struct member offsets.

CMSG_LEVELback to summary
public static final int CMSG_LEVEL

The struct member offsets.

CMSG_TYPEback to summary
public static final int CMSG_TYPE

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

CMsghdrback to summary
protected CMsghdr(long address, ByteBuffer container)
CMsghdrback to summary
public CMsghdr(ByteBuffer container)

Creates a CMsghdr 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 CMsghdr calloc()

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

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

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

Parameters
capacity:int

the buffer capacity

callocback to summary
public static CMsghdr calloc(MemoryStack stack)

Returns a new CMsghdr 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 CMsghdr.Buffer calloc(int capacity, MemoryStack stack)

Returns a new CMsghdr.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

cmsg_databack to summary
public ByteBuffer cmsg_data()
Returns:ByteBuffer

a ByteBuffer view of the cmsg_data field.

Annotations
@NativeType:char[0]
cmsg_databack to summary
public byte cmsg_data(int index)
Returns:byte

the value at the specified index of the cmsg_data field.

Annotations
@NativeType:char
cmsg_databack to summary
public CMsghdr cmsg_data(ByteBuffer value)

Copies the specified ByteBuffer to the cmsg_data field.

cmsg_databack to summary
public CMsghdr cmsg_data(int index, byte value)

Sets the specified value at the specified index of the cmsg_data field.

cmsg_lenback to summary
public int cmsg_len()

data byte count, including header

Annotations
@NativeType:socklen_t
cmsg_lenback to summary
public CMsghdr cmsg_len(int value)

Sets the specified value to the cmsg_len field.

cmsg_levelback to summary
public int cmsg_level()

originating protocol

cmsg_levelback to summary
public CMsghdr cmsg_level(int value)

Sets the specified value to the cmsg_level field.

cmsg_typeback to summary
public int cmsg_type()

protocol-specific type

cmsg_typeback to summary
public CMsghdr cmsg_type(int value)

Sets the specified value to the cmsg_type field.

createback to summary
protected CMsghdr 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 CMsghdr create()

Returns a new CMsghdr instance allocated with BufferUtils.

createback to summary
public static CMsghdr create(long address)

Returns a new CMsghdr instance for the specified memory address.

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

Returns a new CMsghdr.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

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

Create a CMsghdr.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static CMsghdr createSafe(long address)

Like create, but returns null if address is NULL.

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

Like create, but returns null if address is NULL.

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

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

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

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

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static CMsghdr malloc(MemoryStack stack)

Returns a new CMsghdr instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

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

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

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

ncmsg_databack to summary
public static ByteBuffer ncmsg_data(long struct)

Unsafe version of cmsg_data.

ncmsg_databack to summary
public static byte ncmsg_data(long struct, int index)

Unsafe version of cmsg_data.

ncmsg_databack to summary
public static void ncmsg_data(long struct, ByteBuffer value)

Unsafe version of cmsg_data.

ncmsg_databack to summary
public static void ncmsg_data(long struct, int index, byte value)

Unsafe version of cmsg_data.

ncmsg_lenback to summary
public static int ncmsg_len(long struct)

Unsafe version of cmsg_len.

ncmsg_lenback to summary
public static void ncmsg_len(long struct, int value)

Unsafe version of cmsg_len.

ncmsg_levelback to summary
public static int ncmsg_level(long struct)

Unsafe version of cmsg_level.

ncmsg_levelback to summary
public static void ncmsg_level(long struct, int value)

Unsafe version of cmsg_level.

ncmsg_typeback to summary
public static int ncmsg_type(long struct)

Unsafe version of cmsg_type.

ncmsg_typeback to summary
public static void ncmsg_type(long struct, int value)

Unsafe version of cmsg_type.

setback to summary
public CMsghdr set(int cmsg_len, int cmsg_level, int cmsg_type, ByteBuffer cmsg_data)

Initializes this struct with the specified values.

setback to summary
public CMsghdr set(CMsghdr src)

Copies the specified struct data to this struct.

Parameters
src:CMsghdr

the source struct

Returns:CMsghdr

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
org.lwjgl.system.linux back to summary

public Class CMsghdr.Buffer

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

An array of CMsghdr structs.

Field Summary

Modifier and TypeField and Description
private static final CMsghdr

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new CMsghdr.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
public ByteBuffer

Returns:

a ByteBuffer view of the cmsg_data field.
cmsg_data
()

public byte

Returns:

the value at the specified index of the cmsg_data field.
cmsg_data
(int index)

public CMsghdr.Buffer
cmsg_data(ByteBuffer value)

Copies the specified ByteBuffer to the cmsg_data field.

public CMsghdr.Buffer
cmsg_data(int index, byte value)

Sets the specified value at the specified index of the cmsg_data field.

public int

Returns:

the value of the CMsghdr#cmsg_len field.
cmsg_len
()

public CMsghdr.Buffer
cmsg_len(int value)

Sets the specified value to the CMsghdr#cmsg_len field.

public int

Returns:

the value of the CMsghdr#cmsg_level field.
cmsg_level
()

public CMsghdr.Buffer
cmsg_level(int value)

Sets the specified value to the CMsghdr#cmsg_level field.

public int

Returns:

the value of the CMsghdr#cmsg_type field.
cmsg_type
()

public CMsghdr.Buffer
cmsg_type(int value)

Sets the specified value to the CMsghdr#cmsg_type field.

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

Field Detail

ELEMENT_FACTORYback to summary
private static final CMsghdr ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new CMsghdr.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 CMsghdr#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

cmsg_databack to summary
public ByteBuffer cmsg_data()
Returns:ByteBuffer

a ByteBuffer view of the cmsg_data field.

Annotations
@NativeType:char[0]
cmsg_databack to summary
public byte cmsg_data(int index)
Returns:byte

the value at the specified index of the cmsg_data field.

Annotations
@NativeType:char
cmsg_databack to summary
public CMsghdr.Buffer cmsg_data(ByteBuffer value)

Copies the specified ByteBuffer to the cmsg_data field.

cmsg_databack to summary
public CMsghdr.Buffer cmsg_data(int index, byte value)

Sets the specified value at the specified index of the cmsg_data field.

cmsg_lenback to summary
public int cmsg_len()
Returns:int

the value of the CMsghdr#cmsg_len field.

Annotations
@NativeType:socklen_t
cmsg_lenback to summary
public CMsghdr.Buffer cmsg_len(int value)

Sets the specified value to the CMsghdr#cmsg_len field.

cmsg_levelback to summary
public int cmsg_level()
Returns:int

the value of the CMsghdr#cmsg_level field.

cmsg_levelback to summary
public CMsghdr.Buffer cmsg_level(int value)

Sets the specified value to the CMsghdr#cmsg_level field.

cmsg_typeback to summary
public int cmsg_type()
Returns:int

the value of the CMsghdr#cmsg_type field.

cmsg_typeback to summary
public CMsghdr.Buffer cmsg_type(int value)

Sets the specified value to the CMsghdr#cmsg_type field.

getElementFactoryback to summary
protected CMsghdr getElementFactory()

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

Annotations
@Override
selfback to summary
protected CMsghdr.Buffer self()

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

Annotations
@Override