On Thu, Jan 02, 2020 at 11:59:42AM -0600, Brian Wood wrote:
>    Shalom
> 
> I have these lines:
> #ifdef __linux__
> #include<linux/sctp.h> 
> #else
> #include<netinet/sctp.h>
> #endif
> 
> in this program:
> https://github.com/Ebenezer-group/onwards/blob/master/src/cmw/tiers/cmwA.cc 
> 
> I'd like to see that reduced to simply one line for both
> FreeBSD, Linux, etc.  By the grace of G-d I've managed
> to trim that program down to 218 lines. If I could get
> this, it would remove 4 more lines.   I'm not sure how to
> get the ball rolling on this though?  Thanks in advance.  

Hi Brian

I had to do a bit of research...

Stream Control Transmission Protocol is defined in
https://tools.ietf.org/html/rfc4960

It describes the Stream Control Transmission Protocol (SCTP).  SCTP is
designed to transport Public Switched Telephone Network (PSTN)
signaling messages over IP networks, but is capable of broader
applications.

SCTP is a reliable transport protocol operating on top of a
connectionless packet network such as IP.  It offers the following
services to its users:

https://tools.ietf.org/html/rfc6458 defines the Socket API
extensions. But it does not state what header files should be called.
The examples do however make use of netinet/sctp.h.

After a quick search, i could not find any standard which covers the
header file names. So it does seems to be a implementation dependent.
But maybe there is some ISO/IEC Telecommunication Standard which
covers this? Do you know of any?

I think your best way forward is to submit a patch to glibc which
makes netinet/sctp.h include linux/sctp.h. Argue that rfc6458 suggests
this, and it is a backwards compatible change so won't hurt anything,
and is compatible with other some other libc implementations.

	 Andrew