On Wed, Aug 19, 1998 at 10:54:52AM +1000, Hamish Moffatt wrote:
> On Tue, Aug 18, 1998 at 08:46:20AM -0400, Stephen J. Carpenter wrote:
> > currently xfstt bombs out if it gets a connection of a differnt 
> > "endianess" than the system it is on...I have been meaning to fix that but
> > maybe the PowerPC may have an easier fix...
> > nah...ill just look into fixing it "right"
> 
> Ouch.. use htons(), htonl(), ntohs(), ntohl() to convert; you don't
> have to know what endianness the machine is you're using, you rely
> on libc knowing and implementing those functions appropriately.

well...
thats the problem...
htons et al are empty functions on big-endian systems and thge situation
actually requires they perform the swap because in this case endian-ness
matters and sending it in "Network order" is NOT apropriate unless
"Network Order" is the same as host order on the client.

see teh problem?
if the other side doesn't ntoh the data then it doesn't work ;)

-Steve

-- 
/* -- Stephen Carpenter <[EMAIL PROTECTED]> --- <[EMAIL PROTECTED]>------------ 
*/
E-mail "Bumper Stickers":
"A FREE America or a Drug-Free America: You can't have both!"
"honk if you Love Linux"

Attachment: pgpump2lR501D.pgp
Description: PGP signature

Reply via email to