Hands-On Network Programming with C

by Van Winkle, Lewis

Networking

Book Details

Book Title

Hands-On Network Programming with C

Author

Van Winkle, Lewis

Publisher

Packt

Publication Date

2019;2020

ISBN

9781789349863

Number of Pages

467

Language

English

Format

PDF

File Size

5.3MB

Subject

low-level-networking

Table of Contents

  • Network Programming in C
  • Cover
  • Title Page
  • Copyright and Credits
  • Dedication
  • About Packt
  • Contributors
  • Table of Contents
  • 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
  • Domain names
  • Internet routing
  • Port numbers
  • Clients and servers
  • Putting it together
  • What's your address?
  • Listing network adapters from C
  • 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
  • Berkeley sockets versus Winsock sockets
  • Our first program
  • Summary
  • Questions
  • Chapter 3: An In-Depth Overview of TCP Connections
  • Technical requirements
  • Multiplexing TCP connections
  • Synchronous multiplexing with select()
  • A TCP client
  • A TCP server
  • Blocking on send()
  • TCP is a stream protocol
  • Summary
  • Questions
  • Chapter 4: Establishing UDP Connections
  • Technical requirements
  • How UDP sockets differ
  • A first UDP client/server
  • A UDP server
  • Summary
  • Questions
  • Chapter 5: Hostname Resolution and DNS
  • Technical requirements
  • How hostname resolution works
  • Name/address translation functions
  • The DNS protocol
  • A DNS query program
  • Summary
  • Questions
  • Further reading
  • Section 2 - An Overview of Application Layer Protocols
  • Chapter 6: Building a Simple Web Client
  • Technical requirements
  • The HTTP protocol
  • What's in a URL
  • Implementing a web client
  • HTTP POST requests
  • Summary
  • Questions
  • Further reading
  • Chapter 7: Building a Simple Web Server
  • Technical requirements
  • The HTTP server
  • Content types
  • Creating the server socket
  • Multiple connections buffering
  • The main loop
  • Security and robustness
  • Summary
  • Questions
  • Further reading
  • Chapter 8: Making Your Program Send Email
  • Technical requirements
  • Email servers
  • SMTP dialog
  • The format of an email
  • A simple SMTP client program
  • Enhanced emails
  • Spam-blocking pitfalls
  • Summary
  • Questions
  • Further reading
  • Section 3 - Understanding Encrypted Protocols and OpenSSL
  • Chapter 9: Loading Secure Web Pages with HTTPS and OpenSSL
  • Technical requirements
  • HTTPS overview
  • Encryption basics
  • The TLS protocol
  • OpenSSL
  • A simple HTTPS client
  • Other examples
  • Summary
  • Questions
  • Further reading
  • Chapter 10: Implementing a Secure Web Server
  • Technical requirements
  • HTTPS and OpenSSL summary
  • HTTPS server with OpenSSL
  • HTTPS server challenges
  • Summary
  • Questions
  • Further reading
  • Chapter 11: Establishing SSH Connections with libssh
  • Technical requirements
  • The SSH protocol
  • libssh
  • SSH authentication
  • Executing a remote command
  • Downloading a file
  • Summary
  • Questions
  • Further reading
  • Section 4 - Odds and Ends
  • Chapter 12: Network Monitoring and Security
  • Technical requirements
  • The purpose of network monitoring
  • Testing reachability
  • Checking local connections
  • Snooping on connections
  • Network security
  • Network-testing etiquette
  • Summary
  • Questions
  • Further reading
  • Chapter 13: Socket Programming Tips and Pitfalls
  • Technical requirements
  • Error handling
  • TCP socket tips
  • Socket's local address
  • Multiplexing with a large number of sockets
  • Summary
  • Questions
  • Chapter 14: Web Programming for the Internet of Things
  • Technical requirements
  • What is the IoT?
  • Connectivity options
  • Hardware choices
  • External transceivers and modems
  • IoT protocols
  • Firmware updates
  • Ethics of IoT
  • Summary
  • Questions
  • Appendix A: Answers to Questions
  • Appendix B: Setting Up Your C Compiler on Windows
  • Appendix C: Setting Up Your C Compiler on Linux
  • Appendix D: Setting Up Your C Compiler on macOS
  • Appendix E: Example Programs
  • Other Book You May Enjoy
  • Index