I wonder if every application has its own full ip stack or there is a stack in the system and all applications use it. Or, maybe some of the layers are seperate, e.g. application layer, for each application and the rest are common?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It depends entirely on the application. The short answer is that there are already common full-stack networking implementations, and each application reimplements as little as it can ge away with. In particular:
The networking in many modern applications is limited to calling library functions that take a URL and return a file, or maybe a parsed JSON object, of what was at that URL. These applications are basically operating above the Level 7 Application layer. The entire networking stack is shared.
Applications that need more control over the HTTP being passed around, such as a Django web application, will implement additional HTTP processing. These are operating at the Level 7 Application layer and leave everything else to common libraries, and to the operating system.
Applications like databases, where HTTP is too awkward or not fast enough, will implement their own higher-level protocols on top of TCP. For example, the MySQL network protocol. These applications are operating at the Level 6 Presentation layer.
Communication applications, like Skype, and some VPNs, have specialized network requirements, like latency, that TCP cannot support. So these applications have to implement their own Layer 5 Session or maybe even Layer 4 Transport protocols. The operating system handles everything else.
Debugging tools, like the Wireshark packet dumper, need to operate at the Layer 3 Network and Layer 2 Data link levels. Other applications that need to work at this level include people experimenting with writing new network protocols. But this is a lot of work that would not be worth it for most applications.
Finally, there are very specialized application areas like high-frequency stock trading for which even Ethernet is considered insufficient, and the entire networking stack is replaced all the way down to Level 1 Physical with a different implementation such as using Infiniband fiber optics, custom protocols, and custom switches.
The Layer 1 Physical implementation is usually fixed in hardware. Layers 2 Data Link through
Layer 5 Session are usually implemented in the operating system kernel, but applications can “plug in” at whatever level they need. And there are many standard libraries for Layer 6 Presentation, such as OpenSSL, and for Layer 7 Application as well. So most programs share their entire networking stack, or nearly all of it, but applications with specialized requirements may custom-implement any or even all layers.