For instance, inside the Linux kernel there is dev_queue_xmlt().
Thanks. Seeing it now makes it look that simple.
Let me conclude there is no prescribed interface. Any help on a reference to an explanation of the functions in such interface would still be appreciated. Thanks!
The layered model does offer a notional interface, but not a concrete one, because the details of the lower layer will define what must be passed down. You need to provide the (non-inferred) header values for layer-2, and the higher-layer PDU. In the Ethernet case, that would be the source MAC, destination MAC, and ethertype. Also be careful of typos, IPv4 ethertype is 0x0800 not 0x8000.
lwIP for example has exactly that:
err_t ethernet_output ( struct netif * netif,
struct pbuf * p,
const struct eth_addr * src,
Lulll
u16_t eth_type
)
Thanks. This frame would seem level 2 to me. And then the ip layer will not have a notion of mac &@@@
most probably. Based on the pointer to lwip I read into ARP that I know of (of course), but never realized layer 2 keeps that mapping and not layer 3.
I have so much more questions to come. Allow me, with your inputs provided, to try to get two 20 year old layer 1 and 2 chips (ENC28J60) to talk to each other, connected via SPI to an RPi or stm32 and see initialization, discovery and useful payloads in action.
As for the work to come: I want to interface to Powerline communications (Homeplug AV MAC/PHY interfaced via SPI) chips and focus on the OFDM and tonemaps part. But not without truly understanding a simple IP connection over twisted pair works.