summaryrefslogtreecommitdiff
path: root/include/acd.h
Commit message (Collapse)AuthorAgeFilesLines
* acd: Add acd_host_free() deallocatorDaniel Wagner2018-08-291-0/+1
| | | | | | | | | | | | | | | | | | | Valgrind reports that we do not free acd->interface: ==13496== 5 bytes in 1 blocks are definitely lost in loss record 9 of 194 ==13496== at 0x4C2CB6B: malloc (vg_replace_malloc.c:299) ==13496== by 0x4E89378: g_malloc (gmem.c:94) ==13496== by 0x4EA294E: g_strdup (gstrfuncs.c:363) ==13496== by 0x461BD4: connman_inet_ifname (inet.c:274) ==13496== by 0x48E903: acd_host_new (acd.c:129) ==13496== by 0x43F1DF: start_acd (network.c:384) ==13496== by 0x43F3A2: dhcp_success (network.c:436) ==13496== by 0x43F4BD: dhcp_callback (network.c:487) ==13496== by 0x468A34: dhcp_valid (dhcp.c:176) ==13496== by 0x46975B: lease_available_cb (dhcp.c:519) ==13496== by 0x415E61: listener_event (client.c:2443) ==13496== by 0x4E83B96: g_main_dispatch (gmain.c:3142) ==13496== by 0x4E83B96: g_main_context_dispatch (gmain.c:3795)
* acd: Add acd_host_get_conflicts_countChristian Spielberger2018-05-241-0/+2
| | | | This is necessary to decide if DHCP can be tried again.
* acd: Add D-Bus property for address conflictChristian Spielberger2018-05-241-1/+3
| | | | | Adds a D-Bus property called LastAddressConflict and a signal to notify if the property changes.
* acd: Add callback registrationChristian Spielberger2018-05-241-0/+12
| | | | | Adds function acd_host_register_event for registration of higher level address conflict callback functions.
* acd: Add callback function pointersChristian Spielberger2018-05-241-0/+3
| | | | | | | | | | | | | | | | | 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.
* acd: Add functions start/stop_listeningChristian Spielberger2018-05-241-0/+2
| | | | | | Adds functions for starting and stopping of the ARP listening which is essential for ACD. Adds also the callback function for processing received ARP packets which does nothing for the moment.
* acd: Add struct acd_hostChristian Spielberger2018-05-241-0/+4
| | | | | Adds an enum for the ACD state machine, the ACD struct, a function for allocation and initialization of the struct.
* acd: Add Address Conflict Detection support (RFC 5227)Christian Spielberger2018-05-241-0/+39
Add first acd.h, acd.c, a configuration ACD on/off switch and a first version of start_acd in network.c which does nothing for the moment.