SCTP Discussions

Text archives Help


Re: [SCTP-Discussion] Strings vs. Sockunion (was: Is the timer_li st initialised?)


Chronological Thread 
  • From: Marc Boucher <marc+sctp AT mbsi.ca>
  • To: discussion AT sctp.de
  • Subject: Re: [SCTP-Discussion] Strings vs. Sockunion (was: Is the timer_li st initialised?)
  • Date: Fri Apr 6 11:50:03 2001
  • List-id: SCTP Discussions <discussion.sctp.de>

On Fri, Apr 06, 2001 at 11:00:41AM +0200, Schruefer Wolfgang wrote:
> Hello Andreas and all,
>
> there are two things you should consider about the Windows portability.
>
> 1) Even the line "#include <winsock2.h>" is a portability mismatch.

what about simply transfering responsability for including system-specific
IP-stack headers before <sctp.h> to the application?

> 2) "sockaddr_in" sounds similar, but is indeed different for Windows and
> UNIX:
>
> Example to provide the IP-Address:
>
> WINDOWS:
> su->sin.sin_addr.S_un.S_addr = inet_addr(str);

my copy of <winsock2.h> contains:

#define s_addr S_un.S_addr


> UNIX:
> su->sin.sin_addr.s_addr = inet_addr(str);

so this should work under windows too

Marc




Archive powered by MHonArc 2.6.19+.

Top of page