|
From: | Michael Tuexen |
Subject: | Re: Initial SCTP support for the upcoming 1.6.5 release |
Date: | Mon, 16 Aug 2004 12:42:16 +0200 |
Dear all, see my comments below. Best regards Michael On Aug 16, 2004, at 2:40 AM, Kevin Ryde wrote:
Michael Tuexen <address@hidden> writes:Is there a possibility to include #ifdef SOCK_SEQPACKET scm_c_define ("SOCK_SEQPACKET", SCM_MAKINUM (SOCK_SEQPACKET)); #endifI imagine so.
Great.
/* protocol numbers */ #ifdef IPPROTO_SCTP scm_c_define ("IPPROTO_SCTP", SCM_MAKINUM (IPPROTO_SCTP)); #endif #ifdef IPPROTO_TCP scm_c_define ("IPPROTO_TCP", SCM_MAKINUM (IPPROTO_TCP)); #endif #ifdef IPPROTO_UDP scm_c_define ("IPPROTO_UDP", SCM_MAKINUM (IPPROTO_UDP)); #endifNo, I think "man 5 protocols" advises using /etc/protocols, not hard coding numbers.
Hmm. I have not seen code with does that for the last argument of a socket() call. Normally 0 is used, which means 'select whatever is appropiate'. For port numbers using a function call is common, especially if the user can specify a name on the command line. Please note that these numbers are IANA registered numbers and you do not have a choice. But it is your decision to include it or not.
[Prev in Thread] | Current Thread | [Next in Thread] |