summaryrefslogtreecommitdiff
path: root/include/acd.h
diff options
context:
space:
mode:
authorChristian Spielberger <christian.spielberger@gmail.com>2018-05-15 12:35:20 +0200
committerDaniel Wagner <wagi@monom.org>2018-05-24 22:17:38 +0200
commit42b14bcca02c85623532352089d10ff3e8b5ef9b (patch)
tree0b66cc496f706258f8f863663370e80866105557 /include/acd.h
parenta3ec2fd0d5be47f47854c0d0698515ab8389e1f8 (diff)
downloadconnman-42b14bcca02c85623532352089d10ff3e8b5ef9b.tar.gz
acd: Add callback function pointers
Adds the callback functions for higher level address conflict handling. ipv4_available_cb will be called if there was no address conflict detected. ipv4_lost_cb will be called if another host is using our IPv4 address and defending was not successfull. ipv4_conflict_cb will be called if ACD detected a conflict during probing and there had been less than MAX_CONFLICTS conflicts. ipv4_max_conflicts_cb will be called if ACD detected a conflict during probing and there had been at least MAX_CONFLICTS conflicts.
Diffstat (limited to 'include/acd.h')
-rw-r--r--include/acd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/acd.h b/include/acd.h
index 211d825e..ce7bc9fd 100644
--- a/include/acd.h
+++ b/include/acd.h
@@ -27,6 +27,7 @@
#define __CONNMAN_ACD_H
#include <stdint.h>
+#include <glib.h>
#ifdef __cplusplus
extern "C" {
@@ -38,6 +39,8 @@ struct acd_host *acd_host_new(int ifindex);
int acd_host_start(struct acd_host *acd, uint32_t ip);
void acd_host_stop(struct acd_host *acd);
+typedef void (*acd_host_cb_t) (struct acd_host *acd, gpointer user_data);
+
#ifdef __cplusplus
}
#endif