@@ -697,6 +697,29 @@ impl Default for IoringRestrictionOp {
697
697
}
698
698
}
699
699
700
+ /// `SOCKET_URING_OP_*` constants which represent commands for use with
701
+ /// [`IoringOp::SetSockOpt`].
702
+ #[ derive( Debug , Clone , Copy , Eq , PartialEq , Hash ) ]
703
+ #[ repr( u32 ) ]
704
+ #[ non_exhaustive]
705
+ pub enum IoringSocketOp {
706
+ /// `SOCKET_URING_OP_SIOCINQ`
707
+ Siocinq = sys:: io_uring_socket_op:: SOCKET_URING_OP_SIOCINQ as _ ,
708
+ /// `SOCKET_URING_OP_SIOCOUTQ`
709
+ Siocoutq = sys:: io_uring_socket_op:: SOCKET_URING_OP_SIOCOUTQ as _ ,
710
+ /// `SOCKET_URING_OP_GETSOCKOPT`
711
+ Getsockopt = sys:: io_uring_socket_op:: SOCKET_URING_OP_GETSOCKOPT as _ ,
712
+ /// `SOCKET_URING_OP_SETSOCKOPT`
713
+ Setsockopt = sys:: io_uring_socket_op:: SOCKET_URING_OP_SETSOCKOPT as _ ,
714
+ }
715
+
716
+ impl Default for IoringSocketOp {
717
+ #[ inline]
718
+ fn default ( ) -> Self {
719
+ Self :: Siocinq
720
+ }
721
+ }
722
+
700
723
/// `IORING_MSG_*` constants which represent commands for use with
701
724
/// [`IoringOp::MsgRing`], (`seq.addr`)
702
725
#[ derive( Debug , Clone , Copy , Eq , PartialEq , Hash ) ]
@@ -1469,6 +1492,8 @@ pub union len_union {
1469
1492
#[ derive( Copy , Clone ) ]
1470
1493
pub union addr3_or_cmd_union {
1471
1494
pub addr3 : addr3_struct ,
1495
+ pub optval : io_uring_ptr ,
1496
+ pub path : io_uring_ptr ,
1472
1497
pub cmd : [ u8 ; 0 ] ,
1473
1498
}
1474
1499
@@ -1509,9 +1534,19 @@ pub union addr_or_splice_off_in_union {
1509
1534
pub addr : io_uring_ptr ,
1510
1535
pub splice_off_in : u64 ,
1511
1536
pub msgring_cmd : IoringMsgringCmds ,
1537
+ pub sockopt_level_optname : sockopt_level_optname_struct ,
1512
1538
pub user_data : io_uring_user_data ,
1513
1539
}
1514
1540
1541
+ #[ allow( missing_docs) ]
1542
+ #[ repr( C ) ]
1543
+ #[ derive( Copy , Clone ) ]
1544
+ #[ non_exhaustive]
1545
+ pub struct sockopt_level_optname_struct {
1546
+ pub level : u32 ,
1547
+ pub optname : u32 ,
1548
+ }
1549
+
1515
1550
#[ allow( missing_docs) ]
1516
1551
#[ repr( C ) ]
1517
1552
#[ derive( Copy , Clone ) ]
@@ -1542,6 +1577,7 @@ pub union op_flags_union {
1542
1577
pub uring_cmd_flags : IoringUringCmdFlags ,
1543
1578
pub futex_flags : FutexWaitvFlags ,
1544
1579
pub install_fd_flags : IoringFixedFdFlags ,
1580
+ pub socket_op : IoringSocketOp ,
1545
1581
}
1546
1582
1547
1583
#[ allow( missing_docs) ]
@@ -1559,6 +1595,7 @@ pub union splice_fd_in_or_file_index_or_addr_len_union {
1559
1595
pub splice_fd_in : i32 ,
1560
1596
pub file_index : u32 ,
1561
1597
pub addr_len : addr_len_struct ,
1598
+ pub optlen : u32 ,
1562
1599
}
1563
1600
1564
1601
#[ allow( missing_docs) ]
0 commit comments