[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #7224] Add netif flag for AutoIP & AutoIP fallback t
From: |
Bill Auerbach |
Subject: |
[lwip-devel] [patch #7224] Add netif flag for AutoIP & AutoIP fallback to static IP |
Date: |
Wed, 16 Jun 2010 20:41:42 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729) |
URL:
<http://savannah.nongnu.org/patch/?7224>
Summary: Add netif flag for AutoIP & AutoIP fallback to
static IP
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: billauerbach
Submitted on: Wed 16 Jun 2010 04:41:41 PM EDT
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
This patch adds 2 features:
1. netif flags will have NETIF_FLAG_AUTOIP set if AutoIP provided the IP
address. NETIF_FLAG_DHCP will not be set in this case.
2. Function autoip_set_ip_addr can be used before calling dhcp_start to
provide the AutoIP fallback IP address. AutoIP will use this address. If a
collision occurs it will increment and continue until trying addresses until
no collision is detected. This was done to assure no devices can come up with
conflicting IP addresses.
For complete support of dynamic Ethernet cable changes, the following needs
to be used in code that detects that the link has come up:
if( you_are_in_static_ip_mode )
dhcp_inform( netif_default );
else // either AutoIP or AutoIP will fallback to static.
dhcp_network_changed( netif_default );
For changing the IP address and "mode" from a configuration utility, call
autoip_set_ip_addr with NULL to clear the fallback address and if the user
chooses AutoIP with static fallback, call autoip_set_ip_addr with the new
address. Use dhcp_network_changed IF the old mode was not static, otherwise
you need to use dhcp_start to get dhcp running. If the user selects static IP
call dhcp_stop and netif_set_addr to set the static parameters.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 16 Jun 2010 04:41:41 PM EDT Name: AutoIP_patch.txt Size: 7kB
By: billauerbach
<http://savannah.nongnu.org/patch/download.php?file_id=20764>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?7224>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [patch #7224] Add netif flag for AutoIP & AutoIP fallback to static IP,
Bill Auerbach <=