From ed7695a765c91f6b3e346cbd52f0ad325968aa2a Mon Sep 17 00:00:00 2001 From: thorpej Date: Mon, 18 Dec 2000 19:44:33 +0000 Subject: [PATCH] Fill in if_dlt. --- sys/net/if_arcsubr.c | 3 ++- sys/net/if_atmsubr.c | 3 ++- sys/net/if_ethersubr.c | 3 ++- sys/net/if_faith.c | 3 ++- sys/net/if_fddisubr.c | 3 ++- sys/net/if_gif.c | 3 ++- sys/net/if_gre.c | 3 ++- sys/net/if_hippisubr.c | 3 ++- sys/net/if_ieee1394subr.c | 3 ++- sys/net/if_loop.c | 3 ++- sys/net/if_ppp.c | 3 ++- sys/net/if_sl.c | 3 ++- sys/net/if_stf.c | 3 ++- sys/net/if_strip.c | 3 ++- sys/net/if_tokensubr.c | 3 ++- sys/net/if_tun.c | 3 ++- sys/netinet/ip_ipip.c | 3 ++- 17 files changed, 34 insertions(+), 17 deletions(-) diff --git a/sys/net/if_arcsubr.c b/sys/net/if_arcsubr.c index 7a0d69027f69..d1449e1d7bfb 100644 --- a/sys/net/if_arcsubr.c +++ b/sys/net/if_arcsubr.c @@ -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) diff --git a/sys/net/if_atmsubr.c b/sys/net/if_atmsubr.c index 50483aa2ece8..9041a2a8496d 100644 --- a/sys/net/if_atmsubr.c +++ b/sys/net/if_atmsubr.c @@ -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 */ diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index da85c60c044f..a6199864844a 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -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; diff --git a/sys/net/if_faith.c b/sys/net/if_faith.c index 08e71eea471f..b76e7aecadc9 100644 --- a/sys/net/if_faith.c +++ b/sys/net/if_faith.c @@ -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)); diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c index b0202fe60811..f816a4426543 100644 --- a/sys/net/if_fddisubr.c +++ b/sys/net/if_fddisubr.c @@ -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; diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index a08f56ef2dff..06f2f7fc1822 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -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)); diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 6a00d50ad647..de06de3234cd 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -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; diff --git a/sys/net/if_hippisubr.c b/sys/net/if_hippisubr.c index f2860566829f..6399368a57f9 100644 --- a/sys/net/if_hippisubr.c +++ b/sys/net/if_hippisubr.c @@ -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; diff --git a/sys/net/if_ieee1394subr.c b/sys/net/if_ieee1394subr.c index 42fc7f123bfc..c8ed46d9fe17 100644 --- a/sys/net/if_ieee1394subr.c +++ b/sys/net/if_ieee1394subr.c @@ -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; diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 306c80e5cef3..f49ae69ee40c 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -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 diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 0e2d655b1841..ab8646cfa972 100644 --- a/sys/net/if_ppp.c +++ b/sys/net/if_ppp.c @@ -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); diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 9711be38d7ae..b83c60dc3901 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -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); diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c index d55f5c7cfab0..0d17e8f86407 100644 --- a/sys/net/if_stf.c +++ b/sys/net/if_stf.c @@ -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 diff --git a/sys/net/if_strip.c b/sys/net/if_strip.c index 89b0e4badcab..81e5c4e5cb7c 100644 --- a/sys/net/if_strip.c +++ b/sys/net/if_strip.c @@ -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; diff --git a/sys/net/if_tokensubr.c b/sys/net/if_tokensubr.c index 6a5201171893..32be06551160 100644 --- a/sys/net/if_tokensubr.c +++ b/sys/net/if_tokensubr.c @@ -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; diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 4d4f3bbdf887..a1cea1f6e787 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -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 @@ -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)); diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c index e464089cfa7c..faa2db7b70d3 100644 --- a/sys/netinet/ip_ipip.c +++ b/sys/netinet/ip_ipip.c @@ -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 */