Anand Classes

Network Programming GNDU Msc Computer Science & IT E-Content Lecture Notes Books pdf Study Material online Download|Anand Classes|Neeraj K Anand

Network Programming GNDU Msc Computer Science & IT E-Content Lecture Notes Books pdf Study Material online Download|Anand Classes|Neeraj K Anand

Network Programming GNDU Msc Computer Science & IT E-Content Lecture Notes Books pdf Study Material online Download|Anand Classes|Neeraj K Anand

Author’s Words

 I strongly believe that the Almighty God alone plans every thing that happens in the world. So, I sincerely thanks the Almighty God for showering his blessings upon me and using me to write this book.

I wish to express my deep sense of gratitude to my colleagues and students whom encouragement and co-operation have been source of great inspiration to me. I am thankful to my father Sh. Om Prakash Anand, my son Param Anand and my dear wife Neetu Anand for bringing me out this book. I hope that this edition of the book will prove to be more useful to the Science and Engineering students. Any suggestions for further improvement of the book will be gratefully acknowledged by the both author and publisher. Finally, we would like to thank my colleagues in the various Institutes whom have encouraged and assisted us to make our best efforts in bringing out this book.                                                               

                                                                                                                          NIT – Warangal, Telangana

                                                                                                                          Neeraj K. Anand

                                                                                                                         November 2021

Dedication

In The Everlasting Memory of My Mother

Late Smt. Nirmal Anand

About The Book

A comprehensive guide to programming with network sockets, implementing Internet protocols, designing IoT devices, and much more with C.

Key Features

  • Leverage your C or C++ programming skills to build powerful network applications
  • Get to grips with a variety of network protocols that allow you to load web pages, send emails, and do much more
  • Write portable network code for operating systems such as Windows, Linux, and macOS

Book Description

Network programming, a challenging topic in C, is made easy to understand with a careful exposition of socket programming APIs. This book gets you started with modern network programming in C and the right use of relevant operating system APIs. This book covers core concepts, such as hostname resolution with DNS, that are crucial to the functioning of the modern web. You’ll delve into the fundamental network protocols, TCP and UDP. Essential techniques for networking paradigms such as client-server and peer-to-peer models are explained with the help of practical examples. You’ll also study HTTP and HTTPS (the protocols responsible for web pages) from both the client and server perspective. To keep up with current trends, you’ll apply the concepts covered in this book to gain insights into web programming for IoT. You’ll even get to grips with network monitoring and implementing security best practices. By the end of this book, you’ll have experience of working with client-server applications, and be able to implement new network programs in C.

What you will learn

  • Uncover cross-platform socket programming APIs
  • Implement techniques for supporting IPv4 and IPv6
  • Understand how TCP and UDP connections work over IP
  • Discover how hostname resolution and DNS work
  • Interface with web APIs using HTTP and HTTPS
  • Acquire hands-on experience with Simple Mail Transfer Protocol (SMTP)
  • Apply network programming to the Internet of Things (IoT)

Who this book is for

If you’re a developer or a system administrator who wants to enter the world of network programming, this book is for you. Basic knowledge of C programming is assumed.

