Class IOURingCloneBuffers

All Implemented Interfaces:
AutoCloseable, NativeResource, Pointer

public class IOURingCloneBuffers extends Struct<IOURingCloneBuffers> implements NativeResource

 struct io_uring_clone_buffers {
     __u32 src_fd;
     __u32 flags;
     __u32 src_off;
     __u32 dst_off;
     __u32 nr;
     __u32 pad[3];
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • SRC_FD

      public static final int SRC_FD
      The struct member offsets.
    • FLAGS

      public static final int FLAGS
      The struct member offsets.
    • SRC_OFF

      public static final int SRC_OFF
      The struct member offsets.
    • DST_OFF

      public static final int DST_OFF
      The struct member offsets.
    • NR

      public static final int NR
      The struct member offsets.
    • PAD

      public static final int PAD
      The struct member offsets.
  • Constructor Details

    • IOURingCloneBuffers

      public IOURingCloneBuffers(ByteBuffer container)
      Creates a IOURingCloneBuffers 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 Details

    • sizeof

      public int sizeof()
      Description copied from class: Struct
      Returns sizeof(struct).
      Specified by:
      sizeof in class Struct<IOURingCloneBuffers>
    • src_fd

      public int src_fd()
      Returns:
      the value of the src_fd field.
    • flags

      public int flags()
      Returns:
      the value of the flags field.
    • src_off

      public int src_off()
      Returns:
      the value of the src_off field.
    • dst_off

      public int dst_off()
      Returns:
      the value of the dst_off field.
    • nr

      public int nr()
      Returns:
      the value of the nr field.
    • src_fd

      public IOURingCloneBuffers src_fd(int value)
      Sets the specified value to the src_fd field.
    • flags

      public IOURingCloneBuffers flags(int value)
      Sets the specified value to the flags field.
    • src_off

      public IOURingCloneBuffers src_off(int value)
      Sets the specified value to the src_off field.
    • dst_off

      public IOURingCloneBuffers dst_off(int value)
      Sets the specified value to the dst_off field.
    • nr

      public IOURingCloneBuffers nr(int value)
      Sets the specified value to the nr field.
    • set

      public IOURingCloneBuffers set(int src_fd, int flags, int src_off, int dst_off, int nr)
      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

      public static IOURingCloneBuffers malloc()
      Returns a new IOURingCloneBuffers instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static IOURingCloneBuffers calloc()
      Returns a new IOURingCloneBuffers instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static IOURingCloneBuffers create()
      Returns a new IOURingCloneBuffers instance allocated with BufferUtils.
    • create

      public static IOURingCloneBuffers create(long address)
      Returns a new IOURingCloneBuffers instance for the specified memory address.
    • createSafe

      public static @Nullable IOURingCloneBuffers createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static IOURingCloneBuffers.Buffer malloc(int capacity)
      Returns a new IOURingCloneBuffers.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static IOURingCloneBuffers.Buffer calloc(int capacity)
      Returns a new IOURingCloneBuffers.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static IOURingCloneBuffers.Buffer create(int capacity)
      Returns a new IOURingCloneBuffers.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static IOURingCloneBuffers.Buffer create(long address, int capacity)
      Create a IOURingCloneBuffers.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      public static @Nullable IOURingCloneBuffers.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static IOURingCloneBuffers malloc(MemoryStack stack)
      Returns a new IOURingCloneBuffers instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static IOURingCloneBuffers calloc(MemoryStack stack)
      Returns a new IOURingCloneBuffers instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static IOURingCloneBuffers.Buffer malloc(int capacity, MemoryStack stack)
      Returns a new IOURingCloneBuffers.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static IOURingCloneBuffers.Buffer calloc(int capacity, MemoryStack stack)
      Returns a new IOURingCloneBuffers.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nsrc_fd

      public static int nsrc_fd(long struct)
      Unsafe version of src_fd().
    • nflags

      public static int nflags(long struct)
      Unsafe version of flags().
    • nsrc_off

      public static int nsrc_off(long struct)
      Unsafe version of src_off().
    • ndst_off

      public static int ndst_off(long struct)
      Unsafe version of dst_off().
    • nnr

      public static int nnr(long struct)
      Unsafe version of nr().
    • npad

      public static IntBuffer npad(long struct)
    • npad

      public static int npad(long struct, int index)
    • nsrc_fd

      public static void nsrc_fd(long struct, int value)
      Unsafe version of src_fd.
    • nflags

      public static void nflags(long struct, int value)
      Unsafe version of flags.
    • nsrc_off

      public static void nsrc_off(long struct, int value)
      Unsafe version of src_off.
    • ndst_off

      public static void ndst_off(long struct, int value)
      Unsafe version of dst_off.
    • nnr

      public static void nnr(long struct, int value)
      Unsafe version of nr.
    • npad

      public static void npad(long struct, IntBuffer value)
    • npad

      public static void npad(long struct, int index, int value)