
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question

Transcribed Image Text:Q.3 In network programming, structs are often used to represent protocol headers due to their ability
to neatly encapsulate various types of data.
(a) Define a struct named ProtocolHeader with the following fields to mimic a network
protocol header:
"
version (unsigned integer, 4 bits)
IHL (Internet Header Length, unsigned integer, 4 bits)
typeOfService (unsigned integer, 8 bits)
totalLength (unsigned integer, 16 bits)
identification (unsigned integer, 16 bits)
flags (unsigned integer, 3 bits)
fragmentOffset (unsigned integer, 13 bits)
timeToLive (unsigned integer, 8 bits)
protocol (unsigned integer, 8 bits)
headerChecksum (unsigned integer, 16 bits)
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps

Knowledge Booster
Similar questions
- (please type answer fast.)arrow_forwardASN.1 is an ISO standard used in many internet‑related protocols, especially those in the area of network management. In ASN.1, BER (Basic Encoding Rule) uses a so‑called TLV (Type, Length, Value) approach to encoding data for transmission. According to this BER encoding rule, what would be the encoding of {weight, 178} {lastname, “Philips”}?arrow_forwardCIS269 Packet Translation Lab Break down the following IP datagram into its individual fields, listing the value of each. Hint: It’s an IP datagram containing a TCP segment containing another protocol… 45 00 00 31 94 00 40 00 80 06 1B 9F 80 A3 C9 29 D8 45 29 15 04 09 00 15 00 00 C3 A1 DF 65 A8 45 50 18 20 AA 8E 8C 00 00 43 57 44 20 66 75 6E 0D 0Aarrow_forward
- CIS269 **SEE ATTATCHED PICS FOR BEST TRANSLATION** Packet Translation Lab Break down the following IP datagram into its individual fields, listing the value of each. Hint: It’s an IP datagram containing a TCP segment containing another protocol… 45 00 00 31 94 00 40 00 80 06 1B 9F 80 A3 C9 29 D8 45 29 15 04 09 00 15 00 00 C3 A1 DF 65 A8 45 50 18 20 AA 8E 8C 00 00 43 57 44 20 66 75 6E 0D 0Aarrow_forwardWe have seen that Internet TCP sockets treat the data being sent as a byte stream but UDP sockets recognize message boundaries. What are one advantage and one disadvantage of byte-oriented API versus having the API explicitly recognize and preserve application-defined message boundaries?arrow_forwardThe following questions are related to HTTP protocol Q1. The first line of a HTTP request from some client to some server is basically made of where the web page file path is added. The path is shown as folders separated by slash. Q2. If an HTTP server responds to a client request and the response is a success, what is the http code and string that marks a success response? Must provide the code and the string as they appear in TCPDump or Wireshark traces. (note: use upper case for the string and also proper spacing in you answers. Keep the order of the string and the code as seen in TCPDump) Answer: code and string that marks a success response Q3. What http header field is used to identify an address of a web page (i.e. the URI) that linked to the resource currently being requested. This field indicates the last page the user/requester was on by the time they link to the requested page. Answer: The field that indicates the last page the user/requester was on is Q4. What is the http…arrow_forward
- Q1: The following is a dump of a UDP header in binary form 0100 0001 0010 0011 0100 0001 0010 0111 0000 0000 0010 1111 0100 0001 0011 1111 Find in decimal form the following: (a) Source port number (b) Destination port number (c) Total length of the UDP (d) Length of the data (e) Check sum. (5 Marks)arrow_forwardConsider the following string of ASCII characters that were captured by Wireshark when the browser sent an HTTP GET message (i.e., this is the actual content of an HTTP GET message). The characters <cr><lf> are carriage return and line-feed characters (that is, the italized character string <cr> in the text below represents the single carriage-return character that was contained at that point in the HTTP header). Answer the following questions, indicating where in the HTTP GET message below you will find the answer.arrow_forwardWhat is "static routing"?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education