diff options
Diffstat (limited to 'cpukit/libnetworking/rtems/rtems_dhcp_failsafe.h')
-rw-r--r-- | cpukit/libnetworking/rtems/rtems_dhcp_failsafe.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cpukit/libnetworking/rtems/rtems_dhcp_failsafe.h b/cpukit/libnetworking/rtems/rtems_dhcp_failsafe.h index 7ed131aa77..3c5a59fcb0 100644 --- a/cpukit/libnetworking/rtems/rtems_dhcp_failsafe.h +++ b/cpukit/libnetworking/rtems/rtems_dhcp_failsafe.h @@ -18,8 +18,45 @@ extern "C" { #endif +/* Default settings for the DHCP failsafe. They can be overridden + * using rtems_bsdnet_dhcp_failsafe_config(); see that for descriptions. + */ +#ifndef RTEMS_DHCP_FAILSAFE_NETWORK_FAIL_TIMEOUT +#define RTEMS_DHCP_FAILSAFE_NETWORK_FAIL_TIMEOUT 5 +#endif + +#ifndef RTEMS_DHCP_FAILSAFE_NETWORK_DOWN_TIME +#define RTEMS_DHCP_FAILSAFE_NETWORK_DOWN_TIME 30 +#endif + +#ifndef RTEMS_DHCP_FAILSAFE_BROADCAST_DELAY +#define RTEMS_DHCP_FAILSAFE_BROADCAST_DELAY 0 +#endif + +#ifndef RTEMS_DHCP_FAILSAFE_DHCP_MONITOR_PRIORITY +#define RTEMS_DHCP_FAILSAFE_DHCP_MONITOR_PRIORITY 250 +#endif + + void rtems_bsdnet_do_dhcp_failsafe (void); +/** Set the DHCP fallback options. See the commentary at the top of the + * implementation. + @note Some of these options can be compile-time disabled - see the code. + */ +void rtems_bsdnet_dhcp_failsafe_config( + int network_fail_timeout, /**< The number of seconds before the interface is + * considered disconnected + */ + int network_down_time, /**< The number of seconds the interface + * remains down. + */ + int broadcast_delay, /**< The delay in seconds before broadcasts + * are sent. + */ + int dhcp_monitor_priority /**< The monitor priority.*/ +); + #ifdef __cplusplus } #endif |