Preface
Section 1:Getting Started with Network Programming
Chapter 1:Introducing Networks and Protocols
Technical requirements
The internet and C
OSI layer model
TCP/IP layer model
Data encapsulation
Internet Protocol
What is an address?
Domain names
Internet routing
Local networks and address translation
Subnetting and CIDR
Multicast,broadcast,and anycast
Port numbers
Clients and servers
Putting it together
What's your address?
Listing network adapters from C
Listing network adapters on Windows
Listing network adapters on Linux and macOS
Summary
Questions
Chapter 2:Getting to Grips with Socket APIs
Technical requirements
What are sockets?
Socket setup
Two types of sockets
Socket functions
Anatomy of a socket program
TCP program flow
UDP program flow
Berkeley sockets versus Winsock sockets
Header files
Socket data type
Invalid sockets
Closing sockets
Error handling
Our first program
A motivating example
Making it networked
Working with IPv6
Supporting both IPv4 and IPv6
Networking with inetd
Summary
Questions
Chapter 3:An In-Depth Overview of TCP Connections
Technical requirements
Multiplexing TCP connections
Polling non-blocking sockets
Forking and multithreading
The select()function
Synchronous multiplexing with select()
select()timeout
lterating through an fd_set
select()on non-sockets
A TCP client
TCP client code
A TCP server
TCP server code
Building a chat room
Blocking on send()
TCP is a stream protocol
Summary
Questions
Chapter 4:Establishing UDP Connections
Technical requirements
How UDP sockets differ
UDP client methods
UDP server methods
A first UDP client/server
A simple UDP server
A simple UDP client
A UDP server
Summary
Questions
Section 2: An Overview of Application Layer Protocols
Section 3: Understanding Encrypted Protocols and OpenSSL
Section 4: Odds and Ends