[riot-notifications] [RIOT-OS/RIOT] sys/net/dhcpv6: Refactor DHCPv6 client (#16728)

Jan Romann notifications at github.com
Fri Aug 13 15:49:13 CEST 2021


### Contribution description

This PR makes a couple of changes to the DHCPv6 client implementation to increase maintainability and the possibility to add new features.

It mostly moves existing code to separate functions but also refactors the composition of messages by adding a new `_compose_message` function which eliminates some code duplication and makes it easier to see which options are used (or requested) with each message type. This should also make it easier to add additional features like information-requests to the client.

### Testing procedure

You can use the existing tests under `tests/gnrc_dhcpv6_client` and `tests/gnrc_dhcpv6_client_6lbr`. Despite the changes, these should still work.

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/16728

-- Commit Summary --

  * sys/net/dhcpv6: Refactor mrd calculation
  * sys/net/dhcpv6: Refactor message composition
  * sys/net/dhcpv6: Refactor parsing of IA_PD
  * sys/net/dhcpv6: Refactor update of leases

-- File Changes --

    M sys/net/application_layer/dhcpv6/client.c (294)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/16728.patch
https://github.com/RIOT-OS/RIOT/pull/16728.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16728
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210813/6d90bdee/attachment.htm>


More information about the notifications mailing list