Deleted Added
full compact
if_ethersubr.c (83115) if_ethersubr.c (83130)
1/*
2 * Copyright (c) 1982, 1989, 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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
1/*
2 * Copyright (c) 1982, 1989, 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

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
34 * $FreeBSD: head/sys/net/if_ethersubr.c 83115 2001-09-05 21:10:28Z brooks $
34 * $FreeBSD: head/sys/net/if_ethersubr.c 83130 2001-09-06 02:40:43Z jlemon $
35 */
36
37#include "opt_atalk.h"
38#include "opt_inet.h"
39#include "opt_inet6.h"
40#include "opt_ipx.h"
41#include "opt_bdg.h"
42#include "opt_netgraph.h"

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

662 if_attach(ifp);
663 ifp->if_type = IFT_ETHER;
664 ifp->if_addrlen = 6;
665 ifp->if_hdrlen = 14;
666 ifp->if_mtu = ETHERMTU;
667 ifp->if_resolvemulti = ether_resolvemulti;
668 if (ifp->if_baudrate == 0)
669 ifp->if_baudrate = 10000000;
35 */
36
37#include "opt_atalk.h"
38#include "opt_inet.h"
39#include "opt_inet6.h"
40#include "opt_ipx.h"
41#include "opt_bdg.h"
42#include "opt_netgraph.h"

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

662 if_attach(ifp);
663 ifp->if_type = IFT_ETHER;
664 ifp->if_addrlen = 6;
665 ifp->if_hdrlen = 14;
666 ifp->if_mtu = ETHERMTU;
667 ifp->if_resolvemulti = ether_resolvemulti;
668 if (ifp->if_baudrate == 0)
669 ifp->if_baudrate = 10000000;
670 ifa = ifnet_addrs[ifp->if_index - 1];
670 ifa = ifaddr_byindex(ifp->if_index);
671 KASSERT(ifa != NULL, ("%s: no lladdr!\n", __FUNCTION__));
672 sdl = (struct sockaddr_dl *)ifa->ifa_addr;
673 sdl->sdl_type = IFT_ETHER;
674 sdl->sdl_alen = ifp->if_addrlen;
675 bcopy((IFP2AC(ifp))->ac_enaddr, LLADDR(sdl), ifp->if_addrlen);
676 if (bpf)
677 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
678 if (ng_ether_attach_p != NULL)

--- 208 unchanged lines hidden ---
671 KASSERT(ifa != NULL, ("%s: no lladdr!\n", __FUNCTION__));
672 sdl = (struct sockaddr_dl *)ifa->ifa_addr;
673 sdl->sdl_type = IFT_ETHER;
674 sdl->sdl_alen = ifp->if_addrlen;
675 bcopy((IFP2AC(ifp))->ac_enaddr, LLADDR(sdl), ifp->if_addrlen);
676 if (bpf)
677 bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
678 if (ng_ether_attach_p != NULL)

--- 208 unchanged lines hidden ---