From c543a1737173fb438f1d8c06f650b2d0d479f45c Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Thu, 10 Jan 2008 15:24:32 +0000 Subject: [link-detect] Try to get BSD link-detect to work properly. 2008-01-10 Ingo Flaschberger * configure.ac: Define HAVE_BSD_LINK_DETECT if is present. * lib/zebra.h: If HAVE_BSD_LINK_DETECT is defined, include . * 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. --- lib/zebra.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/zebra.h') 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 +#endif /* HAVE_BSD_LINK_DETECT*/ #ifdef HAVE_LCAPS #include -- cgit v1.2.1