From 2649ee838c0510b9cf77aa2d3f0e9b4d34706c38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Wed, 24 Sep 2025 15:27:27 +0200 Subject: [PATCH] dhcpv4: move struct dhcpv4_dnr to header MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This helps declutter dhcpv4.c a little bit. Signed-off-by: David Härdeman Link: https://github.com/openwrt/odhcpd/pull/264 Signed-off-by: Álvaro Fernández Rojas --- src/dhcpv4.c | 8 -------- src/dhcpv4.h | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/dhcpv4.c b/src/dhcpv4.c index f7d93c4..cf5a244 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -318,14 +318,6 @@ static int dhcpv4_send_reply(const void *buf, size_t len, return sendto(*sock, buf, len, MSG_DONTWAIT, dest, dest_len); } -/* DNR */ -struct dhcpv4_dnr { - uint16_t len; - uint16_t priority; - uint8_t adn_len; - uint8_t body[]; -}; - void dhcpv4_handle_msg(void *addr, void *data, size_t len, struct interface *iface, _unused void *dest_addr, send_reply_cb_t send_reply, void *opaque) diff --git a/src/dhcpv4.h b/src/dhcpv4.h index f02529f..7db5c52 100644 --- a/src/dhcpv4.h +++ b/src/dhcpv4.h @@ -97,6 +97,14 @@ struct dhcpv4_option { uint8_t data[]; }; +/* DNR */ +struct dhcpv4_dnr { + uint16_t len; + uint16_t priority; + uint8_t adn_len; + uint8_t body[]; +}; + #define dhcpv4_for_each_option(start, end, opt)\ for (opt = (struct dhcpv4_option*)(start); \ -- 2.30.2