Subject: Re: Preprocessor constants indicated SCTP is available?

From: "La Monte Henry Piggy Yarroll" <[email-masked]>
Date: Fri, 01 Nov 2002 06:20:56 -0600

On Thu, 31 Oct 2002 09:00:59 -0600, "Randall Stewart (cisco)" <[email-masked]> w
rote:
> La Monte:
> 
> I jive with most of your items but I do have  questions:
> 
> _POSIX_SCTP_ESP
> _POSIX_SCTP_IPAH - supports RFC2402 IP Authentication Header??,
> _POSIX_SCTP_ISAKMP - supports RFC2408 ISAKMP??,
> _POSIX_SCTP_IKE
> 
> How in the world are these SCTP things... if the O/S supports 
> ESP/IPAH/IKE etc is
> this not an issue with the underlying O/S?

I've never used any of these, so I didn't know if there were any
direct interactions with the transport layer.  They are all listed
explicitly in RFC2960.

> I also assume that :
> 
> _POSIX_SCTP_SAFE_MAC - MAC secret key is cryptographic (RFC1750),
> 
> means that you are using a SHA-1 or MD5 type  encrytpt on the cookies?
> Or do you mean it to mean we are using Good random numbers in pciking
> the INIT-TSN and VTAG?

This one should have had a smiley :-) on it too.  It just means the
implementation uses Good random numbers picking INIT-TSN and VTAG.

You had no question about _POSIX_SCTP_SMALL_COOKIE?  :-)

