From owner-freebsd-chat Sat Oct 27 12: 9: 6 2001 Delivered-To: freebsd-chat@freebsd.org Received: from swan.prod.itd.earthlink.net (swan.mail.pas.earthlink.net [207.217.120.123]) by hub.freebsd.org (Postfix) with ESMTP id 9555737B405 for ; Sat, 27 Oct 2001 12:08:59 -0700 (PDT) Received: from dialup-209.247.143.45.dial1.sanjose1.level3.net ([209.247.143.45] helo=mindspring.com) by swan.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 15xYpG-0006L3-00; Sat, 27 Oct 2001 12:08:58 -0700 Message-ID: <3BDB0680.E8714908@mindspring.com> Date: Sat, 27 Oct 2001 12:09:52 -0700 From: Terry Lambert Reply-To: tlambert2@mindspring.com X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Fabio Miranda Cc: freebsd-chat@FreeBSD.org Subject: Re: offtopic: c questions References: <20011027181836.26603.qmail@web11505.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Fabio Miranda wrote: > > hi, I am freebsd user, i want to know: > 1. I would like to understand network byte ordering > concepts. I know some machines are "little endian" and > "big endian", and tcpip provides a standard called > network ordering throught htonl, htons,etc fuctions. > I want to know How does look like bigendians and > network byte ordering?, how can i know if i am in a > little or bigendian host? It has to do with whether the most significant bit of a multibyte value is in the first byte or the last byte, when a multibyte value is converted to a stream of bytes on a network transport. It is a corruption of whether you put "the big end in to the pipe first, or the little end in", combined with a joke on the English similarity in pronunciation between the word pair "end in" and the word "Indian" -- hence the use of the "a" in the contration: "endian" instead of "endin". Network byte order is Motorolla byte order, which is the opposite of that of the x86 architecture. > 2. I am student of computer science, but at my > university noone use freebsd or code bsd socket, so, > i am doing this by my own, but it's hard, i read > commer book about tcpip, but, i dont understand the > concepts, i have printed almost all freebsd man > related to sockets. I would like to know what way did > you guy follow to understand tpcip understand unix?, i > dont have money to buy a book at amazon, but, is that > the only way? can't i understand unix tcpip > programming with free resources? Read the Richard Stevens books instead of the Comer book. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message