Skip to main content

Network Programming



Download Notes


1. Introduction to network programming                    

Introduction to computer network: client/ server model, Protocol Suite (ISO/OSI, TCP/IP), Unix Standards (POSIX, Open Group, 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. Elementary operating system calls        
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 names, creating and opening IPC channels, IPC permissions

3. TCP/UDP transport layer protocols        
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

4. Elementary socket calls        
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. Elementary TCP-UDP socket         
Socket(), connect(), bind(), listen(), accept(), read(), write(), close(), sendto(), recvfrom(),

6. I/O multiplexing         
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. Socket options        
Getsockopt() and setsockopt() functions, IPV4, IPV6, TCP socket options

8. Name and address conversion        
Domain name system, gethostbyname(), gethostbyaddr(), uname(), getservbyname() and getservbyport(), gethostname() functions, socket timeouts

9. Unix domain protocol         
Introduction, Unix domain socket address structure, socket pair function, Unix domain stream client-server, UNIX domain datagram client/server

10. Daemon processes, Inetd super servers                     
Introduction, Sysloged (syslog function), daemon_init function, inetd daemon

11. Broadcast and multicast          
Introduction, Broadcast and multicast addresses, comparison between broadcast, unicast and multicast socket options, Unicast versus Broadcast, multicasat versus broadcast on LAN

12. IP layers and raw socket                         
Introduction, raw socket creation, input and output (ping example)

Lab exercise
There shall be lab strictly using c/c++/Java/Linux
Linux commands 
IPC (Pipe(), Fifo(), Message Queue)
TCP, UDP and Unix Domain socket client server program
TCP echo server and client program
Fork() System call
Wait() and waitpid() system call
Uname(), gethostbyaddr(), gethostbyname(), gethostname() system call
Shell programming 

Reference books 
Stevens W. R., “Unix Network Programming”, Vol-1
Stevens W. R., “Unix Network Programming”, Vol-II
Doglous E. Comer, “Internetworking with TCP/IP”, Vol-III

Comments

Popular posts from this blog

upload file type rocket chat #Accepted file upload. Can not send .xlsx

Enabling File format for upload at ROCKET CHAT application/msword   - for .doc application/vnd.openxmlformats-officedocument.wordprocessingml.document   - for .docx application/vnd.ms-excel   - for xls application/vnd.openxmlformats-officedocument.spreadsheetml.sheet   - for .xlsx application/vnd.ms-powerpoint   - for .ppt application/vnd.openxmlformats-officedocument.presentationml.presentation   - for .pptx image/*,audio/*,video/*,application/zip,application/x-rar-compressed,application/pdf,text/plain,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Troubleshooting DRBD #Centos #DRBD

Troubleshooting DRBD  This article presents common DRBD problems and solutions. DRBD (Distributed Replicated Block Device) runs on the master and slave nodes only, and is responsible for mirroring the contents of a partition between master and slave.  Typical problems in DRBD include: A lack of Primary-Secondary connectivity The Secondary operating in standalone mode Both nodes reporting connectivity but neither one in the role of master Both nodes reporting themselves in the role of master Verify the DRBD status The following command is used to verify that DRBD is operating normally on the master and slave nodes. drbd-overview When run on the master node, the output should look like the following: 1:r0/0 Connected Primary/Secondary UpToDate/UpToDate C r----- /mnt/drbd  ... When run on the slave node, the output should look like the following: 1:r0/0 Connected Secondary/Primary UpToDate/UpToDate C r----- The following sections are exampl...

How to Add a Static TCP/IP Route to the Windows Routing Table #windows #route #add/delete

How to Add a Static TCP/IP Route to the Windows Routing Table In some specific types of environments, you might find it useful to add a static route to the routing table in Windows. Here’s how to go about it. RELATED:   How to Use Traceroute to Identify Network Problems A routing table dictates where all packets go when they leave a system—whether that system is a physical router or a PC. Most routers—including the one built into your Windows PC—use some form of dynamic routing, where the router is capable of selecting the best place to forward packets based on information it gets from other routers. You can see it at work if you use the  traceroute command  to watch the connections a packet makes as it reaches it’s final destination. Most routers also allow you to add a static route (one that doesn’t get dynamically updated) if you want to always forward certain traffic to a specific router or gateway. Why? Well, most people using Windows in t...