1 | /* |
---|
2 | Description: Wrapper around DHCP client to restart it when the interface |
---|
3 | moves to another network. |
---|
4 | |
---|
5 | Authors: Arnout Vandecappelle <arnout@mind.be>, Essensium/Mind |
---|
6 | Maarten Van Es <maarten@mind.be>, Essensium/Mind |
---|
7 | (C) Septentrio 2008 |
---|
8 | |
---|
9 | The license and distribution terms for this file may be |
---|
10 | found in the file LICENSE in this distribution or at |
---|
11 | http://www.rtems.org/license/LICENSE. |
---|
12 | */ |
---|
13 | |
---|
14 | #ifndef _RTEMS_DHCP_FAILSAFE_H_ |
---|
15 | #define _RTEMS_DHCP_FAILSAFE_H_ |
---|
16 | |
---|
17 | #ifdef __cplusplus |
---|
18 | extern "C" { |
---|
19 | #endif |
---|
20 | |
---|
21 | /* Default settings for the DHCP failsafe. They can be overridden |
---|
22 | * using rtems_bsdnet_dhcp_failsafe_config(); see that for descriptions. |
---|
23 | */ |
---|
24 | #ifndef RTEMS_DHCP_FAILSAFE_NETWORK_FAIL_TIMEOUT |
---|
25 | #define RTEMS_DHCP_FAILSAFE_NETWORK_FAIL_TIMEOUT 5 |
---|
26 | #endif |
---|
27 | |
---|
28 | #ifndef RTEMS_DHCP_FAILSAFE_NETWORK_DOWN_TIME |
---|
29 | #define RTEMS_DHCP_FAILSAFE_NETWORK_DOWN_TIME 30 |
---|
30 | #endif |
---|
31 | |
---|
32 | #ifndef RTEMS_DHCP_FAILSAFE_BROADCAST_DELAY |
---|
33 | #define RTEMS_DHCP_FAILSAFE_BROADCAST_DELAY 0 |
---|
34 | #endif |
---|
35 | |
---|
36 | #ifndef RTEMS_DHCP_FAILSAFE_DHCP_MONITOR_PRIORITY |
---|
37 | #define RTEMS_DHCP_FAILSAFE_DHCP_MONITOR_PRIORITY 250 |
---|
38 | #endif |
---|
39 | |
---|
40 | |
---|
41 | void rtems_bsdnet_do_dhcp_failsafe (void); |
---|
42 | |
---|
43 | /** Set the DHCP fallback options. See the commentary at the top of the |
---|
44 | * implementation. |
---|
45 | @note Some of these options can be compile-time disabled - see the code. |
---|
46 | */ |
---|
47 | void rtems_bsdnet_dhcp_failsafe_config( |
---|
48 | int network_fail_timeout, /**< The number of seconds before the interface is |
---|
49 | * considered disconnected |
---|
50 | */ |
---|
51 | int network_down_time, /**< The number of seconds the interface |
---|
52 | * remains down. |
---|
53 | */ |
---|
54 | int broadcast_delay, /**< The delay in seconds before broadcasts |
---|
55 | * are sent. |
---|
56 | */ |
---|
57 | int dhcp_monitor_priority /**< The monitor priority.*/ |
---|
58 | ); |
---|
59 | |
---|
60 | #ifdef __cplusplus |
---|
61 | } |
---|
62 | #endif |
---|
63 | |
---|
64 | #endif |
---|