๐”– Scriptorium
โœฆ   LIBER   โœฆ

๐Ÿ“

The Definitive Guide to Linux Network Programming

โœ Scribed by Keir Davis, John Turner, Nathan Yocom


Publisher
Apress
Year
2004
Tongue
English
Leaves
380
Series
Expert's Voice
Edition
1
Category
Library

โฌ‡  Acquire This Volume

No coin nor oath required. For personal study only.

โœฆ Synopsis


Skimpy coverage, the code compiles with a bazillion warnings, and for me at least the first client/server examples just plain don't work and don't provide useful enough error messages to figure out. It's not until you get to a much later chapter that you learn about debugging techniques that might help. This debugging information should either have been moved forward within the book, or should have been forward-referenced from the first example. Additionally the book repeats the same information over and over again, for instance in any example that calls for the use of the INADDR_ANY constant, the author explains what it stands for each and every time. This sort of repetition is simply not acceptable in a book fancying itself as somehow "definitive" yet only 300 or so pages. Furthermore, rather than covering ins and outs of actual network programming, far too much is devoted to the basics of various protocols (the first 20+% of the book), and/or security specifically (the last 20+% of the book). A better title for this book would be Linux Network Programming Fundamentals, and as such this would warrant 4 stars, maybe even 5 if it taught debugging earlier. As a Definitive Guide though it is a 2 at best; if you want truly definitive, albeit regarding Unix generally and not necessarily Linux, Stevens' "Unix Network Programming" series is the real deal.

โœฆ Table of Contents


Contents at a Glance......Page 4
Contents......Page 5
Introduction......Page 12
Circuits vs. Packets......Page 19
Internetworking......Page 20
Ethernets......Page 22
Ethernet Frames......Page 23
Ethernet Addresses......Page 24
Gateways......Page 26
Internet Addresses......Page 28
Internet Protocol......Page 33
Protocol Layering......Page 36
Protocol Layer Models......Page 38
User Datagram Protocol......Page 41
Transmission Control Protocol......Page 43
The Client-Server Model......Page 47
The Domain Name System......Page 49
Summary......Page 55
What Is a Socket?......Page 57
Using Sockets......Page 59
Socket Constants......Page 60
Address Structure......Page 63
Using Socket Functions......Page 65
Summary......Page 79
User Datagram Protocol......Page 80
UDP Server......Page 81
UDP Client......Page 85
File Transfer......Page 88
The Server......Page 89
The Client......Page 94
Example File Transfer Session......Page 97
Error Handling......Page 98
Summary......Page 99
State vs. Stateless......Page 100
Methods for Maintaining State......Page 102
Storing State on the Server......Page 103
Storing State on the Client......Page 105
Stateless Server Walk-through......Page 108
Stateful Server Walk-through......Page 109
Summary......Page 111
Client Test Program......Page 113
The select() Function......Page 116
A Multiplexing Server......Page 118
Forking......Page 122
One Process Per Client......Page 123
Preforking: Process Pools......Page 128
Multithreading......Page 132
A Multithreaded Server......Page 133
Combining Preforking and Prethreading......Page 142
Nonblocking Sockets......Page 144
Putting It All Together......Page 146
Summary......Page 149
What Is a Protocol?......Page 150
What Will the Message Format Be?......Page 151
Will the Server Be Passive or Active?......Page 152
Will the Protocol Be Sessioned or Sessionless?......Page 153
What About Privacy?......Page 154
Client Commands......Page 155
Server Messages......Page 159
Our Chat Protocol in Action......Page 162
The /etc/services File......Page 163
Service Entry Functions......Page 164
Summary......Page 166
Reliability......Page 167
Overhead......Page 168
Established vs. Custom......Page 169
Two-Tier Architecture......Page 170
Three-Tier Architecture......Page 171
Monolithic Client......Page 173
Server-Side Considerations......Page 174
Daemonizing......Page 175
Logging......Page 177
Privilege Dropping......Page 180
chroot() Jails......Page 183
Summary......Page 184
netstat......Page 185
Ethereal......Page 186
gdb......Page 188
Chicken or the Egg......Page 189
Debug Statements......Page 190
Respect Buffer Limits......Page 191
Expect the Unexpected......Page 193
Fail Gracefully, But Not Silently......Page 194
Summary......Page 195
The Server......Page 196
The Client......Page 212
chatcli.h......Page 214
chatcli.cpp......Page 215
logindlg.h......Page 220
logindlg.cpp......Page 221
chatwin.h......Page 222
chatwin.cpp......Page 223
Makefile......Page 236
Recommendations for Improvements......Page 237
Summary......Page 238
Securing Network Communication......Page 240
Tunneling......Page 241
Tunneling with OpenSSH......Page 242
Tunneling with Stunnel......Page 243
Symmetric Key Cryptography......Page 244
Asymmetric Key Cryptography......Page 245
Certificates......Page 246
OpenSSL Functions and Structures......Page 251
File Descriptor Association......Page 257
BIO Connection Handling......Page 262
Thread-safe Programming with OpenSSL......Page 264
Compiling and Running the Example......Page 268
Summary......Page 269
The Old Scenario......Page 270
The Present-Day Scenario......Page 271
The Conversation Function......Page 272
Creating a PAM-Aware Application......Page 275
Public Key Authentication......Page 277
Using Signed Data for Authentication......Page 278
Single Sign-on......Page 287
Summary......Page 288
Common Attacks......Page 289
Functions to Avoid and Their Alternatives......Page 290
Error Handling......Page 294
Memory Management......Page 296
Worst-Case Scenarios......Page 300
Shared Memory and Variable Scope......Page 301
Random Number Generation......Page 304
Compiler Add-ons......Page 305
Code Analysis Tools......Page 306
Summary......Page 307
Process Method......Page 308
Security Model......Page 309
The Protocol......Page 310
Common Code Library......Page 311
The Client......Page 325
The Server......Page 334
Running the Client and Server......Page 341
Flawfinder Audit......Page 342
Future Improvements and Enhancements......Page 343
Summary......Page 346
IPv6......Page 347
IPv6 Addressing......Page 348
IPv6 and Linux......Page 350
Porting to IPv6......Page 351
IPv6 Server......Page 353
IPv6 Client......Page 356
Address Conversion Functions......Page 358
Future Enhancements......Page 360
Summary......Page 364
Index......Page 366


