码迷,mamicode.com
首页 > Web开发 > 详细

Net Protocol Related

时间:2016-04-22 16:02:14      阅读:211      评论:0      收藏:0      [点我收藏+]

标签:

Data used to deliver through net should be encapsulated.

General encapsulation include 4 layer of header,  in UNIX, it‘s:

  • Application Layer (telnet, ftp, etc)
  • Host to Host Transport Layer(TCP, UDP)
  • Internet Layer(IP, internet routing)
  • Network Access Layer(Ethernet, wi-fi.. )

It means the application that need to send data shall encapsulate/uncapsulate the 1st Layer. The H2H layer is about the data correctness. The Internet Layer has info to do internet routing between gateways, to get the packages sent to the destination. NALayer includes info about the data‘s transmission type.

However, a full-blown model is: (needtoremember)

  • Application
  • Presentation
  • Session
  • Transport
  • Network
  • Data Link
  • Physical

So much work need to be done before a package can be sent.

Sockets:

File descriptor is an integer associated with an open file. In UNIX systems, this file can be a FIFO, a pipe, a terminal, a real-on-the-disk file...

Port Numbers along with the IP address is used in network. As IP is used in internet routing, port no. is used in TCP/UDP sockets. It‘s a 16 bit- totally 65536 sized.

Some famous port numbers are given in this site.

Net Protocol Related

标签:

原文地址:http://www.cnblogs.com/sansna/p/5421315.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!