Fill in if_dlt.

This commit is contained in:
thorpej 2000-12-18 19:44:33 +00:00
parent 23df92e38d
commit ed7695a765
17 changed files with 34 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_arcsubr.c,v 1.32 2000/12/12 18:00:25 thorpej Exp $ */
/* $NetBSD: if_arcsubr.c,v 1.33 2000/12/18 19:44:33 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Ignatios Souvatzis
@ -687,6 +687,7 @@ arc_ifattach(ifp, lla)
ifp->if_type = IFT_ARCNET;
ifp->if_addrlen = 1;
ifp->if_hdrlen = ARC_HDRLEN;
ifp->if_dlt = DLT_ARCNET;
if (ifp->if_flags & IFF_BROADCAST)
ifp->if_flags |= IFF_MULTICAST|IFF_ALLMULTI;
if (ifp->if_flags & IFF_LINK0 && arc_ipmtu > ARC_PHDS_MAXMTU)

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_atmsubr.c,v 1.25 2000/12/13 22:07:50 thorpej Exp $ */
/* $NetBSD: if_atmsubr.c,v 1.26 2000/12/18 19:44:33 thorpej Exp $ */
/*
*
@ -352,6 +352,7 @@ atm_ifattach(ifp)
ifp->if_type = IFT_ATM;
ifp->if_addrlen = 0;
ifp->if_hdrlen = 0;
ifp->if_dlt = DLT_ATM_RFC1483;
ifp->if_mtu = ATMMTU;
ifp->if_output = atm_output;
#if 0 /* XXX XXX XXX */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ethersubr.c,v 1.72 2000/12/13 22:07:50 thorpej Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.73 2000/12/18 19:44:33 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -828,6 +828,7 @@ ether_ifattach(struct ifnet *ifp, const u_int8_t *lla)
ifp->if_type = IFT_ETHER;
ifp->if_addrlen = 6;
ifp->if_hdrlen = 14;
ifp->if_dlt = DLT_EN10MB;
ifp->if_mtu = ETHERMTU;
ifp->if_output = ether_output;
ifp->if_input = ether_input;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_faith.c,v 1.13 2000/12/12 18:00:26 thorpej Exp $ */
/* $NetBSD: if_faith.c,v 1.14 2000/12/18 19:50:44 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@ -135,6 +135,7 @@ faith_clone_create(ifc, unit)
sc->sc_if.if_type = IFT_FAITH;
sc->sc_if.if_hdrlen = 0;
sc->sc_if.if_addrlen = 0;
sc->sc_if.if_dlt = DLT_NULL;
if_attach(&sc->sc_if);
#if NBPFILTER > 0
bpfattach(&sc->sc_if, DLT_NULL, sizeof(u_int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_fddisubr.c,v 1.36 2000/12/13 22:07:50 thorpej Exp $ */
/* $NetBSD: if_fddisubr.c,v 1.37 2000/12/18 19:44:33 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -877,6 +877,7 @@ fddi_ifattach(ifp)
ifp->if_type = IFT_FDDI;
ifp->if_addrlen = 6;
ifp->if_hdrlen = 21;
ifp->if_dlt = DLT_FDDI;
ifp->if_mtu = FDDIMTU;
ifp->if_output = fddi_output;
ifp->if_input = fddi_input;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_gif.c,v 1.18 2000/12/12 18:00:26 thorpej Exp $ */
/* $NetBSD: if_gif.c,v 1.19 2000/12/18 19:50:44 thorpej Exp $ */
/* $KAME: if_gif.c,v 1.34 2000/10/07 03:58:53 itojun Exp $ */
/*
@ -167,6 +167,7 @@ gif_clone_create(ifc, unit)
sc->gif_if.if_ioctl = gif_ioctl;
sc->gif_if.if_output = gif_output;
sc->gif_if.if_type = IFT_GIF;
sc->gif_if.if_dlt = DLT_NULL;
if_attach(&sc->gif_if);
#if NBPFILTER > 0
bpfattach(&sc->gif_if, DLT_NULL, sizeof(u_int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_gre.c,v 1.14 2000/12/12 18:00:26 thorpej Exp $ */
/* $NetBSD: if_gre.c,v 1.15 2000/12/18 19:50:44 thorpej Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -147,6 +147,7 @@ gre_clone_create(ifc, unit)
sc->sc_if.if_type = IFT_OTHER;
sc->sc_if.if_addrlen = 4;
sc->sc_if.if_hdrlen = 24; /* IP + GRE */
sc->sc_if.if_dlt = DLT_NULL;
sc->sc_if.if_mtu = GREMTU;
sc->sc_if.if_flags = IFF_POINTOPOINT|IFF_MULTICAST;
sc->sc_if.if_output = gre_output;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_hippisubr.c,v 1.8 2000/12/13 22:07:51 thorpej Exp $ */
/* $NetBSD: if_hippisubr.c,v 1.9 2000/12/18 19:44:34 thorpej Exp $ */
/*
* Copyright (c) 1982, 1989, 1993
@ -361,6 +361,7 @@ hippi_ifattach(ifp, lla)
ifp->if_type = IFT_HIPPI;
ifp->if_addrlen = 6; /* regular 802.3 MAC address */
ifp->if_hdrlen = sizeof(struct hippi_header) + 8; /* add CCI */
ifp->if_dlt = DLT_HIPPI;
ifp->if_mtu = HIPPIMTU;
ifp->if_output = hippi_output;
ifp->if_input = hippi_input;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ieee1394subr.c,v 1.5 2000/12/13 22:07:51 thorpej Exp $ */
/* $NetBSD: if_ieee1394subr.c,v 1.6 2000/12/18 19:44:34 thorpej Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -639,6 +639,7 @@ ieee1394_ifattach(struct ifnet *ifp, const struct ieee1394_hwaddr *hwaddr)
ifp->if_type = IFT_IEEE1394;
ifp->if_addrlen = sizeof(struct ieee1394_hwaddr);
ifp->if_hdrlen = sizeof(struct ieee1394_header);
ifp->if_dlt = DLT_EN10MB; /* XXX */
ifp->if_mtu = IEEE1394MTU;
ifp->if_output = ieee1394_output;
ifp->if_input = ieee1394_input;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_loop.c,v 1.32 2000/12/18 19:18:33 thorpej Exp $ */
/* $NetBSD: if_loop.c,v 1.33 2000/12/18 19:50:44 thorpej Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -160,6 +160,7 @@ loopattach(n)
ifp->if_type = IFT_LOOP;
ifp->if_hdrlen = 0;
ifp->if_addrlen = 0;
ifp->if_dlt = DLT_NULL;
IFQ_SET_READY(&ifp->if_snd);
if_attach(ifp);
#if NBPFILTER > 0

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ppp.c,v 1.64 2000/12/18 18:57:21 thorpej Exp $ */
/* $NetBSD: if_ppp.c,v 1.65 2000/12/18 19:50:44 thorpej Exp $ */
/* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */
/*
@ -205,6 +205,7 @@ pppattach()
sc->sc_if.if_flags = IFF_POINTOPOINT | IFF_MULTICAST;
sc->sc_if.if_type = IFT_PPP;
sc->sc_if.if_hdrlen = PPP_HDRLEN;
sc->sc_if.if_dlt = DLT_NULL;
sc->sc_if.if_ioctl = pppsioctl;
sc->sc_if.if_output = pppoutput;
IFQ_SET_MAXLEN(&sc->sc_if.if_snd, IFQ_MAXLEN);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sl.c,v 1.61 2000/12/12 18:00:27 thorpej Exp $ */
/* $NetBSD: if_sl.c,v 1.62 2000/12/18 19:50:45 thorpej Exp $ */
/*
* Copyright (c) 1987, 1989, 1992, 1993
@ -212,6 +212,7 @@ slattach()
sc->sc_if.if_type = IFT_SLIP;
sc->sc_if.if_ioctl = slioctl;
sc->sc_if.if_output = sloutput;
sc->sc_if.if_dlt = DLT_SLIP;
sc->sc_if.if_snd.ifq_maxlen = 50;
sc->sc_fastq.ifq_maxlen = 32;
if_attach(&sc->sc_if);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_stf.c,v 1.6 2000/12/12 18:00:27 thorpej Exp $ */
/* $NetBSD: if_stf.c,v 1.7 2000/12/18 19:50:45 thorpej Exp $ */
/* $KAME: if_stf.c,v 1.39 2000/06/07 23:35:18 itojun Exp $ */
/*
@ -237,6 +237,7 @@ stf_clone_create(ifc, unit)
sc->sc_if.if_ioctl = stf_ioctl;
sc->sc_if.if_output = stf_output;
sc->sc_if.if_type = IFT_STF;
sc->sc_if.if_dlt = DLT_NULL;
#if defined(__FreeBSD__) && __FreeBSD__ >= 4
sc->sc_if.if_snd.ifq_maxlen = IFQ_MAXLEN;
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_strip.c,v 1.24 2000/12/12 18:00:30 thorpej Exp $ */
/* $NetBSD: if_strip.c,v 1.25 2000/12/18 19:50:45 thorpej Exp $ */
/* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
/*
@ -360,6 +360,7 @@ stripattach(n)
sc->sc_if.if_type = IFT_SLIP;
sc->sc_if.if_ioctl = stripioctl;
sc->sc_if.if_output = stripoutput;
sc->sc_if.if_dlt = DLT_SLIP;
sc->sc_if.if_snd.ifq_maxlen = 50;
sc->sc_fastq.ifq_maxlen = 32;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tokensubr.c,v 1.13 2000/12/13 22:07:51 thorpej Exp $ */
/* $NetBSD: if_tokensubr.c,v 1.14 2000/12/18 19:44:34 thorpej Exp $ */
/*
* Copyright (c) 1997-1999
@ -699,6 +699,7 @@ token_ifattach(ifp, lla)
ifp->if_type = IFT_ISO88025;
ifp->if_addrlen = ISO88025_ADDR_LEN;
ifp->if_hdrlen = 14;
ifp->if_dlt = DLT_IEEE802;
ifp->if_mtu = ISO88025_MTU;
ifp->if_output = token_output;
ifp->if_input = token_input;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tun.c,v 1.40 2000/12/12 18:00:31 thorpej Exp $ */
/* $NetBSD: if_tun.c,v 1.41 2000/12/18 19:50:45 thorpej Exp $ */
/*
* Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
@ -101,6 +101,7 @@ tunattach(unused)
ifp->if_oerrors = 0;
ifp->if_ipackets = 0;
ifp->if_opackets = 0;
ifp->if_dlt = DLT_NULL;
if_attach(ifp);
#if NBPFILTER > 0
bpfattach(ifp, DLT_NULL, sizeof(u_int32_t));

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_ipip.c,v 1.11 2000/12/12 18:00:31 thorpej Exp $ */
/* $NetBSD: ip_ipip.c,v 1.12 2000/12/18 19:52:11 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -198,6 +198,7 @@ ipipattach(count)
sc->sc_if.if_softc = sc;
sc->sc_if.if_type = IFT_OTHER;
sc->sc_if.if_dlt = DLT_NULL;
sc->sc_if.if_addrlen = sizeof(struct in_addr);
sc->sc_if.if_hdrlen = sizeof(struct ip);
sc->sc_if.if_mtu = 0; /* filled in later */