Chat with us, powered by LiveChat GSP 215 Week 7 iLab Networking and a Tiny Web Server NEW | Writedemy

GSP 215 Week 7 iLab Networking and a Tiny Web Server NEW

GSP 215 Week 7 iLab Networking and a Tiny Web Server NEW

CO 1—Given a computing environment with multiple operating systems, demonstrate the ability to use the command line interface in Windows and Linux, and compile and run a program using the command line.

TCO 10—Given the importance of networking in game design, explain how computers are connected to a network, and summarize basic networking fundamentals, terminologies, protocols, and devices.

 

 

Scenario

In this week’s lab, we will create two C programs to use with networking commands. The first program will read a domain name or dotted-decimal address from the command line and display the corresponding host entry. The second program will be a tiny web server used on localhost.

 

 

Part A:

In this lab, we will explore DNS mapping by creating a file named hostinfo.c. This program will read a domain name or dotted-decimal address from the command line and display the corresponding host entry. Local host will always map to 127.0.0.2.

Enter the following C code into notepad. Save the file in the cygwin\home\username folder on your computer (ie: C:\cygwin64\home\gina) as hostinfo.c.

Open Cygwin, and compile the program: gcchostinfo.c –o hostinfo.

 

 

#include <stdlib.h>

#include <stdio.h>

#include <arpa/inet.h>

#include <netdb.h>

 

Run the program with the following domain names, and note the results. Also, choose some of your own.

 

 

Part B:

Read pages 919-927 in the book. We will be developing the tiny web server listed in the book. This web server supports the GET method. It will look for an HTML file in the current directory and will display the web page in a web browser. Please study and review the code to understand what it is doing. Feel free to extend the code as well.

Copy the C code below into notepad. Save the file in the cygwin\home\username folder on your computer (i.e., C:\cygwin64\home\gina) as tiny.c.

Compile the program: gcctiny.c –o tiny.

, at a cygwin prompt, type ./tiny 10000.

This will start the web server listening at port 10000.

Open your web browser, and type the following in the address bar: http://localhost:10000/home.html.

This will open your website using your own tiny web server. To stop your tiny web server, press control + c in cygwin.

 

Include a screenshot below of your web page working in a browser.

 

C Code:

//Tiny web server code

#include <stdlib.h>

#include <stdio.h>

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order