lwIP 2.2.0 Lightweight IP stack

Functions
ACD
APIs » "raw" APIs » IP » IPv4

## Functions
err_t | acd_add (struct netif *netif, struct acd *acd, acd_conflict_callback_t acd_conflict_callback)
void | acd_remove (struct netif *netif, struct acd *acd)
err_t | acd_start (struct netif *netif, struct acd *acd, ip4_addr_t ipaddr)
err_t | acd_stop (struct acd *acd)
void | acd_network_changed_link_down (struct netif *netif)
void | acd_netif_ip_addr_changed (struct netif *netif, const ip_addr_t *old_addr, const ip_addr_t *new_addr)

## Detailed Description

ACD related functions USAGE:

define LWIP_ACD 1 in your lwipopts.h Options: ACD_TMR_INTERVAL msecs, I recommend a value of 100. The value must divide 1000 with a remainder almost 0. Possible values are 1000, 500, 333, 250, 200, 166, 142, 125, 111, 100 ....

For fixed IP:

- call acd_start after selecting an IP address. The caller will be informed on conflict status via the callback function.

With AUTOIP:

- will be called from the autoip module. No extra's needed.

With DHCP:

- enable LWIP_DHCP_DOES_ACD_CHECK. Then it will be called from the dhcp module. No extra's needed.

## Function Documentation

## ◆ acd_add()

err_t acd_add | ( | struct netif * | netif,
|  | struct acd * | acd,
|  | acd_conflict_callback_t | acd_conflict_callback
| ) |  |

Add ACD client to the client list and initialize callback function

Parameters

  netif | network interface on which to start the acd client
  acd | acd module to be added to the list
  acd_conflict_callback | callback to be called when conflict information is available

## ◆ acd_netif_ip_addr_changed()

void acd_netif_ip_addr_changed | ( | struct netif * | netif,
|  | const ip_addr_t * | old_addr,
|  | const ip_addr_t * | new_addr
| ) |  |

Inform the ACD modules of address changes

Parameters

  netif | network interface on which the address is changing
  old_addr | old ip address
  new_addr | new ip address

## ◆ acd_network_changed_link_down()

void acd_network_changed_link_down | ( | struct netif * | netif | ) |

Inform the ACD modules when the link goes down

Parameters

  netif | network interface on which to inform the ACD clients

## ◆ acd_remove()

void acd_remove | ( | struct netif * | netif,
|  | struct acd * | acd
| ) |  |

Remvoe ACD client from the client list

Parameters

  netif | network interface from which to remove the acd client
  acd | acd module to be removed from the list

## ◆ acd_start()

err_t acd_start | ( | struct netif * | netif,
|  | struct acd * | acd,
|  | ip4_addr_t | ipaddr
| ) |  |

Start ACD client

Parameters

  netif | network interface on which to start the acd client
  acd | acd module to start
  ipaddr | ip address to perform acd on

## ◆ acd_stop()

err_t acd_stop | ( | struct acd * | acd | ) |

Stop ACD client

Parameters

  acd | acd module to stop