The socket option "SCTP_DELAYED_ACK_TIME" is not available on FreeBSD-14.0-CURRENT-amd64-20230615, even though it is mentioned in the manual. Instead, you can use SCTP_DELAYED_SACK. I believe this is an error in the manual and needs to be replaced. Here's an example of the error: struct sctp_sack_info sackInfo; socklen_t sackInfo_len = (socklen_t) sizeof(sackInfo); memset(&sackInfo, 0, sackInfo_len); sackInfo.sack_assoc_id = sackAssocId; sackInfo.sack_delay = sackDelay; sackInfo.sack_freq = sackFreq; if (setsockopt(fd, IPPROTO_SCTP, SCTP_DELAYED_ACK_TIME, &sackInfo, sackInfo_len) == -1) { perror("SCTP_DELAYED_ACK_TIME"); exit(EXIT_FAILURE); } error: use of undeclared identifier 'SCTP_DELAYED_ACK_TIME' ^ Instead, the following approach works: if (setsockopt(fd, IPPROTO_SCTP, SCTP_DELAYED_SACK, &sackInfo, sackInfo_len) == -1) { perror("SCTP_DELAYED_SACK"); exit(EXIT_FAILURE); }
The SCTP_DELAYED_ACK_TIME socket option was replaced by the SCTP_DELAYED_SACK in the socket API specification in draft-ietf-tsvwg-sctpsocket-14. base r170056 changed the code, but missed updating the man page.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=133b132bc1b612abe591c8f54680c3da8491e194 commit 133b132bc1b612abe591c8f54680c3da8491e194 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2023-06-21 07:03:30 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2023-06-21 07:18:05 +0000 sctp: fix man page for socket option controlling delayed acks The SCTP_DELAYED_ACK_TIME socket option was replaced by the SCTP_DELAYED_SACK in the socket API specification in draft-ietf-tsvwg-sctpsocket-14. The code was updated in r170056, but the man page was not. PR: 272124 MFC after: 3 days share/man/man4/sctp.4 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=a820d8fa71e8f17a0bfc399b6716f42f077dfcce commit a820d8fa71e8f17a0bfc399b6716f42f077dfcce Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2023-06-21 07:03:30 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2023-06-25 19:24:46 +0000 sctp: fix man page for socket option controlling delayed acks The SCTP_DELAYED_ACK_TIME socket option was replaced by the SCTP_DELAYED_SACK in the socket API specification in draft-ietf-tsvwg-sctpsocket-14. The code was updated in r170056, but the man page was not. PR: 272124 (cherry picked from commit 133b132bc1b612abe591c8f54680c3da8491e194) share/man/man4/sctp.4 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
Thanks for reporting. Closing since the fix is in main and stable/13.