[haiku-development] Re: [haiku-development]

  • From: Swan Geon <swangeon@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 9 Jul 2023 21:34:20 -0500

register_device_handler is the way to get packets received from an
interface up to the "link" protocols in the network stack.

The binding depends on the interface type as well as the protocol type (in
the case of ethernet that would be the "ethertype" field in the ethernet
header).

So, first of all, which types are we looking at? Is it a new frame type
similar to loopback frame, and IPv4? If so, did you add that pair of
protocols in src/add-ons/kernel/network/stack/stack.cpp in init_stack?
There is a series of calls to register_domain_datalink_protocol there that
should set things up. Ideally, there would be a more dynamic way for
protocols to discover each other, but for now this part is fully static and
fixed by the network stack. Or are we looking at registration problems for
higher layers? (for example ICMP on top of IPv4?)

Considering that I do this here
https://review.haiku-os.org/c/haiku/+/6608/8/src/add-ons/kernel/network/stack/stack.cpp#834
I think we are looking at registration problems for higher layers.

Other related posts: