MockExams

Network Programming (BIT401CO)

Semester 73 credits45 teaching hours

Client-server socket programming — TCP/UDP sockets, I/O multiplexing, broadcast/multicast, and raw sockets in C/Unix.

  1. Unit 1: Introduction to Network Programming5 hrs

    • Introduction to computer network: client/server model
    • Protocol Suite (ISO/OSI, TCP/IP)
    • Unix Standards (POSIX, OpenGroup, IETF)
    • Network Utilities (telnet, route, ipconfig, ifconfig, ping, netstat, and ftp)
    • Introduction to programming: wrapper functions, header files, libraries and ports numbers, IP address
    • Iterative server, concurrent server, networked servers
  2. Unit 2: Elementary Operating System Calls6 hrs

    • System call, program, thread, process, Kernel
    • fork(), exec() and its family, waitpid(), wait()
    • pipe(), Fifo(), signals (SIGCHLD, SIGINT, SIGIO)
    • IPC Names, creating and opening IPC channels, IPC permissions
  3. Unit 3: TCP/UDP Transport Layer Protocols4 hrs

    • TCP (Transmission Control Protocol): features, connection establishment and termination, states in communication (LISTEN, TIME_WAIT, ESTABLISHED, BLOCKED)
    • UDP (User Datagram Protocol): features, uses, comparison with TCP
    • TCP and UDP buffer sizes and limitations
    • SCTP overview
  4. Unit 4: Elementary Socket Calls5 hrs

    • Socket address structure: for IPV4, IPV6, UNIX domain socket and generic socket address structure, value-result argument
    • Byte ordering and manipulating function: htonl(), htons(), ntohl(), ntohs(), inet_addr(), inet_aton(), inet_ntoa(), inet_pton()
  5. Unit 5: Elementary TCP-UDP Socket6 hrs

    • Socket(), connect(), bind(), listen(), accept(), read(), write(), close()
    • sendto(), recvfrom()
  6. Unit 6: I/O Multiplexing4 hrs

    • Introduction, I/O models: blocking I/O, non-blocking I/O, I/O multiplexing, signal driven I/O (SIGIO) and asynchronous I/O model
    • Select(), poll(), shutdown()
  7. Unit 7: Socket Options2 hrs

    • Getsockopt() and setsockopt() functions
    • IPV4, IPV6, TCP socket options (SO_REUSEADDR, TCP_NODELAY)
  8. Unit 8: Name and Address Conversion2 hrs

    • Domain Name System, gethostbyname(), gethostbyaddr(), uname(), getservbyname() and getservbyport()
    • gethostname() functions, socket timeouts
  9. Unit 9: Unix Domain Protocol3 hrs

    • Introduction, Unix domain socket address structure
    • socketpair function
    • Unix domain stream client-server, UNIX domain datagram client/server
  10. Unit 10: Daemon Processes, Inetd Superservers2 hrs

    • Introduction, Syslog facility (syslog function)
    • daemon_init function
    • inetd daemon configuration
  11. Unit 11: Broadcast and Multicast3 hrs

    • Introduction, Broadcast and multicast addresses
    • Comparison between broadcast, unicast and multicast socket options
    • Unicast versus Broadcast, multicast versus broadcast on LAN
  12. Unit 12: IP Layers and Raw Socket3 hrs

    • Introduction, raw socket creation
    • Input and output packet processing (ping example implementation)

Reference books

  • Stevens, W. R., Unix Network Programming, Vol 1: Networking APIs - Sockets and XTI, Prentice Hall.
  • Stevens, W. R., Unix Network Programming, Vol 2: Interprocess Communications, Prentice Hall.
  • Comer, Douglas E., Internetworking with TCP/IP: Principles, Protocols, and Architecture, Vol 3, Prentice Hall.

BIT401CO

Switch Course

Course Units

Past Exam Questions

1

Search BIT401CO

Reading

Theme
Reading mode
Text size
Default
Font
Line width
Line spacing