5 * Copyright (C) 2007-2008 Intel Corporation. All rights reserved.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #ifndef __CONNMAN_DHCP_H
23 #define __CONNMAN_DHCP_H
29 #include <connman/iface.h>
31 enum connman_dhcp_state {
32 CONNMAN_DHCP_STATE_UNKNOWN = 0,
33 CONNMAN_DHCP_STATE_INIT = 1,
34 CONNMAN_DHCP_STATE_BOUND = 2,
35 CONNMAN_DHCP_STATE_RENEW = 3,
36 CONNMAN_DHCP_STATE_FAILED = 4,
39 struct connman_dhcp_driver {
41 int (*request) (struct connman_iface *iface);
42 int (*release) (struct connman_iface *iface);
45 extern int connman_dhcp_register(struct connman_dhcp_driver *driver);
46 extern void connman_dhcp_unregister(struct connman_dhcp_driver *driver);
48 extern int connman_dhcp_update(struct connman_iface *iface,
49 enum connman_dhcp_state state,
50 struct connman_ipv4 *ipv4);
56 #endif /* __CONNMAN_DHCP_H */