[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-development
Subject:    [haiku-development] Re: register_domain_protocols Function
From:       Jérôme Duval <jerome.duval () gmail ! com>
Date:       2023-05-19 7:40:05
Message-ID: CAPZRpdNdDVipsNdK3XF39cH40dveDuF2xxFDof0upC2JJEWCSg () mail ! gmail ! com
[Download RAW message or body]

Le jeu. 18 mai 2023 =C3=A0 22:43, <pulkomandy@pulkomandy.tk> a =C3=A9crit :

> So we have to "bind" several things together:
>
> - The interface declares an interface type
> - The datalink protocol checks that interface type (https://cgit.haiku-os=
.org/haiku/tree/src/add-ons/kernel/network/datalink_protocols/loopback_fram=
e/loopback_frame.cpp#n50) If you want to use loopback_frame with an interfa=
ce of type IFT_TUN, you must adjust this check
> - At the moment the network stack hardcodes what's allowed in terms of pr=
otocol and interfaces stacks, the combinations allowed are defined by the f=
unction calls here: https://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel=
/network/stack/stack.cpp#n834
> - This info is later used by get_domain_datalink_protocols for example

Also make sure when creating the route to not use the local flag,
otherwise the packet won't go the next level (
https://cgit.haiku-os.org/haiku/tree/src/add-ons/kernel/network/stack/datal=
ink.cpp#n363
).
I pushed a patch to also set the address on the net_buffer, when using
the flag host: https://review.haiku-os.org/c/haiku/+/6451

Bye,
J=C3=A9r=C3=B4me

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic