Embedded TCP/IP stack: AUTOIP service API

FNET

Embedded TCP/IP stack  4.1.0

Detailed Description

Autop-IP service is used to automatically configure an interface with an IPv4 link-local address within the 169.254/16 prefix that is valid for communication with other devices connected to the same physical (or logical) link.
IPv4 Link-Local addresses are not suitable for communication with devices not directly connected to the same physical (or logical) link, and are only used where stable, routable addresses are not available (such as on ad hoc or isolated networks).
Upon receiving a conflicting ARP packet, a Auto-IP service immediately configure a new IPv4 Link-Local address.
The protocol specification is defined by RFC3927.

After the Auto-IP service is initialized by calling the fnet_autoip_init() function, the user application should call the main service-polling function fnet_service_poll() periodically in background.

The Auto-IP service is released automatically if an application will change the interface IPv4-adress parameters manually or start DHCP service.
For the Auto-IP service example, refer to the FNET Shell demo source code.
Configuration parameters:

Data Structures

struct  fnet_autoip_params
 Initialization parameters for the fnet_autoip_init() function. More...
 

Macros

#define FNET_AUTOIP_NETWORK   FNET_IP4_ADDR_INIT(169U, 254U, 0U, 0U)
 The Link-Local network address 169.254.0.0/16.

. More...

 
#define FNET_AUTOIP_NETMASK   FNET_IP4_ADDR_INIT(255U, 255U, 0U, 0U)
 The Link-Local netmask 255.255.0.0/16.

. More...

 

Typedefs

typedef void * fnet_autoip_desc_t
 Auto-IP service descriptor. More...
 
typedef void(* fnet_autoip_callback_t) (fnet_autoip_desc_t desc, fnet_netif_desc_t netif, void *cookie)
 Auto-IP event handler callback function prototype, that is called when the Auto-IP service has updated the IPv4 parameters or adress probing. More...
 

Functions

fnet_autoip_desc_t fnet_autoip_init (struct fnet_autoip_params *params)
 Initializes the Auto-IP service. More...
 
void fnet_autoip_release (fnet_autoip_desc_t desc)
 Releases the Auto-IP service. More...
 
void fnet_autoip_set_callback_updated (fnet_autoip_desc_t desc, fnet_autoip_callback_t callback_updated, void *cookie)
 Registers the "IPv4 parameters updated" Auto-IP event handler callback. More...
 
void fnet_autoip_set_callback_probe (fnet_autoip_desc_t desc, fnet_autoip_callback_t callback_probe, void *param)
 Registers the "Address probing" Auto-IP event handler callback. More...
 
fnet_bool_t fnet_autoip_is_enabled (fnet_autoip_desc_t desc)
 Detects if the Auto-IP service is enabled or disabled. More...
 
fnet_autoip_desc_t fnet_autoip_get_by_netif (fnet_netif_desc_t netif)
 Looks for a Auto-IP service assigned to the specified network interface. More...
 

© 2005-2018 by Andrey Butok. http://fnet.sourceforge.net