Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Oct 2001 11:58:41 -0800
From:      Eric Melville <eric@FreeBSD.org>
To:        Fabio Miranda <fmirand@yahoo.com>
Cc:        freebsd-chat@FreeBSD.org
Subject:   Re: offtopic: c questions
Message-ID:  <20011028115841.A8117@FreeBSD.org>
In-Reply-To: <20011027181836.26603.qmail@web11505.mail.yahoo.com>; from fmirand@yahoo.com on Sat, Oct 27, 2001 at 11:18:36AM -0700
References:  <20011027181836.26603.qmail@web11505.mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011028115841.A8117>