summaryrefslogtreecommitdiffstats
path: root/contrib/isc-dhcp/includes
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2003-08-07 07:27:14 +0000
committermbr <mbr@FreeBSD.org>2003-08-07 07:27:14 +0000
commit4f4415b6cd54ec9f970e7000a8559a452aed2b03 (patch)
tree91a6820b358d2e75be7350b9b3d1e06698ce3461 /contrib/isc-dhcp/includes
parentac303d03f64c15b5581bfaab905df79dfde8b9ae (diff)
downloadFreeBSD-src-4f4415b6cd54ec9f970e7000a8559a452aed2b03.zip
FreeBSD-src-4f4415b6cd54ec9f970e7000a8559a452aed2b03.tar.gz
- Fix the polling code to work with media settings in dhclient.conf.
- Rename linkstatus to linkstate which is more correct. - Sort any leases each time we loose and regain link. With the first version we spammed the dhclient.leases file. - When there was no link on a interface, polling has been done twice. This has been fixed with a bigger sleep interval. - interface_active() now returns only a assumed state of the link. If we are using media settings, we cannot be sure that the link actually works. That means we assume that the link is working and continue to send requests as usual on the interface and loop over all possible media options. Polling is still done. If your interface gets suddenly link, dhclient will send a dhcp discover request. After all media settings have been tried a few times, dhclient will sleep. If one does change networks very often, it can help to set the "retry timeout" to a low value like 100 seconds. The default is over six minutes. Tested by: Larry Rosenman <ler@lerctr.org>, imp
Diffstat (limited to 'contrib/isc-dhcp/includes')
-rw-r--r--contrib/isc-dhcp/includes/dhcpd.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/contrib/isc-dhcp/includes/dhcpd.h b/contrib/isc-dhcp/includes/dhcpd.h
index d647f12..e62e93b 100644
--- a/contrib/isc-dhcp/includes/dhcpd.h
+++ b/contrib/isc-dhcp/includes/dhcpd.h
@@ -101,6 +101,9 @@ typedef struct hash_table class_hash_t;
(((x) >> OPTION_HASH_EXP) & \
(OPTION_HASH_PTWO - 1))) % OPTION_HASH_SIZE;
+#define NOLINK 0
+#define HAVELINK 1
+
enum dhcp_shutdown_state {
shutdown_listeners,
shutdown_omapi_connections,
@@ -780,8 +783,10 @@ struct interface_info {
unsigned remote_id_len; /* Length of Remote ID. */
char name [IFNAMSIZ]; /* Its name... */
- int linkstatus; /* Link status */
- int ieee80211; /* True if media is ieee80211 */
+ int ieee80211; /* True if media is ieee802.11 */
+ int havemedia; /* True if we have a media table */
+ int linkstate; /* True if we have link */
+ int forcediscover; /* True if a discover is needed */
int index; /* Its index. */
int rfdesc; /* Its read file descriptor. */
int wfdesc; /* Its write file descriptor, if
@@ -1859,6 +1864,7 @@ void send_decline PROTO ((void *));
void state_reboot PROTO ((void *));
#ifdef ENABLE_POLLING_MODE
void state_link PROTO (());
+void state_background PROTO ((void *));
#endif
void state_init PROTO ((void *));
void state_selecting PROTO ((void *));
@@ -1867,6 +1873,11 @@ void state_bound PROTO ((void *));
void state_stop PROTO ((void *));
void state_panic PROTO ((void *));
+#ifdef __FreeBSD__
+void set_ieee80211 PROTO ((struct interface_info *));
+#endif
+int interface_active PROTO ((struct interface_info *));
+
void bind_lease PROTO ((struct client_state *));
void make_client_options PROTO ((struct client_state *,
OpenPOWER on IntegriCloud