Networking protocols all processes running on different machines to communicate. We will look at two of the most widely used protocols, UDP and TCP, which both build on the IP naming and packet protocol. In this first set of videos, we work through details up to the UDP layer, leaving TCP details for next time.
The example implementations described in these videos are available as udp+tcp.zip.
- A high-level overview of TCP and UDP from a process’s perspective.
- Network 2: IP 3:35How IP enables processes to find each other and send packets of data.
- A closer look at packet delivery and how routers get to make decisions and adjust packets.
- Hostnames are mapped to numerical IP addresses via DNS.
- Name resolution generalizes to solves additional problems (besides finding remote hosts) toward using the system’s networking APIs.
- The C library’s getaddrinfo function provides a general name-resolution facility.
- Example of using getaddrinfo and getnameinfo to look up names.
- UDP and TCP in the context of the naming and packet facilities defined by IP.
- Network 9: Sockets 3:08The Unix API for networking is based on the socket datatype.
- Overview of how system calls are assembled for communication over UDP.
- Example client and server programs that use UDP.
- Example of serving from a specific network interface, so that connections are allowed only from the local machine.
- Network 13: More UDP 3:29Other elements of the Unix API for UDP, including reporting the sender of a message - and investigating the limitations of UDP communication.