mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-09 00:53:37 +08:00
started with bug #48728: move protocol definitions to 'include/prot/*.h' files (started with some IPv4 protocols)
This commit is contained in:
@@ -66,34 +66,11 @@
|
||||
#include "lwip/netif.h"
|
||||
#include "lwip/autoip.h"
|
||||
#include "lwip/etharp.h"
|
||||
#include "lwip/prot/autoip.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
/* 169.254.0.0 */
|
||||
#define AUTOIP_NET 0xA9FE0000
|
||||
/* 169.254.1.0 */
|
||||
#define AUTOIP_RANGE_START (AUTOIP_NET | 0x0100)
|
||||
/* 169.254.254.255 */
|
||||
#define AUTOIP_RANGE_END (AUTOIP_NET | 0xFEFF)
|
||||
|
||||
/* RFC 3927 Constants */
|
||||
#define PROBE_WAIT 1 /* second (initial random delay) */
|
||||
#define PROBE_MIN 1 /* second (minimum delay till repeated probe) */
|
||||
#define PROBE_MAX 2 /* seconds (maximum delay till repeated probe) */
|
||||
#define PROBE_NUM 3 /* (number of probe packets) */
|
||||
#define ANNOUNCE_NUM 2 /* (number of announcement packets) */
|
||||
#define ANNOUNCE_INTERVAL 2 /* seconds (time between announcement packets) */
|
||||
#define ANNOUNCE_WAIT 2 /* seconds (delay before announcing) */
|
||||
#define MAX_CONFLICTS 10 /* (max conflicts before rate limiting) */
|
||||
#define RATE_LIMIT_INTERVAL 60 /* seconds (delay between successive attempts) */
|
||||
#define DEFEND_INTERVAL 10 /* seconds (min. wait between defensive ARPs) */
|
||||
|
||||
/* AutoIP client states */
|
||||
#define AUTOIP_STATE_OFF 0
|
||||
#define AUTOIP_STATE_PROBING 1
|
||||
#define AUTOIP_STATE_ANNOUNCING 2
|
||||
#define AUTOIP_STATE_BOUND 3
|
||||
|
||||
/** Pseudo random macro based on netif informations.
|
||||
* You could use "rand()" from the C Library if you define LWIP_AUTOIP_RAND in lwipopts.h */
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
#include "lwip/autoip.h"
|
||||
#include "lwip/dns.h"
|
||||
#include "lwip/etharp.h"
|
||||
#include "lwip/prot/dhcp.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -384,6 +385,7 @@ dhcp_select(struct netif *netif)
|
||||
|
||||
/**
|
||||
* The DHCP timer that checks for lease renewal/rebind timeouts.
|
||||
* Must be called once a minute (see @ref DHCP_COARSE_TIMER_SECS).
|
||||
*/
|
||||
void
|
||||
dhcp_coarse_tmr(void)
|
||||
@@ -419,7 +421,8 @@ dhcp_coarse_tmr(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* DHCP transaction timeout handling
|
||||
* DHCP transaction timeout handling (this function must be called every 500ms,
|
||||
* see @ref DHCP_FINE_TIMER_MSECS).
|
||||
*
|
||||
* A DHCP server is expected to respond within a short period of time.
|
||||
* This timer checks whether an outstanding DHCP request is timed out.
|
||||
@@ -850,7 +853,8 @@ dhcp_network_changed(struct netif *netif)
|
||||
|
||||
#if DHCP_DOES_ARP_CHECK
|
||||
/**
|
||||
* Match an ARP reply with the offered IP address.
|
||||
* Match an ARP reply with the offered IP address:
|
||||
* check whether the offered IP address is not in use using ARP
|
||||
*
|
||||
* @param netif the network interface on which the reply was received
|
||||
* @param addr The IP address we received a reply from
|
||||
@@ -1241,7 +1245,7 @@ dhcp_reboot(struct netif *netif)
|
||||
|
||||
/**
|
||||
* @ingroup dhcp4
|
||||
* Release a DHCP lease.
|
||||
* Release a DHCP lease (usually called before @ref dhcp_stop).
|
||||
*
|
||||
* @param netif network interface which must release its lease
|
||||
*/
|
||||
|
||||
@@ -53,9 +53,9 @@
|
||||
#include "lwip/raw.h"
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/priv/tcp_priv.h"
|
||||
#include "lwip/dhcp.h"
|
||||
#include "lwip/autoip.h"
|
||||
#include "lwip/stats.h"
|
||||
#include "lwip/prot/dhcp.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user