Subject: Re: Network socket application problem
To: Joe Magee <jmagee@starrider.com>
From: Geoff Wing <gcw@pobox.com>
List: netbsd-help
Date: 09/27/2002 17:12:53
Joe Magee <jmagee@starrider.com> typed:
:Geoff: The htons() had no effect.

That's luck if it works.  Presumably you're on a big endian machine (or
otherwise has byte order the same as network order).

sin_port should always be set using htons()
sin_addr.s_addr should always be set using htonl() - though inet_addr()
will do it for you.

:                                  I suspected it wouldn't since this code
:compiles and runs on a linux/i386 system.

Regards,
-- 
Geoff Wing : <gcw@pobox.com>
Rxvt Stuff : <gcw@rxvt.org>
Zsh Stuff  : <gcw@zsh.org>