Deleted Added
full compact
if.c (182106) if.c (183381)
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 182106 2008-08-24 11:03:43Z bz $
30 * $FreeBSD: head/sys/net/if.c 183381 2008-09-26 14:19:52Z ed $
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

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

509 ifp->if_data.ifi_datalen = sizeof(struct if_data);
510
511#ifdef MAC
512 mac_ifnet_init(ifp);
513 mac_ifnet_create(ifp);
514#endif
515
516 ifdev_setbyindex(ifp->if_index, make_dev(&net_cdevsw,
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

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

509 ifp->if_data.ifi_datalen = sizeof(struct if_data);
510
511#ifdef MAC
512 mac_ifnet_init(ifp);
513 mac_ifnet_create(ifp);
514#endif
515
516 ifdev_setbyindex(ifp->if_index, make_dev(&net_cdevsw,
517 unit2minor(ifp->if_index), UID_ROOT, GID_WHEEL, 0600, "%s/%s",
517 ifp->if_index, UID_ROOT, GID_WHEEL, 0600, "%s/%s",
518 net_cdevsw.d_name, ifp->if_xname));
519 make_dev_alias(ifdev_byindex(ifp->if_index), "%s%d",
520 net_cdevsw.d_name, ifp->if_index);
521
522 mtx_init(&ifp->if_snd.ifq_mtx, ifp->if_xname, "if send queue", MTX_DEF);
523
524 /*
525 * create a Link Level name for this device

--- 2288 unchanged lines hidden ---
518 net_cdevsw.d_name, ifp->if_xname));
519 make_dev_alias(ifdev_byindex(ifp->if_index), "%s%d",
520 net_cdevsw.d_name, ifp->if_index);
521
522 mtx_init(&ifp->if_snd.ifq_mtx, ifp->if_xname, "if send queue", MTX_DEF);
523
524 /*
525 * create a Link Level name for this device

--- 2288 unchanged lines hidden ---