Syllabus (M.Sc. Computer Science – 3rd Semester (GNDU)

Sockets and Socket Address structures, Concept of Zombies, Daemon Processes, Super servers, Concurrent versus Iterative servers, Protocol Independence, Error Handling : Wrapper functions, OSI Model, Unix standards. TCP Connection establishment & Termination, Port Numbers and Concurrent Servers, Protocol Usage by common Internet Applications. UDP Communication Semantics, UDP Echo Server, Echo Client working, Protocol Usage by Common Internet Applications. Sockets Address Structures, Byte ordering & Manipulation Functions, TCP Socket System Calls, TCP Client-Server E.g., I/O Multiplexing, Signal Handling in Concurrent Servers. Socket Options, Elementary Names Address Conversions, Ipv4 and Ipv6 Interoperability.

Book Contents

Chapter.1 : Elementary Unix Sockets Network Programming…………………………………………………………………………. 9 What is a Socket ?…………………………………………………………………………………. 11 Where is Socket used ?…………………………………………………………………………. 11 Explain different types of sockets………………………………………………….. 14 Explain Socket Descriptors. write Socket communication domains………………………………………………………………………………………………….. 14 how to Specifying An Endpoint Address for Socket ?……………………. 15 Explain the characteristics of different unix Socket types…….. 16 How file descriptor functions act with sockets ? Write the way to terminate the socket…………………………………………………………………….. 17   Chapter.2 : Unix Socket Address Structures discuss briefly unix Socket Address Structures………………………….. 19 discuss IPv4 & generic Socket Address Structure…………………………. 19 discuss IPv6 & generic Socket Address Structure…………………………. 22 Differentiate between socket address structures of IPv4, IPv6, Unix domain, datalink, and storage………………………………………………… 23 how to Socket address structure passed from process to kernel and kernel to process ?………………………………………………………………………. 24 Why must value-result arguments such as the length of a socket address structure be passed by reference?…………………….. 24   Chapter.3 : Concept Of Zombies & Daemon Processes what do mean by zombie process ? Explain briefly………………………. 26 WHAT ARE Daemon Processes ? WRITE THE METHODS TO START A DAEMON…………………………………………………………………………………………………… 27 WHAT IS THE FUNCTION OF syslogd Daemon ?……………………………………… 27 WHAT PERFORM syslog FUNCTION ? discuss the levels and facilities of log messages……………………………………………………………………………………. 28 discuss the technique to daemonizes the process using daemon_init Function………………………………………………………………………….. 30 discuss inetd Daemon using telnet server. why its is called a internet server ?………………………………………………………………………………….. 34 discuss the various steps performed by inetd Daemon to execute a server…………………………………………………………………………………………………. 37 discuss inetd Daemon descriptors when a new connection request arrives from a FTP client……………………………………………………. 39         Chapter.4 : Concurrent And Iterative Servers what do you mean by client and server. Discuss Concurrent and Iterative servers. Write their advantages and disadvantages. Also differentiate them…………………………………………………………………….. 43 discuss wrapper functions to handle errors occur in unix networking program………………………………………………………………………….. 52 what do you mean by Concurrency And Asynchronous I/O………… 53   Chapter.5 : Study Of OSI Model And Unix Standards osi Model…………………………………………………………………………………………………… 55 Unix Standards………………………………………………………………………………………… 56   Chapter.6 : TCP Communication Between Client And Server discuss the techniques to establish and terminate the TCP connection between client and server………………………………………….. 58 TCP State Transition Diagram……………………………………………………………….. 61 explain the packets exchange operation  during tcp connection establishment and termination……………………………………………………….. 63 TCP Port Numbers And Concurrent Servers……………………………………….. 64 Protocol Usage by Common Internet Applications………………………….. 66   Chapter.7 : udP Communication Between Client And Server Elementary UDP Sockets………………………………………………………………………… 68 recvfrom And sendto Functions……………………………………………………………… 69 UDP Echo Server : main Function……………………………………………………………. 70 discuss Simple echo client/server using UDP………………………………….. 70 UDP Echo Server : dg_echo Function……………………………………………………… 71 UDP Echo Client : main Function…………………………………………………………….. 73 UDP Echo Client: dg_cli Function…………………………………………………………. 74 Lost Datagrams……………………………………………………………………………………….. 75 Verifying Received Response…………………………………………………………………. 75 what will happen when starting the client without starting the server…………………………………………………………………………………………………….. 77   Chapter.8 : Socket Address Structures Byte Ordering Functions……………………………………………………………………….. 79 explain the functions used to convert processor byte order into network byte order for TCP/IP applications…………………………. 80 Byte Manipulation Functions……………………………………………………………….. 83 inet_aton, inet_addr, And inet_ntoa Functions……………………………….. 84 explain the functions that are used to convert internet addresses between ascii strings and network byte ordered binary values……………………………………………………………………………………….. 84 inet_pton And inet_ntop Functions……………………………………………………… 85 sock_ntop And Related Functions………………………………………………………… 87   what is the disadvantage of inet_ntop function…………………………. 87 readn, writen, And readline Functions…………………………………………….. 89   Chapter.9 : Elementary TCP Sockets And TCP Socket System Calls  Major System Calls Used With Sockets………………………………………………. 94 Elementary TCP Sockets………………………………………………………………………… 96 Socket Function……………………………………………………………………………………….. 98 AF_xxx Versus PF_xxx……………………………………………………………………………….. 99 Connect Function…………………………………………………………………………………… 100 bind Function…………………………………………………………………………………………. 101 listen Function…………………………………………………………………………………….. 103 accept Function…………………………………………………………………………………….. 106 fork Function…………………………………………………………………………………………. 108 exec Function…………………………………………………………………………………………. 109 Concurrent Servers……………………………………………………………………………… 111 close Function………………………………………………………………………………………… 113 getsockname And getpeername Functions…………………………………………. 114   Chapter.10 : TCP Client/Server Communication Functions  TCP Client/Server Communication………………………………………………………. 117 Normal Session Startup……………………………………………………………………….. 121 Normal Session Termination……………………………………………………………….. 122 POSIX Signal Handling…………………………………………………………………………… 124 POSIX Signal Semantics………………………………………………………………………….. 126 SIGCHLD Signals………………………………………………………………………………………. 126 wait And waitpid Functions………………………………………………………………. 128 difference between wait and waitpid Functions…………………………. 129 A Connection Abort Before accept Returns……………………………………… 132 Termination of Server Process…………………………………………………………… 134 SIGPIPE Signal………………………………………………………………………………………… 135 Crashing of Server Host………………………………………………………………………. 136 Crashing and Rebooting of Server Host…………………………………………… 137 Shutdown of Server Host…………………………………………………………………….. 137   Chapter.11 : I/O Multiplexing And Signal Handling In Concurrent Servers  under what situations i/o Multiplexing is used in network applications ? which functions are capable for i/o Multiplexing ?…………………… 138 I/O Models………………………………………………………………………………………………… 138 discuss the five basic i/o models of unix……………………………………….. 138 Comparison of the I/O Models………………………………………………………………. 142 select Function………………………………………………………………………………………. 143 Under What Conditions Is a Descriptor Ready?……………………………. 146   str_cli Function……………………………………………………………………………………. 148 Batch Input and Buffering…………………………………………………………………… 150 shutdown Function………………………………………………………………………………….. 152 TCP Echo Server………………………………………………………………………………………. 153 discuss with example the behaviour of tcp server before and after the clients have establish a connections…………………………. 153 pselect Function……………………………………………………………………………………. 157 poll Function………………………………………………………………………………………….. 159   Chapter.12 : Elementary Names Address Conversions  discuss the methods to convert names into numeric addresses for communication……………………………………………………………………………. 162 gethostbyname Function……………………………………………………………………….. 163 gethostbyaddr Function……………………………………………………………………….. 165 Getservbyname And Getservbyport Functions………………………………….. 166 Chapter.13 : Interoperability Between IPv4 And IPv6 servers  discuss the techniques for Interoperability between IPv4 and IPv6 server……………………………………………………………………………………………. 170 discuss the techniques for Interoperability between IPv6 client and IPv4 server……………………………………………………………………………………. 173 tabulate the Interoperability between IPv4 and IPv6 server…… 174 explain the IPv6 Address-Testing Macros……………………………………… 175 explain the Source Code Portability between IPv4 and IPv6……… 176 Tags : Network Programming GNDU MSc Computer Science IT ebooks pdf download by Neeraj K Anand & Anand Technical Publishers, Network Programming GNDU MSc Computer Science IT Study Material pdf download by Neeraj K Anand & Anand Technical Publishers, Network Programming MSc Computer Science IT ebooks pdf download by Neeraj K Anand & Anand Technical Publishers, Anand Technical Publishers Network Programming GNDU MSc Computer Science IT books Study Material pdf download, Neeraj K Anand Technical Publishers Network Programming GNDU MSc Computer Science IT books pdf Download,Download Anand Technical Publishers GNDU Network Programming MSc Computer Science IT ebooks pdf, Download Network Programming GNDU MSc Computer Science IT books online pdf,Download Network Programming MSc Computer Science IT ebooks free pdf online,Anand Technical Publishers Jalandhar,Network Programming GNDU MSc Computer Science IT Digital Lecture Notes pdf download, Digital Lecture Notes Network Programming GNDU MSc Computer Science IT pdf download, Network Programming Digital Lecture Notes GNDU MSc Computer Science IT pdf download, Download Free Lecture Notes In Computer Science PDF Online, GNDU M.Sc Computer Science & IT Lecture Notes Free Download, Download MSc in Computer Science & IT study materials & books, MSc Chapter Wise Notes, MSc Important Notes, MSc Notes Study Material, GNDU MSc Computer Science & IT books free download pdf, Best Network Programming ebooks lecture notes pdf download for Free by Neeraj K Anand & Anand Technical Publishers

Scroll to Top