Network programming four-layer model

Source: Internet
Author: User

1. TCP: Transmission Control Protocol IP used to detect errors in network transmissions: responsible for interconnection of different networks

2. TCP/IP protocol family: HTTP: (Hypetext Transfer Protocol) ARP (Address Resolution Protocol) Ip->mac Dos attack related to this

3. TCP/IP: Flow oriented, sticky packet phenomenon. UDP: Package-oriented, non-sticky package.

4. Socket:1) abstract descriptor for network communication 2) Auto Header (OS Help)

5. Socket is for NIC.

6. INET_ADDR () Converts a dotted decimal string into a network byte-order binary. Inet_ntoa () Dot decimal in network byte binary

7. SSH (Secure Shell Protocol) port number: DNS (domain Name System) port number: HTTP (Hypertext Transfer Protocol) port number: 80

8. Network transmission data must be network byte order (big endian byte order)

Host byte order--Network byte order htons network byte sequence, host byte order Ntohs

9. The macro definition is only valid for the first row.

10. The server must be bridged: Bind the NIC.

11. Network communication must have a return value.

12. The active end ID (client) can bind or bind. The operating system automatically binds any NIC.

The return value of accept is the socket FD of the client received.

14. Define the struct sockaddr_in variable and need to be emptied.

inet addr:127.0.0.1 Loopback ID (not native)

Network programming four-layer model

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.