> > 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) > > > hontl will generate a long which.... once again.... has a platform dependant length.
It may, however, work to put a struct in_addr in there (which would always have proper size and avoid byte order issues). Let me play with that a bit. -Sara -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php