This eBook requires the free Adobe® Digital Editions software.
Before downloading this DRM-encrypted PDF, be sure to:
This book teaches readers how to program Linux sockets, and gives them everything they need to know to make programs communicate effetively over networks.
It presents a comprehensive discussion of all relevant topics including: writing programs compatible with both Internet Protocol version 4 (IPv4) and IPv6, raw sockets, User Datagram Protocol (UDP), broadcasting /multicasting, server internals, and more, plus a section covering Posix threads.
It provides thorough coverage of programming with the TCP, UDP, and IP protocols, as well as lower-level raw sockets. The myriad of function calls, data structures, and options associated with the APIs are explained with well-chosen diagrams and tables.
Introduction.
I. NETWORK PROGRAMMING FROM THE CLIENT PERSPECTIVE.
1. Introducing the Cookbook Network Client.Connecting the World with Sockets. Talking the Talk: TCP/IP Addressing Overview. Hearing the Server: The Client's Basic Algorithm.
The Socket System Call: Procedures and Caveats. Making the Call: Connecting to the Server. Getting the Server's Reply. Closing the Connection.
Summary: What's Going On Behind the Scenes?
2. TCP/IP Network Language Fluency.An IP Numbering Overview.
Computer Identification. Internet ID Organization. Subnetwork Masks. Routers and Address Resolution. Special and Dwindling Addresses.
IP Host Port Numbers. Network Byte Ordering.
Using Internet Conversion Tools. Applying the Tools and Extending the Client.
Different Kinds of sockaddr. UNIX Named Pipes. Summary: Applying IP Numbering and Tools.
3. Different Types of Internet Packets.The Fundamental Network Packet.
version Field. header_len Field. serve_type Field. ID Field. dont_frag, more_frags, frag_offset Flags and Field. time_to_live (TTL) Field. protocol Field. options Field. data Field.
Dissecting the Various Packets.
Considering the Packet's Issues. Packet Types.
How the IP Protocols Fit Together. Snooping the Network with Tcpdump. Writing a Custom Network Snooper. Summary: Choosing the Best Packets for Sending Messages.
4. Sending Messages Between Peers.What Are Connection-Based Sockets?
Open Channels Between Programs. Reliable Communications. Lower Protocol Connections.
Example: Connecting to the HTTP Daemon.
Simplified HTTP Protocol. Getting an HTTP Page.
What Are Connectionless Sockets?
Setting the Socket's Address. Some Programs Just Need the Message. Transaction TCP (T/TCP): A Connectionless TCP.
Sending a Direct Message.
Binding the Port to Your Socket. Tossing the Message Around. Catching the Message.
Ensuring UDP Message Arrival.
Strengthening UDP's Reliability. Sequencing Packets. Packet Redundancy. Verifying Data Integrity. Data Flow Glitches.
Juggling Tasks: A Multitasking Introduction. Summary: Connected Versus Connectionless Models.
5. Understanding the Network Layering Model.Solving the Network Challenge.
Networking Hardware Issues. Networking Transmission Issues. Network to Operating System Interfacing. Network to Program Interfacing.
Ope
