Data used to deliver through net should is encapsulated.
General encapsulation include 4 layer of headers, 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, need to send data shall encapsulate/uncapsulate the 1st Layer. The H2H layer is about the data correctness. The Internet Layer has an info to does 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 is done before a package can sent.
Sockets:
File descriptor is a integer associated with an open file. In UNIX systems, the This file can be a FIFO, a pipe, a terminal, a Real-on-the-disk file ...
Port Numbers along with the IP address was used in network. As IP is used in Internet routing, Port No. is used in TCP/UDP sockets. It's a bit-totally 65536 sized.
Some famous port numbers is given in this site.
Net Protocol Related