All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@bfk.de>
To: Kevin Wilson <wkevils@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: ntohs() and htons() usgae in the network stack
Date: Wed, 10 Jun 2009 16:10:16 +0200	[thread overview]
Message-ID: <823aa8ch87.fsf@mid.bfk.de> (raw)
In-Reply-To: <55c333c0906100708q1b0be2ffkc80c2f3258f0e681@mail.gmail.com> (Kevin Wilson's message of "Wed\, 10 Jun 2009 17\:08\:12 +0300")

* Kevin Wilson:

> So I wondered : when is ntohs(i) != htons(i) ?

Never, for ordinary endieanness.  The operation is an involution, that
is, its own inverse (like mirroring).

-- 
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

  reply	other threads:[~2009-06-10 14:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-10 14:08 ntohs() and htons() usgae in the network stack Kevin Wilson
2009-06-10 14:10 ` Florian Weimer [this message]
2009-06-10 14:24 ` Ben Hutchings

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=823aa8ch87.fsf@mid.bfk.de \
    --to=fweimer@bfk.de \
    --cc=netdev@vger.kernel.org \
    --cc=wkevils@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.