All of lore.kernel.org
 help / color / mirror / Atom feed
From: gmate.amit@gmail.com (Kumar amit mehta)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Network Byte order not reached reading from a sock RAW
Date: Mon, 15 Oct 2012 01:28:52 -0700	[thread overview]
Message-ID: <20121015082852.GA4870@gmail.com> (raw)
In-Reply-To: <56AB56EAD87AF24C803FB693654D7A89CB08A9@adbbexch01.adbitaly.com>

On Mon, Oct 15, 2012 at 07:46:08AM +0000, Pietro Paolini wrote:
> Hello,
> Thanks for your answer, my question is why when I read from the buffer data is already in host byte order and not in network byte order.
> Thanks 
> Pietro Paolini.
>
Hi Pietro,

The host doesn't care how the data has travelled over wire, he will store that 
data in memory according to it's own hardware architecture. As an application 
programmer, __you__ have to take care of this and to make your job easier, you
already have those ntoh* hton* APIs or your POSIX compliant OS.

-Amit

  reply	other threads:[~2012-10-15  8:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-12 16:04 Network Byte order not reached reading from a sock RAW Pietro Paolini
2012-10-13  3:30 ` Mandeep Sandhu
2012-10-15  7:46   ` Pietro Paolini
2012-10-15  8:28     ` Kumar amit mehta [this message]
2012-10-15  8:32     ` Mandeep Sandhu
2012-10-16 13:12       ` Pietro Paolini
2012-10-17  5:18         ` Mandeep Sandhu

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=20121015082852.GA4870@gmail.com \
    --to=gmate.amit@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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.