linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Woods <Kazrak+kernel@cesmail.net>
To: "Robert P. J. Day" <rpjday@mindspring.com>
Cc: C programming list <linux-c-programming@vger.kernel.org>
Subject: Re: canonical byte swap macros?
Date: Sun, 10 Jul 2005 20:48:37 -0600	[thread overview]
Message-ID: <6.2.3.4.0.20050710204229.03f0a628@no.incoming.mail> (raw)
In-Reply-To: <Pine.LNX.4.63.0507102100500.9524@localhost.localdomain>

Howdy.

At 7/10/2005 21:02 -0400, Robert P. J. Day wrote:
>is there a standard set of byte swap macros/functions for doing 
>big/little endian conversion?  i have no interest in re-inventing 
>the wheel and i'm sure there's a universally-recognized set of 
>macros for this, no?

The most common case where a programmer cares about byte-order is 
networking code.  Thus "man 3 byteorder" says:

>>htonl, htons, ntohl, ntohs - convert values between host and 
>>network byte order

according to http://tinyurl.com/9c8hu which redirects to
http://linux.com.hk/PenguinWeb/manpage.jsp?name=byteorder&section=3

--
Jeff Woods <kazrak+kernel@cesmail.net> 


  reply	other threads:[~2005-07-11  2:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-11  1:02 canonical byte swap macros? Robert P. J. Day
2005-07-11  2:48 ` Jeff Woods [this message]
2005-07-11 19:23 ` Glynn Clements
2005-07-11 19:44 ` Steve Graegert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6.2.3.4.0.20050710204229.03f0a628@no.incoming.mail \
    --to=kazrak+kernel@cesmail.net \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=rpjday@mindspring.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).