Bug 275990 - sctp: restrict mismatch between manpages and headers
Summary: sctp: restrict mismatch between manpages and headers
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Michael Tuexen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-29 01:09 UTC by Lexi Winter
Modified: 2024-05-02 13:22 UTC (History)
2 users (show)

See Also:
tuexen: mfc-stable14+
tuexen: mfc-stable13+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lexi Winter 2023-12-29 01:09:52 UTC
while improving the sctp manpages, i noticed that sctp_recvmsg is declared like this in the manpage:

     ssize_t
     sctp_recvmsg(int s, void *msg, size_t len,
         struct sockaddr * restrict from, socklen_t * restrict fromlen,
         struct sctp_sndrcvinfo *sinfo, int *flags);

however, in <netinet/net_uio.h> it's declared like this:

ssize_t 
sctp_recvmsg(int, void *, size_t, struct sockaddr *, socklen_t *,
    struct sctp_sndrcvinfo *, int *);

either restrict should be removed from the manpage, or it should be added to the header.  i can submit a patch for either of those options (as i'm working on the manpages anyway) but i'm not sure which is correct.

RFC 6458 doesn't include restrict in the declaration.
Comment 1 Lexi Winter 2023-12-29 01:17:51 UTC
that should be <netinet/sctp_uio.h>, not <netinet/net_uio.h>.
Comment 2 Lexi Winter 2023-12-29 17:50:04 UTC
related pull request: https://github.com/freebsd/freebsd-src/pull/965
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-05-02 13:20:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=eee88ef45f78d7f9996a740c2a554bc6e8496114

commit eee88ef45f78d7f9996a740c2a554bc6e8496114
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2024-05-02 13:17:43 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2024-05-02 13:17:43 +0000

    sctp: document sctp_recvmsg as implemented

    PR:             275990
    MFC after:      3 days

 lib/libc/net/sctp_recvmsg.3 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)