Skip to content

Commit

Permalink
freebsd further sctp support.
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Feb 18, 2023
1 parent e401a59 commit db7e3d5
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
25 changes: 25 additions & 0 deletions libc-test/semver/freebsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,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
Expand All @@ -1116,6 +1117,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
Expand All @@ -1126,25 +1128,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
Expand All @@ -1153,21 +1164,31 @@ 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
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
Expand All @@ -1187,12 +1208,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
Expand Down Expand Up @@ -2038,10 +2061,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
Expand Down
46 changes: 46 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4586,6 +4586,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;
Expand Down Expand Up @@ -5311,6 +5335,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")]
Expand Down

0 comments on commit db7e3d5

Please sign in to comment.