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.

转载于:https://www.cnblogs.com/sansna/p/5421315.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值