diff options
-rw-r--r-- | sys/net/if.c | 17 | ||||
-rw-r--r-- | sys/net/if.h | 3 |
2 files changed, 18 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 94374a5ebe2..16308d8b767 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.103 2005/01/18 22:10:10 claudio Exp $ */ +/* $OpenBSD: if.c,v 1.104 2005/02/07 15:00:16 mcbride Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -1105,6 +1105,21 @@ if_up(struct ifnet *ifp) } /* + * Process a link state change. + * NOTE: must be called at splsoftnet or equivalent. + * XXX Should be converted to dohooks(). + */ +void +if_link_state_change(struct ifnet *ifp) +{ + rt_ifmsg(ifp); +#if NCARP > 0 + if (ifp->if_carp) + carp_carpdev_state(ifp); +#endif +} + +/* * Flush an interface queue. */ void diff --git a/sys/net/if.h b/sys/net/if.h index 670b792058e..31df9263080 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.63 2005/01/14 11:49:01 henning Exp $ */ +/* $OpenBSD: if.h,v 1.64 2005/02/07 15:00:17 mcbride Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -650,6 +650,7 @@ void if_attachtail(struct ifnet *); void if_attachhead(struct ifnet *); void if_detach(struct ifnet *); void if_down(struct ifnet *); +void if_link_state_change(struct ifnet *); void if_qflush(struct ifqueue *); void if_slowtimo(void *); void if_up(struct ifnet *); |