Deleted Added
full compact
if_ef.c (177599) if_ef.c (181803)
1/*-
2 * Copyright (c) 1999, 2000 Boris Popov
3 * 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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999, 2000 Boris Popov
3 * 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

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/net/if_ef.c 177599 2008-03-25 09:39:02Z ru $
26 * $FreeBSD: head/sys/net/if_ef.c 181803 2008-08-17 23:27:27Z bz $
27 */
28
29#include "opt_inet.h"
30#include "opt_ipx.h"
31#include "opt_ef.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/sockio.h>
36#include <sys/malloc.h>
37#include <sys/mbuf.h>
38#include <sys/socket.h>
39#include <sys/syslog.h>
40#include <sys/kernel.h>
41#include <sys/module.h>
27 */
28
29#include "opt_inet.h"
30#include "opt_ipx.h"
31#include "opt_ef.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/sockio.h>
36#include <sys/malloc.h>
37#include <sys/mbuf.h>
38#include <sys/socket.h>
39#include <sys/syslog.h>
40#include <sys/kernel.h>
41#include <sys/module.h>
42#include <sys/vimage.h>
42
43#include <net/ethernet.h>
44#include <net/if_llc.h>
45#include <net/if.h>
46#include <net/if_arp.h>
47#include <net/if_dl.h>
48#include <net/if_types.h>
49#include <net/netisr.h>

--- 434 unchanged lines hidden (view full) ---

484ef_load(void)
485{
486 struct ifnet *ifp;
487 struct efnet *efp;
488 struct ef_link *efl = NULL, *efl_temp;
489 int error = 0, d;
490
491 IFNET_RLOCK();
43
44#include <net/ethernet.h>
45#include <net/if_llc.h>
46#include <net/if.h>
47#include <net/if_arp.h>
48#include <net/if_dl.h>
49#include <net/if_types.h>
50#include <net/netisr.h>

--- 434 unchanged lines hidden (view full) ---

485ef_load(void)
486{
487 struct ifnet *ifp;
488 struct efnet *efp;
489 struct ef_link *efl = NULL, *efl_temp;
490 int error = 0, d;
491
492 IFNET_RLOCK();
492 TAILQ_FOREACH(ifp, &ifnet, if_link) {
493 TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
493 if (ifp->if_type != IFT_ETHER) continue;
494 EFDEBUG("Found interface %s\n", ifp->if_xname);
495 efl = (struct ef_link*)malloc(sizeof(struct ef_link),
496 M_IFADDR, M_WAITOK | M_ZERO);
497 if (efl == NULL) {
498 error = ENOMEM;
499 break;
500 }

--- 89 unchanged lines hidden ---
494 if (ifp->if_type != IFT_ETHER) continue;
495 EFDEBUG("Found interface %s\n", ifp->if_xname);
496 efl = (struct ef_link*)malloc(sizeof(struct ef_link),
497 M_IFADDR, M_WAITOK | M_ZERO);
498 if (efl == NULL) {
499 error = ENOMEM;
500 break;
501 }

--- 89 unchanged lines hidden ---