Linux C Note Network programming (i)

Source: Internet
Author: User

1) The link layer, sometimes referred to as the data link layer or the network interface layer, usually includes the device drivers in the operating system and the corresponding network interface cards in the computer. They work together with the physical interface details of the cable (or any other transmission medium).
2) The network layer, sometimes referred to as the Internet layer, handles the grouping of activities in the network, such as grouping routing. In the TCP/IP protocol family, the network layer protocol consists of the IP Protocol (Internet Protocol), the ICMP Protocol (Network Internet Control Message Protocol), and the IGMP Protocol (Internet Group Governance Protocol).
3) The Transport layer primarily provides end-to-end communication for applications on two hosts. In the TCP/IP protocol family, there are two different transport protocols: TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
TCP provides high-reliability data communication for two hosts. The work that it does involves putting the data that the application gives to it into the appropriate small pieces to the following network layer, confirming the received packet, setting the timeout clock to send the last acknowledgment packet, etc. Because the transport layer provides high-reliability end-to-end communication, the application layer can ignore all of these details.
4) The application layer is responsible for handling specific application details.


Physical Address
The MAC (Media access Control) address is the identity that identifies the LAN (LAN) node. The physical address of the network card is usually the EPROM (a flash memory chip, which can be erased by the program) that is burned into the NIC by the network card manufacturer, and it stores the address of the computer on which the data was transmitted and the host that received the data.

IP Address
We see the entire Internet as a single, abstract network. An IP address is an identifier for each host (or router) that is connected to the Internet that is the only one in the world.
The IP address is now assigned by the Internet name and number assignment company ICANN (Internet Corporation for Assigned Names and Numbers).
Our users request an IP address from APNIC Asia Pacific Network Information Center.




Port
A port is a number of registers in an interface circuit that are used to hold data information, control information, and status information, respectively, and the corresponding ports are called data ports, control ports, and status ports.
Computer running System program, in fact, like a closed circle, but the computer is for human service, he needs to accept some instructions, and to follow the instructions to adjust the system function to work, so the System program designer, the circle cut into a lot of segments, these line interface is called the port (colloquially is the fracture, is interrupted), When the system runs to these ports, a look at whether the port is turned on or off, if it is closed, the rope is connected, the system runs down, if the port is open, the system will get commands, external data input, accept external data and execute.
TCP port
Tcp:transmission Control Protocol Protocol TCP is a connection-oriented, reliable, byte-stream-based transport layer (Transport layer) communication protocol, which is provided by the IETF RFC 793 description (specified). In the simplified computer network OSI model, it accomplishes the function specified by layer Fourth transport layer, and UDP is another important transport protocol in the same layer.

IP protocol
The IP protocol is used to connect multiple packet-switched networks, which transmits a thing called a packet between the source address and the destination address, and it also provides the ability to reassemble the data size to suit the packet size requirements of different networks.

Linux C Note Network programming (i)

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.