Net Protocol Related

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.

posted on 2016-04-22 14:54  三叁  阅读(179)  评论(0编辑  收藏  举报

导航