Page MenuHomeFreeBSD

Add a missing manual page for the API of socket control message routines for ancillary data access (e.g., CMSG_DATA)

Authored by 0mp on Apr 27 2018, 3:14 PM.



It looks like FreeBSD is missing a manual page for macros defined in sys/sys/socket.h. The man page is present for example in Linux as cmsg(3) and in OpenBSD as CMSG_DATA(3). There's also a nice blog post about FreeBSD SCTP ancillary data by Tsvetomir Dimitrov.

Here's a manual page for CMSG_DATA based on the OpenBSD one. It looks like it does not need much tweaking as the presented information are true on FreeBSD as well. I've added cross references to related manpages and RFCs.

I am not sure about the example though. It does not define all the required variables. To make it less confusing for new users (such as me) I consolidated those OpenBSD examples into one working, compile-and-run example.

Bugzilla: 227777

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

0mp created this revision.Apr 27 2018, 3:14 PM
0mp updated this revision to Diff 41952.Apr 28 2018, 3:22 PM

Replace void * with unsigned char * in the synopsis of CMSG_DATA.

0mp added a reviewer: eadler.May 27 2018, 12:35 AM
0mp updated this revision to Diff 45523.Jul 19 2018, 9:55 AM

Reupload the patch using arcanist.

mat accepted this revision as: mat.Jul 19 2018, 11:57 AM
mat added a subscriber: mat.

accepted as your mentor, still need approval from man/src.

This revision is now accepted and ready to land.Jul 19 2018, 11:57 AM
0mp updated this revision to Diff 46125.Aug 1 2018, 12:30 PM

Fix the order of the MAN list in share/man/man3/Makefile.

This revision now requires review to proceed.Aug 1 2018, 12:30 PM
0mp added a reviewer: bcr.Aug 10 2018, 8:51 PM
bcr added a comment.Aug 11 2018, 9:17 AM

In general, if you change content in a man page (like links), you need to bump the document date (.Dd at the top of the file) to the date of the commit (once it's approved).
If the man page you were importing from another system has local changes that are in FreeBSD only (like examples), you also need to bump the .Dd.
Can you do that for all the man pages in this review? Thank you for doing the work on this man page.

0mp updated this revision to Diff 46882.Aug 18 2018, 10:16 AM

Bump date.

bcr accepted this revision.Aug 18 2018, 5:38 PM

OK from manpages.

This revision is now accepted and ready to land.Aug 18 2018, 5:38 PM
eadler accepted this revision.Aug 18 2018, 6:17 PM
This revision was automatically updated to reflect the committed changes.
0mp added a comment.Aug 19 2018, 5:43 PM

Thank you for your reviews :)