From owner-freebsd-chat Sun Oct 28 11:58:45 2001 Delivered-To: freebsd-chat@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 885) id DEC3737B408; Sun, 28 Oct 2001 11:58:41 -0800 (PST) Date: Sun, 28 Oct 2001 11:58:41 -0800 From: Eric Melville To: Fabio Miranda Cc: freebsd-chat@FreeBSD.org Subject: Re: offtopic: c questions Message-ID: <20011028115841.A8117@FreeBSD.org> References: <20011027181836.26603.qmail@web11505.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011027181836.26603.qmail@web11505.mail.yahoo.com>; from fmirand@yahoo.com on Sat, Oct 27, 2001 at 11:18:36AM -0700 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 > 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 should not matter. Simply call hton* before putting data on the network, and call ntoh* after pulling data off the network. These functions will take care of the details for you. If you are simply interested in this information, you could run these functions on some place holder values and examine the results. > 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? "Unix Network Programming" by W R Stevens comes as very recommended. If you're just looking for something cheap and quick, you may want to take a look at http://www.ecst.csuchico.edu/~beej/guide/net/ , but this guide is of no comparison to a real book. Also, the guide relies on certain broken aspects of linux header files, but with grep(1) in hand you should be able to work around that. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message