5
* Copyright (C) 2007-2009 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
31
* @title: DHCP premitives
32
* @short_description: Functions for handling DHCP
35
enum connman_dhcp_state {
36
CONNMAN_DHCP_STATE_UNKNOWN = 0,
37
CONNMAN_DHCP_STATE_IDLE = 1,
38
CONNMAN_DHCP_STATE_BOUND = 2,
39
CONNMAN_DHCP_STATE_RENEW = 3,
40
CONNMAN_DHCP_STATE_FAIL = 4,
45
struct connman_dhcp *connman_dhcp_ref(struct connman_dhcp *dhcp);
46
void connman_dhcp_unref(struct connman_dhcp *dhcp);
48
int connman_dhcp_get_index(struct connman_dhcp *dhcp);
49
char *connman_dhcp_get_interface(struct connman_dhcp *dhcp);
51
void connman_dhcp_set_value(struct connman_dhcp *dhcp,
52
const char *key, const char *value);
54
void connman_dhcp_bound(struct connman_dhcp *dhcp);
55
void connman_dhcp_renew(struct connman_dhcp *dhcp);
56
void connman_dhcp_fail(struct connman_dhcp *dhcp);
58
void *connman_dhcp_get_data(struct connman_dhcp *dhcp);
59
void connman_dhcp_set_data(struct connman_dhcp *dhcp, void *data);
61
struct connman_dhcp_driver {
64
int (*request) (struct connman_dhcp *dhcp);
65
int (*release) (struct connman_dhcp *dhcp);
66
int (*renew) (struct connman_dhcp *dhcp);
69
int connman_dhcp_driver_register(struct connman_dhcp_driver *driver);
70
void connman_dhcp_driver_unregister(struct connman_dhcp_driver *driver);
76
#endif /* __CONNMAN_DHCP_H */