summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-02-19 04:24:17 +0000
committerbors <bors@rust-lang.org>2023-02-19 04:24:17 +0000
commit89fb7bf0e6f0c3f7ea4ff7fe5a14a3909f9b9298 (patch)
treeba986b68d4535ff86079224019af2e07b36a2b1b
parent586883b42ccbd17b362b7091e4f2c7a5def8e313 (diff)
parentdb7e3d51af08aef6e98b1bcbb567eca0f8869097 (diff)
downloadrust-libc-89fb7bf0e6f0c3f7ea4ff7fe5a14a3909f9b9298.tar.gz
Auto merge of #3121 - devnexen:fbsd_sctp4, r=JohnTitor
freebsd further sctp support.
-rw-r--r--libc-test/semver/freebsd.txt25
-rw-r--r--src/unix/bsd/freebsdlike/freebsd/mod.rs46
2 files changed, 71 insertions, 0 deletions
diff --git a/libc-test/semver/freebsd.txt b/libc-test/semver/freebsd.txt
index 681818cf3f..33442a4b11 100644
--- a/libc-test/semver/freebsd.txt
+++ b/libc-test/semver/freebsd.txt
@@ -1097,6 +1097,7 @@ SCTP_ADDR_MADE_PRIM
SCTP_ADDR_REMOVED
SCTP_ADDR_UNREACHABLE
SCTP_ADDR_OVER
+SCTP_ASCONF_SUPPORTED
SCTP_ASSOCINFO
SCTP_ASSOC_RESET_DENIED
SCTP_ASSOC_RESET_FAILED
@@ -1117,6 +1118,7 @@ SCTP_AUTH_KEY
SCTP_AUTH_NEWKEY
SCTP_AUTH_NEW_KEY
SCTP_AUTH_NO_AUTH
+SCTP_AUTH_SUPPORTED
SCTP_AUTOCLOSE
SCTP_AUTO_ASCONF
SCTP_CANT_STR_ASSOC
@@ -1127,25 +1129,34 @@ SCTP_CONTEXT
SCTP_CURRENT_ASSOC
SCTP_DATA_SENT
SCTP_DATA_UNSENT
+SCTP_DEFAULT_PRINFO
SCTP_DEFAULT_SEND_PARAM
+SCTP_DEFAULT_SNDINFO
SCTP_DELAYED_SACK
SCTP_DISABLE_FRAGMENTS
SCTP_DSTADDRV4
SCTP_DSTADDRV6
+SCTP_ECN_SUPPORTED
SCTP_EOF
SCTP_EOR
+SCTP_EVENT
SCTP_EVENTS
SCTP_EXPLICIT_EOR
SCTP_EXTRCV
SCTP_FRAGMENT_INTERLEAVE
SCTP_FUTURE_ASSOC
+SCTP_GET_ASSOC_ID_LIST
+SCTP_GET_ASSOC_NUMBER
+SCTP_GET_PEER_ADDR_INFO
SCTP_HMAC_IDENT
SCTP_INACTIVE
SCTP_INIT
SCTP_INITMSG
SCTP_I_WANT_MAPPED_V4_ADDR
+SCTP_LOCAL_AUTH_CHUNKS
SCTP_MAXBURST
SCTP_MAX_BURST
+SCTP_MAX_CWND
SCTP_MAXSEG
SCTP_NEXT_MSG_AVAIL
SCTP_NEXT_MSG_ISCOMPLETE
@@ -1154,11 +1165,16 @@ SCTP_NEXT_MSG_IS_UNORDERED
SCTP_NODELAY
SCTP_NOTIFICATION
SCTP_NO_NEXT_MSG
+SCTP_NRSACK_SUPPORTED
SCTP_NXTINFO
SCTP_PARTIAL_DELIVERY_ABORTED
SCTP_PARTIAL_DELIVERY_POINT
SCTP_PEER_ADDR_PARAMS
+SCTP_PEER_ADDR_THLDS
+SCTP_PEER_AUTH_CHUNKS
+SCTP_PKTDROP_SUPPORTED
SCTP_PRIMARY_ADDR
+SCTP_PR_ASSOC_STATUS
SCTP_PR_SCTP_ALL
SCTP_PR_SCTP_BUF
SCTP_PR_SCTP_MAX
@@ -1166,9 +1182,14 @@ SCTP_PR_SCTP_NONE
SCTP_PR_SCTP_PRIO
SCTP_PR_SCTP_RTX
SCTP_PR_SCTP_TTL
+SCTP_PR_STREAM_STATUS
+SCTP_REMOTE_UDP_ENCAPS_PORT
SCTP_RESTART
SCTP_REUSE_PORT
SCTP_PRINFO
+SCTP_RECONFIG_SUPPORTED
+SCTP_RECVNXTINFO
+SCTP_RECVRCVINFO
SCTP_RECVV_NOINFO
SCTP_RECVV_NXTINFO
SCTP_RECVV_RCVINFO
@@ -1188,12 +1209,14 @@ SCTP_SET_PEER_PRIMARY_ADDR
SCTP_SHUTDOWN_COMP
SCTP_SNDINFO
SCTP_SNDRCV
+SCTP_STATUS
SCTP_STREAM_CHANGE_DENIED
SCTP_STREAM_CHANGE_FAILED
SCTP_STREAM_RESET_DENIED
SCTP_STREAM_RESET_FAILED
SCTP_STREAM_RESET_INCOMING_SSN
SCTP_STREAM_RESET_OUTGOING_SSN
+SCTP_TIMEOUTS
SCTP_UNCONFIRMED
SCTP_UNORDERED
SCTP_USE_EXT_RCVINFO
@@ -2039,10 +2062,12 @@ sctp_pdapi_event
sctp_peeloff
sctp_prinfo
sctp_rcvinfo
+sctp_recvv
sctp_recvv_rn
sctp_remote_error
sctp_sender_dry_event
sctp_send_failed_event
+sctp_sendv
sctp_sendv_spa
sctp_shutdown_event
sctp_sndinfo
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs
index b9ae561764..e69c32ad9e 100644
--- a/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -4587,6 +4587,30 @@ pub const SCTP_CONTEXT: ::c_int = 0x0000001a;
pub const SCTP_EXPLICIT_EOR: ::c_int = 0x00000001b;
pub const SCTP_REUSE_PORT: ::c_int = 0x00000001c;
pub const SCTP_AUTH_DEACTIVATE_KEY: ::c_int = 0x00000001d;
+pub const SCTP_EVENT: ::c_int = 0x0000001e;
+pub const SCTP_RECVRCVINFO: ::c_int = 0x0000001f;
+pub const SCTP_RECVNXTINFO: ::c_int = 0x00000020;
+pub const SCTP_DEFAULT_SNDINFO: ::c_int = 0x00000021;
+pub const SCTP_DEFAULT_PRINFO: ::c_int = 0x00000022;
+pub const SCTP_PEER_ADDR_THLDS: ::c_int = 0x00000023;
+pub const SCTP_REMOTE_UDP_ENCAPS_PORT: ::c_int = 0x00000024;
+pub const SCTP_ECN_SUPPORTED: ::c_int = 0x00000025;
+pub const SCTP_AUTH_SUPPORTED: ::c_int = 0x00000027;
+pub const SCTP_ASCONF_SUPPORTED: ::c_int = 0x00000028;
+pub const SCTP_RECONFIG_SUPPORTED: ::c_int = 0x00000029;
+pub const SCTP_NRSACK_SUPPORTED: ::c_int = 0x00000030;
+pub const SCTP_PKTDROP_SUPPORTED: ::c_int = 0x00000031;
+pub const SCTP_MAX_CWND: ::c_int = 0x00000032;
+
+pub const SCTP_STATUS: ::c_int = 0x00000100;
+pub const SCTP_GET_PEER_ADDR_INFO: ::c_int = 0x00000101;
+pub const SCTP_PEER_AUTH_CHUNKS: ::c_int = 0x00000102;
+pub const SCTP_LOCAL_AUTH_CHUNKS: ::c_int = 0x00000103;
+pub const SCTP_GET_ASSOC_NUMBER: ::c_int = 0x00000104;
+pub const SCTP_GET_ASSOC_ID_LIST: ::c_int = 0x00000105;
+pub const SCTP_TIMEOUTS: ::c_int = 0x00000106;
+pub const SCTP_PR_STREAM_STATUS: ::c_int = 0x00000107;
+pub const SCTP_PR_ASSOC_STATUS: ::c_int = 0x00000108;
pub const SCTP_COMM_UP: ::c_int = 0x0001;
pub const SCTP_COMM_LOST: ::c_int = 0x0002;
@@ -5314,6 +5338,28 @@ extern "C" {
arg: *mut ::c_void,
size: *mut ::socklen_t,
) -> ::c_int;
+ pub fn sctp_sendv(
+ sd: ::c_int,
+ iov: *const ::iovec,
+ iovcnt: ::c_int,
+ addrs: *mut ::sockaddr,
+ addrcnt: ::c_int,
+ info: *mut ::c_void,
+ infolen: ::socklen_t,
+ infotype: ::c_uint,
+ flags: ::c_int,
+ ) -> ::ssize_t;
+ pub fn sctp_recvv(
+ sd: ::c_int,
+ iov: *const ::iovec,
+ iovcnt: ::c_int,
+ from: *mut ::sockaddr,
+ fromlen: *mut ::socklen_t,
+ info: *mut ::c_void,
+ infolen: *mut ::socklen_t,
+ infotype: *mut ::c_uint,
+ flags: *mut ::c_int,
+ ) -> ::ssize_t;
}
#[link(name = "memstat")]