Alibabacloud.com offers a wide variety of articles about tcp ip illustrated volume 2, easily find your tcp ip illustrated volume 2 information here online.
the address type to be converted, and 0x0800 is the IP address, the length of the following two addresses is 6 and 4 (bytes) for the ethernet address and IP address respectively. The op field is 1, indicating the ARP request, and the OP field is 2, indicating the ARP response.
The process of the Address Resolution Protocol is as follows:
Iv. RARP (Reverse Add
creation. Set other rt_msghdr members.
3. Set the Message Protocol and call raw_input.
8. rt_ifmsg Function
Rt_ifmsg is called in both if_up and if_down. When an interface is connected or disconnected, this function is used to generate an optional plug-in message. Approximate process of functions
As follows:
1. Call the rt_msg1 function to create a message in the mbuf chain.
2. Complete Message creation. Set other members in the if_msghdr interface.
The data link layer has three purposes:Sends and receives IP data packets for the IP module.Sends ARP requests to the ARP module and receives ARP responses.Send RARP requests for RARP and receive RARP responsesWe have heard of ip addresses. As for ARP and RARP, ARP is called the Address Resolution Protocol. It is a protocol that uses
addresses. As for ARP and RARP, ARP is called the Address Resolution Protocol. It is a protocol that uses IP addresses for MAC addresses, while RARP is called the Reverse Address Resolution Protocol, I will introduce them later in the TCP/IP protocol (using ARP in the LAN can easily paralyze the network)
There are still a lot of data link layer protocols, includ
Details of TCP/IP 2: Implementation-Route Selection
A process uses a plug-in the routing domain to send and receive routing packets. A PF_ROUTE
And a SOCK_RAW plug-in type. This process can send the following five optional packets to the kernel:
1. RTM_ADD: Add a new route.
2. RTM_DELETE: delete an existing route.
3. R
TCP/IP note 4. application Layer (2) -- FTP 1. FTP (File Transfer Protocol) File Transfer Protocol FTP only provides some basic services for File Transfer, it uses TCP reliable transport service. The main function of FTP is to reduce or eliminate the incompatibility of File Processing in different operating systems. 1.
Details of TCP/IP 2: Implementation-route selection,
A process uses a plug-in the routing domain to send and receive routing packets. A PF_ROUTE
And a SOCK_RAW plug-in type. This process can send the following five optional packets to the kernel:
1. RTM_ADD: Add a new route.
2. RTM_DELETE: delete an existing route.
3.
requests:
The result of a socket system call when a pru_attach request is sent. The request calls the raw_attach function to connect the control block to the two-way linked list.
Pru_detach is a request sent by the close system call. This request will call the raw_detach function to delete the control block from the two-way linked list.
The pru_connect2 request comes from the socketpair System Call and is not supported in the routing selection domain.
The pru_disconnect request is sent by close
plug-in (using the prco_getopt option ).
3. fcntl and IOCTL system calls are not intentionally performed due to historical reasons. Several features of the plug-in API can be accessed either through IOCTL or through fcntl. The functions described in this section are displayed.
The characteristics of these two system calls related to the plug-in are summarized. We also list some traditional constants because they appear in the code. Considering the compatibility with POSIX, you can use o_nonbloc
2.1 Open System Interconnection Reference Model
ISO(International Standards Organization)OSI(Open System Interconnection) Model
Arranged from high to low, with a total of 7 layers.
Application: an operating system or network application.ProgramProvides interfaces.
Presentation layer (Presentation): converts the transmitted content to a meaningful encoding for the user.
Session Layer: creates, manages, and terminates a session.
Transport: segments upper-layer data to provide end-to-en
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.