7 * Copyright (c) 2017, ETH Zurich.
10 * This file is distributed under the terms in the attached LICENSE file.
11 * If you do not find this file, copies can be found by writing to:
12 * ETH Zurich D-INFK, Universitaetsstrasse 6, CH-8092 Zurich. Attn: Systems Group.
16 #ifndef LIB_NET_INCLUDE_NETWORKING_DHCP_H_
17 #define LIB_NET_INCLUDE_NETWORKING_DHCP_H_
20 #include <lwip/ip_addr.h>
23 * @brief starts the dhcpd service on the interface
25 * @param flags flags to provide
27 * @return SYS_ERR_OK on success, errval on failure
29 errval_t dhcpd_start(net_flags_t flags);
33 * @brief stops the dhcpd service
35 errval_t dhcpd_stop(void);
38 /* functions for querying the current settings */
41 * @brief queries the DHCPD settings of the machine
43 * @param flags flags to provide
45 * @return SYS_ERR_OK on success, errval on failure
47 errval_t dhcpd_query(net_flags_t flags);
51 * @brief returns the IP configuration
53 * @param ip return the IP address
54 * @param gw returns the gateway
55 * @param nm returns the netmask
59 errval_t dhcpd_get_ipconfig(struct in_addr *ip, struct in_addr *gw, struct in_addr *nm);
62 * @brief sets the IP configuration
64 * @param ip the IP address
65 * @param gw the Gateway
66 * @param nm the Netmask
68 * @return SYS_ERR_OK on success, errval on failure
70 errval_t dhcpd_set_ipconfig(struct in_addr *ip, struct in_addr *gw, struct in_addr *nm);
72 #endif /* LIB_NET_INCLUDE_NETWORKING_DHCP_H_ */