On Sat, Oct 19, 2002 at 02:17:49PM +0300, Angelin Lazarov Lalev wrote:
> I need to convert some bytes, which are not an internet address, from 
> machine to network byte order (described in RFC1700). I could do it 
> mannualy, assuming a I386 (or some other) architecture, but then my code 
> will be a lot less portable. Is there any function in libc or somewhere 
> else which will do that conversion for me (and will be updated when new 
> architecture is added)?

htonl(3), ntohl(3), htons(3) and ntohs(3) seems to be exactly what you
need.


-- 
<Insert your favourite quote here.>
Erik Trulsson
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to