mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-03 22:11:55 +00:00
The existing dhcpv4 initialization code places all initialization in the per iface dhcpv4_start() code. The net_udp_register() setup needs to happen once for the dhcpv4 instance rather than once per iface. Subsequent patches in this series also need a place to perform one time initialization, independent of iface. Factor the one time setup code out of the existing net_dhcpv4_start() into a dhcpv4_init() function. Rather than use SYS_INIT() to run dhcpv_init() we hook directly into net_init(). The prototype of dhcpv4_init() is shared within the net subsystem with a new private header file deliberately to avoid exposing the function via the public API in include/net/dhcpv4.h Change-Id: I3502a53cc3bfe4db4e4cd22c02ae133c266fdf10 Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
20 lines
266 B
C
20 lines
266 B
C
/** @file
|
|
*
|
|
* @brief DHCPv4 handler.
|
|
*
|
|
* This is not to be included by the application.
|
|
*/
|
|
|
|
/*
|
|
* Copyright (c) 2017 ARM Ltd.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef __INTERNAL_DHCPV4_H
|
|
#define __INTERNAL_DHCPV4_H
|
|
|
|
int dhcpv4_init(void);
|
|
|
|
#endif
|