Jawaharlal Nehru Technological University Hyderabad
Jawaharlal Nehru Technological University Hyderabad B.Tech III NETWORK PROGRAMMING Previous Question Paper (February/March - 2022 - R18)
Answer any five questions
All questions carry equal marks
Main
Explain the services and functions of various layers in the OSI reference model.
Answer
The OSI model defines seven layers, each providing specific services for network communication:
- Physical Layer: Handles transmission of raw bit streams over a physical medium, defining electrical, mechanical, and functional specifications.
- Data Link Layer: Provides node-to-node data transfer, framing, physical addressing, and error detection/correction.
- Network Layer: Manages logical addressing, routing, and path determination to facilitate data transfer between different networks.
- Transport Layer: Ensures end-to-end communication, flow control, segmentation, and reliability (e.g., TCP/UDP).
- Session Layer: Establishes, manages, and terminates sessions between applications, handling synchronization and dialog control.
- Presentation Layer: Manages data representation, encryption, and compression to ensure the application layer can read the data.
- Application Layer: Provides network services directly to end-user applications, such as HTTP, FTP, and SMTP.
Describe various internet address conversion functions with neat syntax.
Answer
Internet address conversion functions are used to translate between human-readable strings and network-byte-order binary structures.
- inet_aton: Converts an ASCII dotted-decimal string to a network byte order binary address. int inet_aton(const char *cp, struct in_addr *inp);
- inet_ntoa: Converts a network byte order binary address to a dotted-decimal string. char *inet_ntoa(struct in_addr in);
- inet_pton: Converts an IP address from text to binary form, supporting both IPv4 and IPv6. int inet_pton(int af, const char *src, void *dst);
- inet_ntop: Converts an IP address from binary to text form, supporting both IPv4 and IPv6. const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
How are TCP connections established and terminated? Explain the steps and various options using a neat TCP’s state transition diagram.
Answer
Sign in to view the complete answer paper.
What will happen if the server child process is killed? Describe about the crashing of the server process and the crashing of the server host.
Answer
Sign in to view the complete answer paper.
Describe briefly about Blocking and Non-Blocking I/O models with neat diagrams.
Answer
Sign in to view the complete answer paper.
Give the syntax of poll() function and describe its basic functionality.
Answer
Sign in to view the complete answer paper.
Give the detail syntax of recv() and send() functions and explain its functionality also mention various flags for I/O functions associated with these functions.
Answer
Sign in to view the complete answer paper.
Give the basic functionality of ioctl() function.
Answer
Sign in to view the complete answer paper.
Explain the following functions with an illustrative example code:
getservbyname()
Answer
Sign in to view the complete answer paper.
getservbyport()
Answer
Sign in to view the complete answer paper.
What are the six macros that operate on the icmp6_filter structure? Explain them briefly.
Answer
Sign in to view the complete answer paper.
How to calculate the internet checksum? Discuss the algorithm in detail.
Answer
Sign in to view the complete answer paper.
Give an overview of the functions used in a ping program that works for both IPv4 and IPv6 with a neat flowchart and an illustrative program.
Answer
Sign in to view the complete answer paper.