Fundamentals of Linux Network programming

Source: Internet
Author: User

1. Linux Network model

①osi seven-tier model and Linux four-tier model

② the relationship between various protocols and their location in the Linux model

③ Protocol Encapsulation: Various protocols in a layer-by-layer package relationship

(1) Ethernet

(2) IP

* IP has four main functions: data transfer, addressing, routing, datagram segmentation

* The main purpose of IP is to provide basic algorithms for data input and output networks, and to provide non-connected transfer services for high-level protocols.

* IP packet consists of IP protocol header and protocol data two parts

(3) TCP

* TCP is an important transport layer protocol that allows data to be reliably exchanged with other nodes on the network. He can provide port number decoding to identify the host application, and complete the reliable transmission of the data

* TCP protocol with strict internal error checking algorithm to ensure the integrity of data

* TCP is a byte-oriented sequential protocol, which means that each byte within the package is assigned a sequential number and assigned to a sequence number per package

(4) UDP

* UDP is also a transport layer protocol, he is a non-connected unreliable transport service (execution speed faster than TCP)

2. Network programming in Linux is implemented by the socket, which is a file descriptor.

Fundamentals of Linux Network programming

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.