20,135,321 good source, 20135323 Fu Yunjin----Experiment Five: Communication protocol design

Source: Internet
Author: User

Beijing Institute of Electronic Technology (BESTI)

Lab Report

Course: Basic???????????? of information security design system Class: 1353????????

Name: Yu Jiayuan, Fu Yunjin

School Number: 20135321, 20135323

Score: Instructor:???? Lou Jia Peng???? Date of experiment: 2015.12.1

Test level: Preview degree:???? Experimental time: 15:30-18:00

Instrument Group: Compulsory/elective: compulsory???? Experiment Number: 5

Experiment Name: Communication protocol Design

Purpose and Requirements: Objective: 1. Master the process of implementing a simple Web server in the ARM Development Board. 2. Learn the socket network programming on the ARM Development Board. 3. Learn the use of the signal () function under Linux. Requirements: 1. Learn how to use the socket for communication programming, understand the overall design of an actual network communication application, read the relevant content of the HTTP protocol, and learn how to use several important network functions. 2. Read the HTTPD.C source code. Add some additional features on this basis. Test the functionality of an embedded Web server using a browser on a PC computer.

?

Experimental instrument:

name

model

number

LENOVO

1

ARM Development Board

?

1

?

    1. Principle of experiment

1. Functional Requirements Detailed description

① gets the list of current directory files for the server:

Sends information to the client about all files in the current directory of the server, including:

File name, size, date.

② gets the specified file:

Send the requested file to the customer.

③ Get HTML type file:

Sends the HTML type file requested by the customer to the customer.

④ get plain text files:

Send the plain text of the customer request to the customer.

⑤ Get JPG image file:

Send the JPG image file requested by the customer to the customer.

⑥ Get GIF image files:

Send the GIF image file requested by the customer to the customer.

⑦ Parsing user requests:

Analyze the customer's request and parse the request information into several variables, including:

The requested command, the file name of the request, and the type of files requested.

2. Schematic diagram

3. System Structure diagram

4. Main program Algorithm flowchart

?

.

  1. Experimental steps

    1. Read and understand the source code

    Enter /07_httpd directory, use the editor to read and understand the source code.

    2. compiling the application

    3. Download and debug

    Use the NFS service mode to download the httpd to the Development Board and copy the test page for debugging.

    4 . Native Testing

    Enter http://192.168.0.111 (111 for the IP address of the Up-cup S2410 Lab board) in the desktop browser to observe the connection request results (2.7.8) in the client's browser and the print information for the server on the Development Board.

  2. problems encountered and their solutions

    problem: Running MAKEFILE error occurred.

    Workaround: The first method is that the server code is compiled with a cross-compiler, and the client code uses GCC Compile. The other is to modify the makefile file, my team chose the second type, the code is as follows:

  3. Experimental experience

    This experiment is the last time this semester LINUX experiments. Through this experiment, I learned to use the experimental box to implement Some functions of the WEB server. At the same time, on the basis of experiment four, it is more handy to modify MAKEFILE files. So this experiment is still relatively smooth, in this period also thanks to the teacher for our experiment guidance, we will also be teachers of our guidance into our own knowledge, the knowledge of the fine, learning solid.

20,135,321 good source, 20135323 Fu Yunjin----Experiment Five: Communication protocol design

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.