if.c (154708) | if.c (155051) |
---|---|
1/*- 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)if.c 8.5 (Berkeley) 1/9/95 | 1/*- 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)if.c 8.5 (Berkeley) 1/9/95 |
30 * $FreeBSD: head/sys/net/if.c 154708 2006-01-23 10:30:34Z yar $ | 30 * $FreeBSD: head/sys/net/if.c 155051 2006-01-30 13:45:15Z glebius $ |
31 */ 32 33#include "opt_compat.h" 34#include "opt_inet6.h" 35#include "opt_inet.h" 36#include "opt_mac.h" 37#include "opt_carp.h" 38 --- 996 unchanged lines hidden (view full) --- 1035#endif 1036 rt_ifmsg(ifp); 1037#ifdef INET6 1038 in6_if_up(ifp); 1039#endif 1040} 1041 1042void (*vlan_link_state_p)(struct ifnet *, int); /* XXX: private from if_vlan */ | 31 */ 32 33#include "opt_compat.h" 34#include "opt_inet6.h" 35#include "opt_inet.h" 36#include "opt_mac.h" 37#include "opt_carp.h" 38 --- 996 unchanged lines hidden (view full) --- 1035#endif 1036 rt_ifmsg(ifp); 1037#ifdef INET6 1038 in6_if_up(ifp); 1039#endif 1040} 1041 1042void (*vlan_link_state_p)(struct ifnet *, int); /* XXX: private from if_vlan */ |
1043void (*vlan_trunk_cap_p)(struct ifnet *); /* XXX: private from if_vlan */ |
|
1043 1044/* 1045 * Handle a change in the interface link state. To avoid LORs 1046 * between driver lock and upper layer locks, as well as possible 1047 * recursions, we post event to taskqueue, and all job 1048 * is done in static do_link_state_change(). 1049 */ 1050void --- 19 unchanged lines hidden (view full) --- 1070 rt_ifmsg(ifp); 1071 if (link_state == LINK_STATE_UP) 1072 link = NOTE_LINKUP; 1073 else if (link_state == LINK_STATE_DOWN) 1074 link = NOTE_LINKDOWN; 1075 else 1076 link = NOTE_LINKINV; 1077 KNOTE_UNLOCKED(&ifp->if_klist, link); | 1044 1045/* 1046 * Handle a change in the interface link state. To avoid LORs 1047 * between driver lock and upper layer locks, as well as possible 1048 * recursions, we post event to taskqueue, and all job 1049 * is done in static do_link_state_change(). 1050 */ 1051void --- 19 unchanged lines hidden (view full) --- 1071 rt_ifmsg(ifp); 1072 if (link_state == LINK_STATE_UP) 1073 link = NOTE_LINKUP; 1074 else if (link_state == LINK_STATE_DOWN) 1075 link = NOTE_LINKDOWN; 1076 else 1077 link = NOTE_LINKINV; 1078 KNOTE_UNLOCKED(&ifp->if_klist, link); |
1078 if (ifp->if_nvlans != 0) | 1079 if (ifp->if_vlantrunk != NULL) |
1079 (*vlan_link_state_p)(ifp, link); 1080 1081 if ((ifp->if_type == IFT_ETHER || ifp->if_type == IFT_L2VLAN) && 1082 IFP2AC(ifp)->ac_netgraph != NULL) 1083 (*ng_ether_link_state_p)(ifp, link_state); 1084#ifdef DEV_CARP 1085 if (ifp->if_carp) 1086 carp_carpdev_state(ifp->if_carp); --- 1183 unchanged lines hidden --- | 1080 (*vlan_link_state_p)(ifp, link); 1081 1082 if ((ifp->if_type == IFT_ETHER || ifp->if_type == IFT_L2VLAN) && 1083 IFP2AC(ifp)->ac_netgraph != NULL) 1084 (*ng_ether_link_state_p)(ifp, link_state); 1085#ifdef DEV_CARP 1086 if (ifp->if_carp) 1087 carp_carpdev_state(ifp->if_carp); --- 1183 unchanged lines hidden --- |