Commit graph

8 commits

Author SHA1 Message Date
Robert Lubos 80339ac4ee net: dhcpv4: Add support for conflict detection
In case a conflict was detected on a DHCP-assigned address, send a
Decline message to the server and start over.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-06-10 00:59:28 -07:00
Jukka Rissanen 03e9b3f320 net: doc: dhcpv4.h: Document DHCPv4 message types
The DHCPv4 message type documentation was missing.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-21 15:41:19 -07:00
Fin Maaß 90a58099f5 net: dhcpv4: remove conditions in header
Remove conditional compile function declarations

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-04-01 12:08:55 -05:00
Fin Maaß c148dc15fd net: dhcpv4: add vendor specific option callback
In certain scenarios, it may be necessary to get values of additional
options from the application layer. With this patch, this can be
accomplished by registering a callback with the DHCP client.

This change has been tested using the posix build in qemu.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-03-05 10:22:21 -05:00
Matthias Breithaupt d2163bc0b9 net: DHCPv4: Add option callback
In certain scenarios, it may be necessary to get values of additional
options from the application layer. With this patch, this can be
accomplished by registering a callback with the DHCP client.

This change has been tested using the posix build in qemu.

Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
2023-05-22 15:25:40 +02:00
Krishna T 25d0f87b3c net: dhcp: Add support for restarting DHCP
If a L2 link has been established, then the DHCP is taking too long as
it has to go through its capped exponential backoff timers to trigger
discover (The DHCP starts immediately during init, this is itself wrong,
it should start on a link UP notification) that delays the DHCP for
few seconds to a minute.

And if we do stop and start DHCP then also it goes through the initial
delays (though configurable), which is also not ideal.

Add support for restarting DHCP without any delay, i.e., release and
send discover immediately.

This is also useful in case L2 switches to a different subnet, in this
case Zephyr doesn't restart DHCP automatically, this API can be used by
L2 apps/drivers to restart DHCP to get new subnet IP.

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
2022-09-06 09:56:22 +02:00
Gerard Marull-Paretas fb9b3bcd93 include: migrate includes to <zephyr/...>
In order to bring consistency in-tree, migrate all includes within
include directory to the new prefix <zephyr/...>. Note that the
conversion has been scripted, refer to zephyrproject-rtos#45388 for more
details.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-06 20:03:00 +02:00
Yuval Peress 53ef68d459 include: Prefix includes to use a scope
Move include paths and add new target_include_directories to support
backwards compatibility:
* /include -> /include/zephyr
  example: <irq.h> -> <zephyr/irq.h>

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00
Renamed from include/net/dhcpv4.h (Browse further)