5 * Copyright (C) 2018 Commend International. 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.
19 * Address Conflict Detection (RFC 5227)
21 * based on DHCP client library with GLib integration,
22 * Copyright (C) 2009-2014 Intel Corporation. All rights reserved.
26 #ifndef __CONNMAN_ACD_H
27 #define __CONNMAN_ACD_H
38 struct acd_host *acd_host_new(int ifindex, const char* path);
39 void acd_host_free(struct acd_host *acd);
40 int acd_host_start(struct acd_host *acd, uint32_t ip);
41 void acd_host_stop(struct acd_host *acd);
43 typedef void (*acd_host_cb_t) (struct acd_host *acd, gpointer user_data);
46 ACD_HOST_EVENT_IPV4_AVAILABLE,
47 ACD_HOST_EVENT_IPV4_LOST,
48 ACD_HOST_EVENT_IPV4_CONFLICT,
49 ACD_HOST_EVENT_IPV4_MAXCONFLICT,
52 void acd_host_register_event(struct acd_host *acd,
53 enum acd_host_event event,
57 void acd_host_append_dbus_property(struct acd_host *acd, DBusMessageIter *dict);
59 unsigned int acd_host_get_conflicts_count(struct acd_host *acd);
65 #endif /* __CONNMAN_ACD_H */