EmbeddedRelated.com
Books

UNIX Network Programming

Stevens, W. Richard 1990

The leading book in its field, this guide focuses on the design, development and coding of network software under the UNIX operating system. Provides over 15,000 lines of C code with descriptions of how and why a given solution is achieved. For programmers seeking an indepth tutorial on sockets, transport level interface (TLI), interprocess communications (IPC) facilities under System V and BSD UNIX.


Why Read This Book

You should read this book if you need a rigorous, example-driven reference for writing networked software on UNIX-like systems — it explains sockets, IPC, and transport behavior in clear C examples so you can build reliable network services for embedded Linux and other UNIX targets. The book combines design reasoning with thousands of lines of tested C code, making it both a learning text and a long-term reference.

Who Will Benefit

Experienced firmware or embedded Linux engineers and systems programmers who write networked applications, daemons, or IPC code and want a deep, practical reference.

Level: Advanced — Prerequisites: Comfortable C programming, basic UNIX command-line and process model familiarity, and an understanding of TCP/IP fundamentals.

This book is currently unavailable on Amazon. Try searching for it on Amazon or your preferred bookseller.

Key Takeaways

  • Implement TCP and UDP client and server code using the BSD sockets API
  • Apply address translation, byte-ordering, and name-resolution correctly in networked programs
  • Use nonblocking I/O, select/poll and I/O multiplexing to build scalable network services
  • Employ System V and BSD IPC mechanisms (pipes, FIFOs, message queues, semaphores, shared memory)
  • Diagnose common network programming pitfalls and handle errors, signals, and resource cleanup robustly
  • Adapt networked code across UNIX variants and understand transport-level interface (TLI) considerations

Topics Covered

  1. Introduction to UNIX network architecture and APIs
  2. Byte ordering, data representation, and address structures
  3. BSD sockets: creating, binding, listening, accepting
  4. TCP client and server programming patterns
  5. UDP and datagram programming
  6. Name and address conversion, DNS basics
  7. I/O multiplexing: select(), poll(), and nonblocking I/O
  8. Advanced socket options, performance and tuning
  9. Raw sockets, multicast and low-level networking
  10. Interprocess communication: pipes, FIFOs, message queues, semaphores, shared memory
  11. Transport Level Interface (TLI) and System V networking
  12. Practical examples, debugging, and portability considerations

Languages, Platforms & Tools

CUNIXBSDSystem VLinuxEmbedded Linux (applies)POSIX/BSD sockets APITLIgcc / makestandard UNIX build/debug tools (gdb, tcpdump, strace)

How It Compares

More thorough and example-driven than Beej's Guide to Network Programming (which is a friendlier tutorial); complements Stevens' TCP/IP Illustrated for protocol internals by focusing on programming APIs and practical code.

Related Books

Bryant, Randal, O'Hallaron,...