Check out the pair of functions htonl() and ntohl() which are part of the sockets library. If you need to flip port numbers, you can use htons() and ntohs().

(By the way, your little-endian'ness is due to your x86 hardware, not Linux. Linux runs on big-endian systems also.)


On Nov 23, 2003, at 8:48 PM, Srilekha Krishnamurthy wrote:


But this function stores the ip address in
big endian format and I need to store this in little
endian format as it is linux box.

______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]

Reply via email to