home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!torn!nott!bnrgate!bcars664!leibniz!walt
- From: walt@bcarh1d7.bnr.ca (Walt Sullivan)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: What is htonl() ?
- Message-ID: <WALT.93Jan4095659@bcarh1d7.bnr.ca>
- Date: 4 Jan 93 14:56:58 GMT
- References: <72250@cup.portal.com>
- Sender: news@bcars664.bnr.ca
- Distribution: world
- Organization: Bell-Northern Research, Ottawa, Canada
- Lines: 26
- In-reply-to: Counsellor@cup.portal.com's message of 23 Dec 92 07:10:38 GMT
-
- >>>>> "Benjamin" == Benjamin Counsellor Reich <Counsellor@cup.portal.com> writes:
-
- Benjamin> I am writing a program based on another's source code.
-
- Benjamin> I am stumped by one line of code:
-
- Benjamin> *lmark = htonl(*lmark);
-
- htonl() is a byte-reordering function that converts an unsigned
- long quantity (32 bits) from host byte order to network byte order.
-
- If the host and network byte orders are the same for your application,
- you could:
-
- #define htonl(l) l
-
- Other byte-reordering functions are:
- htons() host-to-network-short
- ntohl() network-to-host-long
- ntohs() network-to-host-short
-
- --
- Walt Sullivan
- INTERNET: walt@bnr.ca (work)
- UUCP: walt@orbit.ocunix.on.ca (home)
- FIDO: 1:163/109.4
-