Unix Network Programming, Vol. 1
Those just starting in the field will eventually come across so many "Stevens book" references that it will eventually end up in their library. In a nutshell: Unix Network Programming is a must for anyone involved in writing network-enabled clients or server applications, requiring a variety of protocols.
The first edition of the book came out in 1990, and quickly became the college textbook and professional reference for anyone trying to get experience in the field. This is the third edition of first volume of Unix Network Programming, titled The Sockets Networking API. Volume 2 deals with Interprocess Communications and so far exists only in the 2nd edition. W. Richard Stevens didn't live to see the 3rd edition published, and the new book has Bill Fenner and Andrew M. Rudoff listed as co-authors.
The table of contents for Unix Network Programming provides a very good overview of what's packed into 31 chapters and 5 appendices that provide 950 pages of information on network programming (Addison Wesley states it's 1024 pages, but page 947 is the start of the bibliography, followed by an index which was designed by W. Richard Stevens himself for better usability). The book starts with the basics, with an introduction to network protocols and OSI model in chapters 1 and 2. The authors move on to socket programming (supporting TCP, UDP, and SCTP protocols), providing a working example of a TCP client-server application (Chapter 5) as well as SCTP client-server (Chapter 10). DNS service is covered in Chapter 10, with some additions dealing with IPv6 implementations.
The largest part of the book -- Advanced Sockets -- covers a wide range of technologies and generally it's not expected that you cover this part chapter by chapter. Chapter 12 would be of special use for anyone dealing with IPv4 and IPv6 implementations simultaneously. The authors provide an example of an IPv4 client working with an IPv6 server and vice versa. Then it proceeds to daemon processes, I/O operations on Unix, threads, raw sockets, advanced techniques for programming UDP and SCTP sockets, broadcasting and multicasting technologies, finishing off with the chapter on streams.
To avoid recapping the table of contents, it's worth mentioning that if you're an experienced network developer and have read previous editions of Stevens' book, you will find that that the book has been updated with IPv6 APIs and example code (including interoperation with IPv4 in aforementioned Chapter 12), information on the POSIX Single Unix Spec v3, a chapter on key management for IPsec (19), and three new chapters (9,10,23) on SCTP.
But wait a minute, what about the second edition, didn't it have 34 chapters, while this third one has only 31? Description of the XTI (X/Open Transport Interface) is gone, and that used to fill chapters 28,29,30,31 and 32 of the previous edition. The authors note that XTI API "has fallen out of common use and even the most recent POSIX specification does not bother to cover it." T/TCP (TCP for Transactions) is dropped as well, so if your applications still rely on either XTI or T/TCP, perhaps donating the 2nd edition to the local church library can wait.
The information above would be of interest to the professionals in the field, but what about the beginners? Can a reader expect to become proficient with developing network applications by absorbing Stevens' book? Unix Network Programming indeed makes a very good effort to be as inviting and simple as possible to the first-time reader, even while it is trying to be informative for those who've read the chapters several times. The authors generally start with the description of the solved problem, then specify the ways to solve the problem in English -- only after that do they introduce an example solution in C. The code is quite clean and universal to be re-used on Unix boxes with C++, Perl, etc. Where a proper OS function call is necessary, it's used with an explanation of what it does, and where the functionality asks for a new function, the authors introduce their own.
Don't let the word Unix in the title fool you into thinking that you will need a separate book for Win32 platform (or Linux, for that matter). Apparently, there are differences in OS-specific function calls, but as far as protocols and implementation of specific functionality, the book would provide useful examples for Microsoft developers as well. What about Apple Mac OS X? On page xxi the authors claim the code has been tested on Mac OS X on PowerPC, HP-UX 11i on PA-RISC, AIX 5.1 on PowerPC, FreeBSD 4.8 on x86, Linux 2.4.7 on x86, FreeBSD 5.1 on SPARC and Solaris 9 on SPARC.
If you're reading the book for the first time, but have been through a network class before, you might skip Chapters 1 and 2, where the basics of network interaction (port numbers, OSI model, Internet protocol suite, netstat command, TCP connections, etc.) are covered. It makes sense to peruse the starting chapters if you are not familiar with SCTP.
Since many colleges in the United States and around the world use this title for their network programming classes, a handful of exercises follows each chapter. The questions are not programming projects, just quick self-test opportunities, e.g. Chapter 18 (Routing Sockets) is followed by the question: "What would you expect the sdl_len field of a datalink socket address structure to contain for a device named eth10 whose link-layer address is a 64-bit IEEE EUI-64 address?"
Some of the things from Stevens' book (like the desire to write a wrapper function for everything) might drive you crazy, although if you accept the author's style and follow the textbook by typing up and trying the source code, you will end up with a rather nice API library for all occasions by the time you get through the first two parts. It would also certainly be nice if the book, despite the title, included at least an appendix on Windows-specific implementations for those developing clients for the Microsoft platform.
Unix Network Programming is indispensable if any part of your professional or academic career involves writing client-server applications or programs requiring network communications. A good knowledge of C and familiarity with Unix internals is required, while the book is gentle enough to provide good guidance for the beginner in the network programming field. As W. Richard Stevens' mentioned in one of the interviews, "When I hit something that I don't understand, I take a detour and learn something new. This often makes my books late by a few months, but I think accuracy and completeness are essential."
You can purchase Unix Network Programming, Vol. 1: The Sockets Networking API, Third Edition from bn.com. Slashdot welcomes readers' book reviews -- to submit a review for consideration, read the book review guidelines, then visit the submission page.
according to:
p ru g/29-1.html
http://www.roguewave.com/support/docs/hppdocs/t
An excellent introduction and reference for the various Unix C IPC mechanisms. Also famous as the book that the girl of Garth's dreams is carrying at the end of Wayne's World II.
What there ought to be is some sort of environment where developers can use a simple markup language to describe a GUI and have some easy to use hooks back to a server machine which could run some code and generate reports to be delivered back to the GUI.
If there were only some software to fill that gap...
I have been pwned because my
- TCP/IP Illustrated, Volume 1: The Protocols
- UNIX Network Programming
More information here - http://www.kohala.com/start/My mom never taught me to sign.
This is the best darn book on network programming bar none. I wore the covers off the 1990 edition I first owned and had to get it rebound.
Looking at the ToC on Amazon's page for this book, it says Stream Control Transmission Protocol, and is in the same chapter as TCP and UDP, implying it's a transport layer protocol. I've never heard of it. Anyone know of a decent tutorial page on it?
The One Rule Of Chess You'll Ever Need: Don't play someone who carries a kit in their bookbag.
Unix Network Programming is akin to reviewing the New Testament for a Christian audience, or The Elements of Style for English majors.
would it also be akin to reviewing Battlefield Earth for Scientologists?
I checked out the 2nd edition from my school's library (I'm surprised they have it). I currently don't have time to read it, so I'm aiming for racking up the most geeky and largest fine I can @ $0.10 per day, and there's a whole semester to go!
.. assuming this "Unix" thing ever takes off..
Xemu will get you for that.
...without the slashdot referral fee, from Amazon and B&N
I'm afraid you are too late. Having spent too much time without your protective gear, the Brainwave Ulterior Pattern and Knowledge Informational System (BUPKIS) has invaded your thoughts. You now only THINK you are wearing your hat when in fact you are on a CIA interrogation couch, drugged to the gills and hooked up to a machine that is busy fondling your deepest memories.
Of course, since you think you are content, does any of it matter? Isn't that good enough?
-removes his tinfoil hat-
I feel fortunate to have a signed first edition of the book. In 1993, while doing an internship at IBM and working on a sockets-related project, we brought Rich Stevens (how he signs his name) in to teach a two-day class. He had a knack for taking complicated subject matter and presenting it in an easy-to-understand, straightforward manner.
ref=sr_11_1/103-0663527-6482268
So, your referral fee is somehow better than Slashdots? For you maybe.
I have both this book and Microsoft's take on network coding. The Stevens book has been much more useful, and not just because I've needed to write Windows clients and Linux servers that interoperate. There aren't many differences between Windows Sockets and the BSD socket interface:
If you keep this info in mind, you can apply most of what's in the Stevens book under Win32 nearly as easily as you can under Linux/*BSD/whatever. You'll also end up with network code that's reasonably easy to port elsewhere...more so than if you go for a larger percentage of Microsoft-specific socket calls (many BSD-style calls have WSA* near-equivalents that you can use).
20 January 2017: the End of an Error.
I figured it out!
The original Matrix was so good that people started actually believeing that we are in a Matrix. In order to suppress those ideas, the Machines made sure that the two subsequent movies sucked so much ass that people would rebel against the truth-telling nature of the movies, and hence reject their message.
My god, the conspiracy grows... maybe it was AN AGENT that kill W. Richard Stevens to slow down would-be rebel hackers!!! Maybe Theo deRaddt is actually an Agent trying to harvest the best in human computer security ideas just to make their own systems un-crackable!!!
::shudder:: it boggles the mind... down right hurts to think of such things... and I think that pain is just further proof of a conspiracy... ouch
>>Old testament should be read for reference, or entertainment only ;-)
Just like a book on Unix Socket Programming
I would even go as far as to say a majority of of Christians is analphabetic.
how can the publishers get away with selling this book for 70$? the usual excuse for technical books being expensive is that they do not sell in large quantities, but that does not apply for this one. and it is the 3rd edition. and the last review consisted mainly in removing content...
Dev elpizw tipota, dev phoboumai tipota eimai lephteros http://euclidian.org
Is it better to read a book and not understand it than to not read it at all? I'd suggest that more problems stem from poor reading comprehension skills than from those who choose not to read the book at all.
This doesn't even begin to cover problems that stem from bad translations or translations based on a political agenda (the revered King James version is both). Most Americans who claim to have read the Bible are wrong--they've read someone's interpretation of it and think it's the same thing. Not that they would have fewer problems understanding the actual original texts, mind you. They're just reading biased and inaccurate accounts, and not even understanding THAT. That doesn't sound much different than not reading it, if you ask me.
Shame nobody stopped to mention that Rich Stevens passed away in 1999.
-psy
It has been years since I read this in college. I kept the book, and it is *somewhere*. Very useful. Very good for understanding how TCP/IP works because of the programming examples.
The most useless part? The portmapper and the r* commands. Why? Because, IMHO, the portmapper really is a stupid service in the modern world (aside from protocols which now depend on it). Almost nobody in their right mind makes those kind of services. But I suppose, for completeness sake, I'm glad it was in there.
Sounds exactly like a book I would like to buy.
/.
Good job on another quality book review
Often wrong but never in doubt.
I am Jack9.
Everyone knows me.
Dude, if you are writing high performance servers
P ostQueuedCompletionStatus(...)
:-)
in Win32 you are shit out of luck using the BSD
style calls. The only way to got on Win32 for
scalable performance is overlaped I/O on sockets.
The calls that should be of interest to you are things like:
AcceptEX(...)
GetQueuedCompletionStatus(...)
etc, etc. Totally non-portable but who cares
- Moomin
Apart from with Gentoy it seems. But then what do you expect of a peice of shit like Gentoy?
From the review:
W. Richard Stevens didn't live to see the 3rd edition published
never had a problem with windrivers? How long have you been using a computer? 10 minutes? Let me guess you bought a dell with everything configured for you...
It's surprising how many Christians don't read the New Testament (or Old, for that matter).
Here is the more common scenario in my experience (with Catholics, Baptists, non-denominational and other): While they read the bible, they start doing only do so years after forming their docterine, and then when the bible seems to contradict what they have learned they think that the bible itself is contradictory. They then ask someone more knowledgeable then them who provides some complicated tedium of doctorine, and reasures them that as long as they remember X, that the confusing details are not as important, and that even learned people like themselves have difficulty understanding the mysteries of the bible. This satisfies them but now they think that the bible is complicated, and are thus discouraged from reading it and are inclined to just read the "good" parts and breeze over the stuff that contradicts what they already "know". And eventually they become the "wise" person and the cycle starts again. In this way the bible becomes supplementary to some cultural teaching X, which often isn't biblical.
Note to moderators: this post is not off topic. Responding to what someone wrote is never off topic. No need to waste your mod points modding this up or down when it will already only be seen by those following the thread.
Of course you would, Lunix is designed to run on a C64.
It's also interesting that the church, instead of being the living body of the Christ, is a state-franchised religious organization instead. I wonder what Jesus would say about today's "realities" of funding (actually, I don't wonder. I KNOW what he would say!).
Mathew 5.17:
The Law of course being the law under which all that killing and such was undertaken.
The scripture comes from the sermon on the mount, often noted as the summation of the New Testament.
AC wins - fatality!!
What does phabetic mean?
Given a choice of Windows 95 and the latest and greatest GNU/LuniX distribution I would take Windows 95 anyday.
./configure and make and make install. They are far too complicated for people like you. Windows computers can even receive code from a stranger (in email)and compile it for you! As though that isn't friendly enough it can then make a copy of it's newfound code and e-mail that to all your friends. This is what people like you need (well, in addition to sterilization). Good luck with your Win 95 box. BTW, myself and most other Unix people I know get paid a wee bit better than free ;-)
Good point all these
Undoubtedly one of the best technical books that has ever been written. From the review: perhaps donating the 2nd edition to the local church library can wait. Also, if you happen to have the first edition of the book (or if you happen to lay your hands on one) don't give it away either. (Note: UNIX Network Programming, first edition was only a single volume edition). The first edition had an entire chapter on printer spooler application, which was not included in the second edition. (Please correct me if I am wrong...the application was definitely not in Vol I of second ed, but might have been included in Vol II, although I remember having looked for it in the 2nd edition and not finding it...I had to dig out a copy of the first edition from a Motorola warehouse...)
for sure
When i first saw the article, I thought - finally, the third volume. There were some rummors that Gary Wright, that was co-author in TCP/IP Illustrated Vol.2, was going to finish UNP vol.3....
... :)
I'd love to get this third edition, though... I was used to read UNPv1 before going to bed
Or you could just use Twisted and make it relatively easy ...
I use the book at work. Its been very very helpful. However its not for those new to programming, as it not always the clearest book although the most comprehensive I've found.
I also don't like his examples, which tend to use his own libraries which makes them more confusing.
Note that Vol II is IPC and is similarly useful/ challenging.
People get this mixed up alot. The poorly named (in my opinion) Networking Programing Vol II covers IPC(message que/shared memory....) Network programming Vol I covers sockets (udp/tcp etc).
I still think it funny the book is in waynes world..
Or in ebook? I'd love to have it with me all the time sans lugging the big book around. I'd gladly pay for the ebook.
Sigh, as misguided as this guy might be your treating him as a candidate for genocide shows the worst side of our little inbred commnuity. You're hurting the cause when you act like an ass. Quit it.
I think he hung himself. Might have been autoerotic, I dunno.
/. Apparently Stevens had said some not so nice thing about Perl and Linux and a few people took great joy in his death.
Most of the oldtime slashdot unix users are now gone, but when Stevens died it turned into probably the biggest flamefest up to that time on
... if this book is a SCO-code-free product... you can never be sure!
This book was already reviewed on Slashdot.
Okay, okay, that was five years ago (to the day!), but how much can really have changed?
:wq
dot.com go boom; ask my bank account. I can no longer afford this book. :(
Shut up shut up shut up I can't believe you don't shut up!
:)
L. Ron will _get_ you for that...
The old testament is more like a "dont do these things" text. I think it is there more as of a "now you can see why God can't just tell you what not to do".
And if you read it closely enough, I believe you will find they have much the same message, underneath.
emt 377 emt 4
In a nutshell: Unix Network Programming is a must for anyone involved in writing network-enabled clients or server applications
I thought the publisher was Addison-Whatever, not O'Reilly?
Yay me!
Heres an interesting article
about Stevens over at Salon.
I can tell you the meaning of life,
but you have to promise not to laugh.
I bought copies of Stevens "Unix Network Programming: Networking API's - Sockets and X11 Second Edition" and "Unix Network Programming: Interprocess Communications Second Edition". Information is very clearly presented. These are the books to read if you want to learn how TCP/IP works on Linux, Unix, MacOSX or even the lifted BSD code found in recent Microsoft systems (yep, they lifted the code from BSD when their own winsuck protocol was finally taken out and shot). Stevens work is more readable than RFC's but just as thorough. Too bad my university didn't use them.
it must take to think "why don't I write a review of one of Richard Stevens' programming books" is simply astounding.
Does just what you describe.
Do you know why illegal immigrants pick lettuce and run fast food stands? Because they don't qualify for welfare. Kick out the illegals and end welfare. I think you'll find there are plenty of white folks that could do that work once they're not paid to sit on their ass and watch jerry springer.
Do you even lift?
These aren't the 'roids you're looking for.
"Its way to complicated and its only free if your time is worth nothing."
Hmm, you know, now that you say it... My time is worth something, so hmm, Linux has given me a lot of money then with the large amount of time it has saved me.
Too complicated? No, not for me.
Linux is great and is making me rich!
Sorry y'all, but Stevens goofed with this series. He goes over bunches of "upcoming" APIs that just never up and came. Named semaphores? Really? What implementation of UNIX do you know with named semaphores? Come on. The last Stevens book on UNIX IPC and Sockets programming that's pretty universal is APUE.
But even his collection of vaporware APIs is not my biggest problem with this series. It's too long. Far too long. You buy it and think "wow, it's big, I've got a universal reference now." And if you're looking for a pedantic list of distinctions between UNIXes, maybe you have a reference. But if you're looking for that, just read the man pages! The good programming books are the short ones that guide you into your environment--<a href="http://cm.bell-labs.com/cm/cs/cbook/">The C Programming Language</a>; <a href="http://cm.bell-labs.com/cm/cs/upe/">The Unix Programming Environment</a>. Big unenlightening reference tomes of APIs are wastes of paper: the internet is constantly changing. Read the <a href="http://www.ietf.org/rfc.html">RFC</a>' s. That's how you learn how the internet works.
Don't get me wrong. Stevens wrote some good books. APUE is a pretty solid reference (though also <i>too big</i>). TCP/IP Illustrated vol 1 is a really good text for conveying the ideas of networking and the internet protocol -- how they really work. But this series: I don't see it being enlightening to anyone.
philcrissman.com.
Yeah, something like: Don't ever create a programming "language" anything like this.
I took a quick glance at your recent posts; tell me, are these your real opinions, or do you troll for a living? :-)
philcrissman.com.
More reviews of this book.
Stevens ain't dead. The first rule to eternal life is you have to die.
Stevens will forever live. the first step to eternal life is you have to die.