tech-net archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: IPv6 task list
Loganaden Velvindron <logan%elandsys.com@localhost> wrote:
> Hi guys,
>
> I'm currently drafting a list of tasks that need to be done for the
> IPv6 stack in NetBSD.
>
> I would welcome feedback from everybody.
>
Unfortunately IPv6 stack was often done by copy-pasting the IPv4 code and
converting the it to use struct in6_addr with other necessary adjustments.
The result of this is: 1) massive code duplication 2) many duplicated
branches under #ifdef in TCP code. There are multiple IPv4 and IPv6 code
parts which could and should be merged. Few examples:
- Replace struct in_addr and struct in6_addr with a new structure and use
it to convert the code to be IP-version agnostic, thus remove many #ifdefs.
Possible approach: NPF has npf_addr_t and only the lower level primitives
separate v4 and v6 handling while the rest of the code is completely
IP-version agnostic. This has proven to be very successful approach.
- Merge IPv4 and IPv6 PCB interfaces into one (rpaulo-netinet-merge-pcb
branch was an attempt to do that in the past, see doc/BRANCHES).
- For something simpler - merge IPv4 and IPv6 reassembly, since they mostly
match (see ip_reass.c and frag6.c).
.. etc. The list can go on. This is a major work, though.
--
Mindaugas
Home |
Main Index |
Thread Index |
Old Index