Re: cvs commit: squid/src tools.c

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Mon, 21 May 2007 16:29:25 +0200

sön 2007-05-20 klockan 23:53 -0600 skrev Adrian Chadd:

> use inet_ntoa() for now; my optimised code was getting the octets backward
> on my PPC; even when I tried using ntohl(). I'll fix this one day..

ntohl is a nop on PPC and other big-endian systems..

You need to parse the address in host order, then use htonl to mangle it
into the common network byte order..

Or alternatively parse it raw into network byte order by using a char*.

Regards
Henrik

Received on Mon May 21 2007 - 08:29:36 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Jun 01 2007 - 12:00:09 MDT