if.c (168561) | if.c (168793) |
---|---|
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 168561 2007-04-10 00:27:25Z thompsa $ | 30 * $FreeBSD: head/sys/net/if.c 168793 2007-04-17 00:35:11Z thompsa $ |
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 --- 52 unchanged lines hidden (view full) --- 91static int log_link_state_change = 1; 92 93SYSCTL_INT(_net_link, OID_AUTO, log_link_state_change, CTLFLAG_RW, 94 &log_link_state_change, 0, 95 "log interface link state change events"); 96 97void (*bstp_linkstate_p)(struct ifnet *ifp, int state); 98void (*ng_ether_link_state_p)(struct ifnet *ifp, int state); | 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 --- 52 unchanged lines hidden (view full) --- 91static int log_link_state_change = 1; 92 93SYSCTL_INT(_net_link, OID_AUTO, log_link_state_change, CTLFLAG_RW, 94 &log_link_state_change, 0, 95 "log interface link state change events"); 96 97void (*bstp_linkstate_p)(struct ifnet *ifp, int state); 98void (*ng_ether_link_state_p)(struct ifnet *ifp, int state); |
99void (*trunk_linkstate_p)(struct ifnet *ifp, int state); | 99void (*lagg_linkstate_p)(struct ifnet *ifp, int state); |
100 101struct mbuf *(*tbr_dequeue_ptr)(struct ifaltq *, int) = NULL; 102 103/* 104 * XXX: Style; these should be sorted alphabetically, and unprototyped 105 * static functions should be prototyped. Currently they are sorted by 106 * declaration order. 107 */ --- 1266 unchanged lines hidden (view full) --- 1374#ifdef DEV_CARP 1375 if (ifp->if_carp) 1376 carp_carpdev_state(ifp->if_carp); 1377#endif 1378 if (ifp->if_bridge) { 1379 KASSERT(bstp_linkstate_p != NULL,("if_bridge bstp not loaded!")); 1380 (*bstp_linkstate_p)(ifp, link_state); 1381 } | 100 101struct mbuf *(*tbr_dequeue_ptr)(struct ifaltq *, int) = NULL; 102 103/* 104 * XXX: Style; these should be sorted alphabetically, and unprototyped 105 * static functions should be prototyped. Currently they are sorted by 106 * declaration order. 107 */ --- 1266 unchanged lines hidden (view full) --- 1374#ifdef DEV_CARP 1375 if (ifp->if_carp) 1376 carp_carpdev_state(ifp->if_carp); 1377#endif 1378 if (ifp->if_bridge) { 1379 KASSERT(bstp_linkstate_p != NULL,("if_bridge bstp not loaded!")); 1380 (*bstp_linkstate_p)(ifp, link_state); 1381 } |
1382 if (ifp->if_trunk) { 1383 KASSERT(trunk_linkstate_p != NULL,("if_trunk not loaded!")); 1384 (*trunk_linkstate_p)(ifp, link_state); | 1382 if (ifp->if_lagg) { 1383 KASSERT(lagg_linkstate_p != NULL,("if_lagg not loaded!")); 1384 (*lagg_linkstate_p)(ifp, link_state); |
1385 } 1386 1387 devctl_notify("IFNET", ifp->if_xname, 1388 (link_state == LINK_STATE_UP) ? "LINK_UP" : "LINK_DOWN", NULL); 1389 if (pending > 1) 1390 if_printf(ifp, "%d link states coalesced\n", pending); 1391 if (log_link_state_change) 1392 log(LOG_NOTICE, "%s: link state changed to %s\n", ifp->if_xname, --- 1368 unchanged lines hidden --- | 1385 } 1386 1387 devctl_notify("IFNET", ifp->if_xname, 1388 (link_state == LINK_STATE_UP) ? "LINK_UP" : "LINK_DOWN", NULL); 1389 if (pending > 1) 1390 if_printf(ifp, "%d link states coalesced\n", pending); 1391 if (log_link_state_change) 1392 log(LOG_NOTICE, "%s: link state changed to %s\n", ifp->if_xname, --- 1368 unchanged lines hidden --- |