Rtos API example

Embed: (wiki syntax)

« Back to documentation index

lwip_autoip.c File Reference

lwip_autoip.c File Reference

AutoIP Automatic LinkLocal IP Configuration. More...

Go to the source code of this file.

Functions

static err_t autoip_arp_announce (struct netif *netif)
 Sends an ARP announce from a network interface.
void autoip_set_struct (struct netif *netif, struct autoip *autoip)
 Set a statically allocated struct autoip to work with.
static void autoip_restart (struct netif *netif)
 Restart AutoIP client and check the next address (conflict detected)
static void autoip_handle_arp_conflict (struct netif *netif)
 Handle a IP address conflict after an ARP conflict detection.
static void autoip_create_addr (struct netif *netif, ip4_addr_t *ipaddr)
 Create an IP-Address out of range 169.254.1.0 to 169.254.254.255.
static err_t autoip_arp_probe (struct netif *netif)
 Sends an ARP probe from a network interface.
static err_t autoip_bind (struct netif *netif)
 Configure interface for use with current LL IP-Address.
err_t autoip_start (struct netif *netif)
 Start AutoIP client.
void autoip_network_changed (struct netif *netif)
 Handle a possible change in the network configuration.
err_t autoip_stop (struct netif *netif)
 Stop AutoIP client.
void autoip_tmr (void)
 Has to be called in loop every AUTOIP_TMR_INTERVAL milliseconds.
void autoip_arp_reply (struct netif *netif, struct etharp_hdr *hdr)
 Handles every incoming ARP Packet, called by etharp_input().
u8_t autoip_supplied_address (const struct netif *netif)
 check if AutoIP supplied netif->ip_addr

Detailed Description

AutoIP Automatic LinkLocal IP Configuration.

This is a AutoIP implementation for the lwIP TCP/IP stack. It aims to conform with RFC 3927.

Definition in file lwip_autoip.c.


Function Documentation

static err_t autoip_arp_announce ( struct netif netif ) [static]

Sends an ARP announce from a network interface.

Parameters:
netifnetwork interface used to send the announce

Definition at line 216 of file lwip_autoip.c.

static err_t autoip_arp_probe ( struct netif netif ) [static]

Sends an ARP probe from a network interface.

Parameters:
netifnetwork interface used to send the probe

Definition at line 203 of file lwip_autoip.c.

void autoip_arp_reply ( struct netif netif,
struct etharp_hdr hdr 
)

Handles every incoming ARP Packet, called by etharp_input().

Parameters:
netifnetwork interface to use for autoip processing
hdrIncoming ARP packet

Definition at line 453 of file lwip_autoip.c.

static err_t autoip_bind ( struct netif netif ) [static]

Configure interface for use with current LL IP-Address.

Parameters:
netifnetwork interface to configure with current LL IP-Address

Definition at line 227 of file lwip_autoip.c.

static void autoip_create_addr ( struct netif netif,
ip4_addr_t ipaddr 
) [static]

Create an IP-Address out of range 169.254.1.0 to 169.254.254.255.

Parameters:
netifnetwork interface on which create the IP-Address
ipaddrip address to initialize

Definition at line 168 of file lwip_autoip.c.

static void autoip_handle_arp_conflict ( struct netif netif ) [static]

Handle a IP address conflict after an ARP conflict detection.

Definition at line 135 of file lwip_autoip.c.

void autoip_network_changed ( struct netif netif )

Handle a possible change in the network configuration.

If there is an AutoIP address configured, take the interface down and begin probing with the same address.

Definition at line 332 of file lwip_autoip.c.

static void autoip_restart ( struct netif netif ) [static]

Restart AutoIP client and check the next address (conflict detected)

Parameters:
netifThe netif under AutoIP control

Definition at line 124 of file lwip_autoip.c.

u8_t autoip_supplied_address ( const struct netif netif )

check if AutoIP supplied netif->ip_addr

Parameters:
netifthe netif to check
Returns:
1 if AutoIP supplied netif->ip_addr (state BOUND or ANNOUNCING), 0 otherwise

Definition at line 511 of file lwip_autoip.c.

void autoip_tmr ( void   )

Has to be called in loop every AUTOIP_TMR_INTERVAL milliseconds.

Definition at line 365 of file lwip_autoip.c.