๐Ÿ“œ SIMILAR VOLUMES


The Definitive Guide to Linux Network Pr
โœ Keir Davis, John W. Turner, Nathan Yocum ๐Ÿ“‚ Library ๐Ÿ“… 2008 ๐Ÿ› Packt ๐ŸŒ English

Apress' The Definitive Guide to Linux Network Programming is a clear, concise treatment of creating clients and servers under the Linux operating system. The book assumes that the reader knows C and has experience developing code on Linux, but provides everything else a programmer needs for real-wor

The Definitive Guide to Linux Network Pr
โœ Keir Davis, John W. Turner, Nathan Yocom (auth.) ๐Ÿ“‚ Library ๐Ÿ“… 2004 ๐Ÿ› Apress ๐ŸŒ English

<p><p><i>The Definitive Guide to Linux Network Programming</i> offers a clear, concise treatment of creating clients and servers under the Linux operating system. This book assumes that you know C and have experience developing code on Linux, but it provides everything else you'll need as a programm

The Definitive Guide to Linux Network Pr
โœ Keir Davis, John Turner, Nathan Yocom ๐Ÿ“‚ Library ๐Ÿ“… 2004 ๐Ÿ› Apress ๐ŸŒ English

Apress' The Definitive Guide to Linux Network Programming is a clear, concise treatment of creating clients and servers under the Linux operating system. The book assumes that the reader knows C and has experience developing code on Linux, but provides everything else a programmer needs for real-wor

The Self-Taught Programmer: The Definiti
โœ Cory Althoff ๐Ÿ“‚ Library ๐Ÿ“… 2016 ๐Ÿ› Self-Taught Media ๐ŸŒ English

I am a self-taught programmer. After a year of self-study, I learned to program well enough to land a job as a software engineer II at eBay. Once I got there, I realized I was severely under-prepared. I was overwhelmed by the amount of things I needed to know but hadn't learned yet. My journey learn

The Self-Taught Programmer: The Definiti
โœ Cory Althoff ๐Ÿ“‚ Library ๐Ÿ“… 2016 ๐Ÿ› Self-Taught Media ๐ŸŒ English

I am a self-taught programmer. After a year of self-study, I learned to program well enough to land a job as a software engineer II at eBay. Once I got there, I realized I was severely under-prepared. I was overwhelmed by the amount of things I needed to know but hadn't learned yet. My journey learn