Does each OSI Layer have its own set of API for network communication ?

As the title states does each OSI Layer have its own set of exclusive API’s for network communication ?

In a word, no.

Some layers are inaccessible to software (layer 1) and many higher layers are not well separated by practical protocols (I.e. TCP combines several)

Generally speaking you can use APIs at layer 2, 3 & 4+ if you understand the network topology. Other than network sniffers and similar software, well written applications don?t work with anything other than the 4+ APIs and require the user / admin the correct host names (DNS or WINS etc.) network addresses (IPv4, IPv6 etc.) and other related items like SPNs. They simply pass this data in as blobs to appropriate Winsock APIs and let the network stack figure out what to do with it. Drivers in the stack however are intimately concerned with these concepts and for performance reasons do not implement the OSI stack using an intuitive separation of responsibilities for each layer. Consider what a TCP offload engine must do and which layers it must work on remembering that not all traffic on a NIC will be TCP and not necessarily IP either.

If you are interested in more detail about any specific layer, or how to achieve a specific goal, I suggest that you ask a more specific question. Although this is of topic for this list, depending on what you are trying to achieve it might just be tangentially related to windows KM programming enough to elicit a cogent response

Sent from Mailhttps: for Windows 10

From: xxxxx@hotmail.commailto:xxxxx
Sent: January 8, 2017 3:53 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Does each OSI Layer have its own set of API for network communication ?

As the title states does each OSI Layer have its own set of exclusive API’s for network communication ?


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></mailto:xxxxx></mailto:xxxxx></https:>

Hello and thank you. But in a nutshell It is possible for a process to create a TCP packet at any of OSI layers and inject into to that particular layer of course the entire formatting will have to be done by the process entirely yes ?

>It is possible for a process to create a TCP packet at any of OSI layers

This question doesn’t quite make sense. You can open a raw socket and send an arbitrary packet, but it will not be “injected” to any layer because it will not be consistent with any open connection, etc.

On Jan 8, 2017, at 3:12 PM, xxxxx@hotmail.com wrote:

Hello and thank you. But in a nutshell It is possible for a process to create a TCP packet at any of OSI layers and inject into to that particular layer of course the entire formatting will have to be done by the process entirely yes ?

The question doesn’t make sense. TCP is layer 4.

You need to remember that the OSI model is a conceptual model – it is a helpful visualization tool, not an implementation guide. The mappings to actual implementations tend to be rather loose. Layers 1 and 2 tend to be hardware. Layers 6 and 7 are application-related, not kernel-related.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.