> R
> 
> La Monte Henry Piggy Yarroll wrote:
> 
> >May I suggest the somewhat presumptuous _POSIX_SCTP?  We should also
> >define _POSIX_SCTP_PRSCTP, _POSIX_SCTP_ADDIP, and similar symbols for
> >any optional features in the RFC. 
> >
> >A quick scan of the MAY clauses shows mostly minor behavioral and
> >implementation options.  The only ones I can IMAGINE being useful to
> >an application writer are:
> >
> >_POSIX_SCTP_BUNDLING		- supports outbound bundling,
> >_POSIX_SCTP_FRAGMENTATION	- supports outbound fragmentation,
> >_POSIX_SCTP_ESP			- supports IP Encapsulating Security Payload,
> >_POSIX_SCTP_ECN			- supports Explicit Congestion Notification,
> >
> >A quick scan of SHOULD clauses turns up:
> >
> >_POSIX_SCTP_HOSTNAME		- can generate HOSTNAME-based INITs,
> >_POSIX_SCTP_SMALL_COOKIE	- implementation generates a small cookie :-),
> >_POSIX_SCTP_RESTART		- generates RESTART notifications,
> >_POSIX_SCTP_DELAYED_ACK		- implements delayed ACK,
> >_POSIX_SCTP_GAP_ACK		- will generate SACK GAP ACK blocks,
> >_POSIX_SCTP_DUP			- will generate SACK DUP reports,
> >_POSIX_SCTP_REVOCATION		- can revoke GAP ACKd DATA,
> >_POSIX_SCTP_GAP_DISABLES_DACK	- GAP reports disable delayed ACK,
> >_POSIX_SCTP_PATH_FAILURE	- generates notification on path failure,
> >_POSIX_SCTP_IPAH		- supports RFC2402 IP Authentication Header??,
> >_POSIX_SCTP_ISAKMP		- supports RFC2408 ISAKMP??,
> >_POSIX_SCTP_IKE			- supports RFC2409 Internet Key Exchange??,
> >_POSIX_SCTP_SAFE_MAC		- MAC secret key is cryptographic (RFC1750),
> >
> >On Thu, 31 Oct 2002 11:55:17 +0100, Tuexen Michael <[email-masked]>
> > wrote:
> >  
> >
> >>Dear all,
> >>
> >>we use a constant 
> >>
> >>HAVE_KERNEL_SCTP
> >>
> >>to handle the case where an kernel implementation of SCTP is
> >>available. If not our userland implementation is used.
> >>
> >>It would be nice if kernel implementations could define
> >>such a constant such we are able to provide SCTP services 
> >>in userland if no kernel services are available.
> >>
> >>However, it is not a big deal, but it would simplify things.
> >>
> >>Best regards
> >>Michael
> >>
> >>Michael Tuexen   Tel.:   +49 89 722 47210
> >>Siemens AG       Fax:    +49 89 722 48212
> >>ICN WN CC SE 7   e-mail: [email-masked]
> >>
> >>    
> >>
> >>>-----Original Message-----
> >>>From: Randall Stewart (cisco) [mailto:[email-masked]]
> >>>Sent: Wednesday, October 30, 2002 9:28 PM
> >>>To: Craig Rodrigues
> >>>Cc: [email-masked]
> >>>Subject: Re: Preprocessor constants indicated SCTP is available?
> >>>
> >>>
> >>>Craig:
> >>>
> >>>Good question... maybe we should have some standard
> >>>
> >>>SCTP_IS_PRESENT
> >>>
> >>>defined in a standard place.. such as sctp.h
> >>>
> >>>in lieu of this for the Apache APR work that I have been 
> >>>assiting in.. 
> >>>what they
> >>>did is fix their configure.in to generate a small program to do a
> >>>
> >>>sd = socket(...,IPPROTO_SCTP);
> >>>
> >>>and if it did NOT error it defines a apr.h variable
> >>>
> >>>#define HAVE_SCTP 1
> >>>
> >>>else if sd == -1
> >>>
> >>>#define HAVE_SCTP 0
> >>>
> >>>That way a
> >>>
> >>>#if HAVE_SCTP
> >>>
> >>>....
> >>>
> >>>#endif
> >>>
> >>>could be done in apache code..
> >>>
> >>>R
> >>>
> >>>Craig Rodrigues wrote:
> >>>
> >>>      
> >>>
> >>>>Hi,
> >>>>
> >>>>What preprocessor constants do the various SCTP implementations use
> >>>>to indicate the presence of SCTP on a platform?
> >>>>
> >>>>If I want to have a piece of code that optionally compiles in SCTP
> >>>>stuff it is available on some platform, I'd like to do 
> >>>>        
> >>>>
> >>>something like:
> >>>      
> >>>
> >>>>#include <unistd.h>
> >>>>#include <sys/socket.h>
> >>>>
> >>>>#ifdef SCTP_AVAILABLE
> >>>>
> >>>> sctp code here
> >>>>
> >>>>#endif
> >>>>
> >>>>
> >>>>The POSIX standard uses this approach.  For example, on a 
> >>>>        
> >>>>
> >>>POSIX compliant
> >>>      
> >>>
> >>>>system, if you #include <unistd.h>, constants like
> >>>>_POSIX_REALTIME_SIGNALS, _POSIX_THREADS, etc. will get defined
> >>>>if those features are available on a system.
> >>>>
> >>>>Thanksable on a system.
> >>>>
> >>>>Thanks
> >>>> 
> >>>>
> >>>>        
> >>>>
> >>>-- 
> >>>Randall R. Stewart
> >>>ITD
> >>>Cisco Systems Inc.
> >>>[email-masked] 815-342-5222(cell) or 815-477-2127(office)
> >>>
> >>>
> >>>
> >>>      
> >>>
> >
> >  
> >
> 
> 
> -- 
> Randall R. Stewart
> ITD
> Cisco Systems Inc.
> [email-masked] 815-342-5222(cell) or 815-477-2127(office)
> 
> 
>

---

From: Schruefer Wolfgang <[email-masked]>
Date: Mon, 4 Nov 2002 11:36:41 +0100

Hi, 

I am not so long in this business to know whether this suggestion is stupid or not,  
but can anybody tell me why the value of a #define is not used for additional information?

My idea is to put the year of the standard or draft to which the implementation tries to comply to as value behind the symbol. This would enable us for the next centuries to add or change something without the usage of new #define symbols.

E.g. if an application wants to use a future parameter it may use:

#if _HAVE_SCTP_xxx > 2003

Thanks!

Viele Gruesse
Wolfgang