Device-agnostic network interface
I'm trying to learn more about OpenBSD, but I'm coming from a Linux kernel background and having a bit of trouble. Specifically, I'm trying to familiarize myself with the networking code. I haven't been able to find many good resources that deal specifically with the kernel code, so if you have any recommendations - I'm all ears. And if I'm completely missing the point about some differences between Linux and BSD, please tell me!
In Linux terms, I'm trying to find the equivalent of net_rx and dev_queue_xmit, if such a thing exists. They're functions that basically send raw packets to the device, and receive raw packets from the device. With the exception of NAPI-drivers - pretty much everything goes through these functions regardless of device or protocol. I like to think of these functions and the sockets-related system calls as the beginning and and of the network stack - and since it's an easy way for me to think about it - I was hoping BSD would be the same.
I've been searching through the OpenBSD code, and I found ether_input and ether_output in sys/net/if_ethersubr.c, and this function (or variations of it) is called by usb drivers and all other sorts. So my question is, are these the functions I'm looking for? They sound ethernet specific - are there any other link-layer protocols that get handled? And if so, how are these functions linked to the device level?
Thanks for any help or references you may be able to provide!