Movatterモバイル変換


[0]ホーム

URL:


man7.org > Linux >man-pages

Linux/UNIX system programming training


io_uring_prep_cmd(3) — Linux manual page

NAME |SYNOPSIS |DESCRIPTION |Available commands |NOTES |RETURN VALUE |ERRORS |SEE ALSO |COLOPHON

io_uring_prep_cmd(3)         liburing Manualio_uring_prep_cmd(3)

NAME        top

       io_uring_prep_cmd_sock - prepare a command request for a socket

SYNOPSIS        top

#include <liburing.h>void io_uring_prep_cmd_sock(struct io_uring_sqe *sqe,intcmd_op,intfd,intlevel,intoptname,void*optval,intoptlen);

DESCRIPTION        top

       Theio_uring_prep_cmd_sock(3) function prepares an cmd request for       a socket. The submission queue entrysqe is setup to use the       socket file descriptor pointed to byfd to start an command       operation defined bycmd_op.       This is a generic function, and each command has their own       individuallevel, optname, optval values.  The optlen defines the       size pointed byoptval.

Available commands        top

SOCKET_URING_OP_SIOCINQ              Returns the amount of queued unread data in the receive              buffer.  The socket must not be in LISTEN state, otherwise              an error-EINVALis returned in the CQEres field.  The              following arguments are not used for this commandlevel,optname, optval andoptlen.              Negative return value means an error.              For more information about this command, please checkunix(7).              Available since 6.7.SOCKET_URING_OP_SIOCOUTQ              Returns the amount of unsent data in the socket send queue.              The socket must not be in LISTEN state, otherwise an error-EINVALis returned in the CQEres.  field.  The following              arguments are not used for this commandlevel, optname,optval andoptlen.              Negative return value means an error.              For more information about this command, please checkunix(7).SOCKET_URING_OP_GETSOCKOPT              Command to get options for the socket referred to by the              socket file descriptorfd.  The arguments are similar to              thegetsockopt(2) system call.              TheSOCKET_URING_OP_GETSOCKOPTcommand is limited toSOL_SOCKETlevel.              Differently from thegetsockopt(2) system call, the updatedoptlen value is returned in the CQEres field, on success.              On failure, the CQEres contains a negative error number.SOCKET_URING_OP_SETSOCKOPT              Command to set options for the socket referred to by the              socket file descriptorfd.  The arguments are similar to              thesetsockopt(2) system call.              Available since 6.7.

NOTES        top

       The memory block pointed byoptval needs to be valid/live until       the CQE returns.

RETURN VALUE        top

       Dependent on the command.

ERRORS        top

       The CQEres field will contain the result of the operation.

SEE ALSO        top

io_uring_get_sqe(3),io_uring_submit(3),io_uring_register(2),unix(7)

COLOPHON        top

       This page is part of theliburing (A library for io_uring)       project.  Information about the project can be found at        ⟨https://github.com/axboe/liburing⟩.  If you have a bug report for       this manual page, send it to io-uring@vger.kernel.org.  This page       was obtained from the project's upstream Git repository       ⟨https://github.com/axboe/liburing⟩ on 2025-08-11.  (At that time,       the date of the most recent commit that was found in the       repository was 2025-08-02.)  If you discover any rendering       problems in this HTML version of the page, or you believe there is       a better or more up-to-date source for the page, or you have       corrections or improvements to the information in this COLOPHON       (which isnot part of the original manual page), send a mail to       man-pages@man7.orgliburing-2.5                  July 27, 2023io_uring_prep_cmd(3)

Pages that refer to this page:io_uring_prep_cmd(3)



HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface.

For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere.

Hosting byjambit GmbH.

Cover of TLPI


[8]ページ先頭

©2009-2025 Movatter.jp