Computer Systems: A Programmer's Perspective Plus Mastering Engineering With Pearson Etext -- Access Card Package (3rd Edition)
Computer Systems: A Programmer's Perspective Plus Mastering Engineering With Pearson Etext -- Access Card Package (3rd Edition)
3rd Edition
ISBN: 9780134123837
Author: Randal E. Bryant, David R. O'Hallaron
Publisher: PEARSON
Question
Book Icon
Chapter 11, Problem 11.12HW
Program Plan Intro

IP addresses:

  • The IP address denotes an unsigned integer that is 32-bit.
  • The IP addresses is been stored by network programs in IP address structure.
  • The addresses present in IP address structure are stored in network byte order.
  •  An unsigned 32-bit integer is transformed from host byte order to network byte order by “htonl” function.
  • An unsigned 32-bit integer is transformed from network byte order host byte order by “ntohl” function.
  • The IP address is presented to humans in a form known as “dotted-decimal” notation.
    • Each byte is been represented by its corresponding decimal value and is separated by a period from other bytes.

Passing program arguments to server:

  • The arguments for “GET” requests are passed in the URI.
  • The character “?” separates filename from the arguments.
  • The character “&” separates each argument.
  • The arguments do not allow spaces in it.

Server passes arguments to child:

  • The server calls “fork” to create a child process and calls “execve” to run program in child’s context once it receives a request.
  • The child process sets CGI environment variable values.
  • The “adder” program can reference it at run time using “getenv” function of linux.

Output is sent by child:

  • The dynamic content of a CGI program is to be sent to standard output.
  • A CGI program sends dynamic content to standard output.
  • It uses “dup2” function for redirecting standard output to connected descriptor associated with client.
  • The result written to standard output by CGI program, it goes directly to client.

Blurred answer
Students have asked these similar questions
Can we find somewhere that gives a more detailed description of the HTML post and get methods? Considering that, why not?
How do I create an HTTP axios get request to retrieve the date from a json string containing a date and time field? The date is formatted as such: {"time":"XX:XX:XX PM","date":"XX-XX-XXXX"} The date can NOT be retrieved as a string, as it must be pulled to an api after a button click.
How to get the url of current page in javascript. Make a text and on clicking that we get url on alert
Knowledge Booster
Background pattern image
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education