1

Knowing the theory of how the seven layers interact and manipulate the data in theory is one thing, but how one implements this in the real-world with actual code is another.

I want to know how these layers are implemented in practice (PC as a example, because it uses all of the layers unlike a Router, etc.) - is every layer a separate process that has a standardized API (so there are many peices of software that work together) or is something like a network Driver for a specific HW/SW setup responsible for all of this using shared libraries and such? Or is it some other completely different approach?

The reason I'm asking this, is because I want to create my own network on the 868MHz band, and I want to use some existing code (for ex. a DataLink error correction and such code - because that is just way beyond my skill) but also write my own Network layer code to customize the way devices interact.

6
  • I know that I'm referencing a PC and that implies that I'm talking about TCP/IP, and that it doesn't work exactly like the OSI REFERENCE Model specifies, but the fact that TCP/IP was made based the OSI standard still stands. Commented Nov 26, 2016 at 15:13
  • 1
    Actually, TCP/IP came before the OSI model, and the OSI model is still just a model, not a standard. The OSI model was created to try to explain how something in an ideal world would work. The only thing I know that actually tried to implement OSI was IS-IS. Commented Nov 26, 2016 at 16:12
  • IS-IS: en.m.wikipedia.org/wiki/IS-IS Commented Nov 26, 2016 at 17:02
  • @RonMaupin Oh, didn't know that. Sorry and thanks! Commented Nov 26, 2016 at 18:20
  • 1
    @areuz The OSI project was not even in existence in 1970. The OSI model was released in 1984 as a standard for the ISO protocol suite that was released as a standard by the same organization. Generations of college teachers have mistakenly taught it as though it applies to the universe. It doesn't. You don't need seven layers to implement your protocol. Commented Nov 26, 2016 at 23:52

1 Answer 1

3

is something like a network Driver for a specific HW/SW setup responsible for all of this

Yes. In most all modern operating systems, the networking stack is implemented in the kernel, for performance and security reasons.

Performance: A lot of work goes into processing a packet, so it's more efficient to do that work in the kernel before dispatching the application-layer data to the application bound to the given socket.

Security: The kernel prevents unpriveleged users from doing "bad" things, like spoofing their IP address or flooding another host with ICMP messages.

A good resource to look at would be the Linux kernel source code.

  • net - Here you'll find all of the core device and protocol implementations (IP, TCP, UDP, etc.)
    • dev.c - Device management
    • ipv4 - IPv4 and UDP, TCP v4
    • ipv6 - IPv6 and UDP, TCP v6
  • drivers/net - Network device drivers
Sign up to request clarification or add additional context in comments.

2 Comments

Huh, I wanted to find the LoraWAN source code, and you pointed me right to it, actually to the IPv6 version, so even better.
Last few links sees to be dead @Jonathon

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.