Re: Network Byte order not reached reading from a sock RAW

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux