Ard Biesheuvel wrote:


[My apologies if you think I'm taking this too far]


What about nuking the ipbox altogether and doing

sin->sin_addr.s_addr = b[0] << 24 | b[1] << 16 | b[2] << 8 | b[3];
sin->sin_port = (unsigned short)(b[4] << 8 | b[5]);

(and using int[] instead of long int[] for b, so it will not generate any warnings unless sizeof(int) > 4)

OK, I typed before thinking (again)


Obviously, this reintroduces the byte order issue.

Please disregard,

--
Ard

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to