Some concept of Advanced Unix Programming are Address Structure, Basic Thread Functions, Client-Server Design, Network Programming, Signals and Thread, Thread-Specific Data, Unix File System, Reliable Communication. Main points of this lecture are: Network Programming, Introduction, Overview, Application Layer, Transport Layer, Reliably or Unreliably, Different Machines, Communicate, Network Layer, Host to Network Layer
Download Network Programming - Advanced Unix Programming - Lecture Slides and more Slides Computer Programming in PDF only on Docsity!
Week 6 Topics
Introduction to UNIX network programming
Introduction
Overview of TCP/IP
Introduction
Application layer (telnet, ssh, http, ftp, etc)
Things that we use daily
Transport layer (TCP, UDP)
Allows processes (on different machines) to communicate (reliably or unreliably) with each other
Network layer (IPv4, IPv6)
Handles routing, fragmentation, and internetworking
Host to Network layer (Ethernet)
Communication between two machines that are directly connected
Overview of TCP/IP
Some TCP/IP protocols:
TCP: transmission control protocol
Connection-oriented, reliable, full duplex, byte stream service
UDP: User datagram protocol
Connectionless, unreliable
IPv4: Internet Protocol, version 4.
The protocol that glues the Internet together.
Provides (unreliable) packet delivery service for TCP, UDP, ICMP, IGMP
IPv6: Internet Protocol, version 6.
128 bits address, newer version of Internet Protocol
Overview of TCP/IP ... continued
Some TCP/IP protocols ... continued
ICMP: Internet Control Message Protocol
Handles errors and control information for IP (ping, traceroute)
IGMP: Internet Group Management Protocol
Used in IP multicast
Socket Programming
The use of TCP and UDP
Can also access the lower layers directly (raw socket)
TCP: Transmission control protocol
Interface
socket, bind, listen, accept, connect, read, write, close
An analogy Socket: telephone Bind: assign telephone number to a telephone Listen: turn on the ringer so that you can hear the phone call Connect: dial a phone number Accept: answer the phone Read and write: listening and talking Close:
Reliable communication
Implementing reliable communication may require - Sequence number, acknowledgement, retransmission, timeout (RTT) - Sliding window protocol for efficiency - Flow control - Connection establishment and release