Closed jailbird777 closed 2 years ago
LIBSCTP_LD
didn't seem to be actually used at the top-level, so I removed it there.
If you don't like the SOL_SCTP
hack, I can change the #ifndef
to actually do the getprotoname()
lookup.
(Context: from discussion on IRC; various system headers (and lksctp-tools) define IPPROTO_SCTP
to the same value)
Unlike Linux, Solaris, and Illumos (and probably others), the 2 BSDs that still support SCTP didn't put SCTP into its own library; they put it into libc.
They, unlike Linux, don't set
SOL_SCTP
for us. The official method appears to be callinggetprotobyname("sctp")
&endprotoent()
, withgetprotobyname()
returning a struct that has ap_proto
entry. This all reads from/etc/protocols
. However, SCTP is assigned 132 by IANA, so it's 132 everywhere, so I just setSOL_SCTP
to 132 if it's not already set.