diff options
author | ajs <ajs> | 2008-01-10 15:24:32 +0000 |
---|---|---|
committer | ajs <ajs> | 2008-01-10 15:24:32 +0000 |
commit | f6bc0eb86aec3cec8ddb18de4f85fb669e3197d2 (patch) | |
tree | 71cb7693f92a4b29d0a20db6bc98706963a01ddf /lib/zebra.h | |
parent | 26cc29d8fb3ff73dac3b602308079a95f6f315d2 (diff) | |
download | quagga-f6bc0eb86aec3cec8ddb18de4f85fb669e3197d2.tar.bz2 quagga-f6bc0eb86aec3cec8ddb18de4f85fb669e3197d2.tar.xz |
[link-detect] Try to get BSD link-detect to work properly.
2008-01-10 Ingo Flaschberger <if@xip.at>
* configure.ac: Define HAVE_BSD_LINK_DETECT if <net/if_media.h> is
present.
* lib/zebra.h: If HAVE_BSD_LINK_DETECT is defined,
include <net/if_media.h>.
* zebra/ioctl.c: (if_get_flags) If HAVE_BSD_LINK_DETECT, use the
SIOCGIFMEDIA ioctl to ascertain link state.
* zebra/kernel_socket.c: (bsd_linkdetect_translate) New function to
map the ifm_data.ifi_link_state value into the IFF_RUNNING flag.
(ifm_read) Call bsd_linkdetect_translate to fix the IFF_RUNNING
flag before calling if_flags_update.
Diffstat (limited to 'lib/zebra.h')
-rw-r--r-- | lib/zebra.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/zebra.h b/lib/zebra.h index 150aa2c5..1c9eb39f 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -116,6 +116,9 @@ typedef int socklen_t; #endif /* !va_copy */ #endif /* !C99 */ +#ifdef HAVE_BSD_LINK_DETECT +#include <net/if_media.h> +#endif /* HAVE_BSD_LINK_DETECT*/ #ifdef HAVE_LCAPS #include <sys/capability.h> |