Afficher un message
Vieux 18/05/2007, 07h09   #11
Jorgen Grahn
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Why Ping Requires RAW Sockets?

On Wed, 16 May 2007 09:27:54 -0400, Roy Smith <roy@panix.com> wrote:
....
> The Berkeley Socket API is so ubiquitous that people tend to think it's the
> only way of doing things. In fact, many people find it difficult to
> differentiate in their minds the protocol from the API. Many of the things
> people think they know about the IP protocols are really things they know
> about the BSAPI.
>
> One of my favorite interview questions for somebody who claims "expert
> knowledge of TCP/IP" or some such silliness on their resume is to ask them
> to sketch out both sides of a trivial TCP client-server application on the
> whiteboard. It usually takes a few hints, but eventually they converge on
> something like socket/bind/listen/accept/read on one side and
> socket/connect/write on the other. Then I draw them two timelines and ask
> them to show me all the packets that go on the wire, starting with the TCP
> three-way handshake. The good ones usually do that OK too. Then I ask
> them to correlate each system call in the application skeletons they just
> wrote with each packet that went out on the wire. That's where the fun
> usually begins.


And that's why I like Stevens' TCP/IP Illustrated vol 1 better than his
UNIX Network Programming vol 1.

It took me many years to realize that I understood BSD sockets better
in terms of the protocols it tries (semi-successfully) to hide, than
in terms of the API itself.

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org> R'lyeh wgah'nagl fhtagn!
  Réponse avec citation
 
Page generated in 0,06420 seconds with 9 queries