From 2e21a7265eeab772d7862585535c4dca6be105b1 Mon Sep 17 00:00:00 2001 From: Jeffrey Hsu Date: Tue, 16 Sep 2003 06:25:35 +0000 Subject: [PATCH] Leftover netisr consolidation cleanups. --- sys/netgraph/iface/ng_iface.c | 38 ++++++++++++++++++++++++++++++++--- sys/netproto/atm/atm_subr.c | 5 ++--- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/sys/netgraph/iface/ng_iface.c b/sys/netgraph/iface/ng_iface.c index ecec954420..d6db3e0939 100644 --- a/sys/netgraph/iface/ng_iface.c +++ b/sys/netgraph/iface/ng_iface.c @@ -37,7 +37,7 @@ * Author: Archie Cobbs * * $FreeBSD: src/sys/netgraph/ng_iface.c,v 1.7.2.5 2002/07/02 23:44:02 archie Exp $ - * $DragonFly: src/sys/netgraph/iface/ng_iface.c,v 1.4 2003/08/07 21:54:32 dillon Exp $ + * $DragonFly: src/sys/netgraph/iface/ng_iface.c,v 1.5 2003/09/16 06:25:35 hsu Exp $ * $Whistle: ng_iface.c,v 1.33 1999/11/01 09:24:51 julian Exp $ */ @@ -52,6 +52,11 @@ * This node also includes Berkeley packet filter support. */ +#include "opt_atalk.h" +#include "opt_inet.h" +#include "opt_inet6.h" +#include "opt_ipx.h" + #include #include #include @@ -66,7 +71,7 @@ #include #include -#include +#include #include #include @@ -728,6 +733,7 @@ ng_iface_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) const priv_p priv = hook->node->private; const iffam_p iffam = get_iffam_from_hook(priv, hook); struct ifnet *const ifp = priv->ifp; + int isr; /* Sanity checks */ KASSERT(iffam != NULL, ("%s: iffam", __FUNCTION__)); @@ -753,7 +759,33 @@ ng_iface_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) NG_FREE_META(meta); /* Send packet */ - return family_enqueue(iffam->family, m); + switch (iffam->family) { +#ifdef INET + case AF_INET: + isr = NETISR_IP; + break; +#endif +#ifdef INET6 + case AF_INET6: + isr = NETISR_IPV6; + break; +#endif +#ifdef IPX + case AF_IPX: + isr = NETISR_IPX; + break; +#endif +#ifdef NETATALK + case AF_APPLETALK: + isr = NETISR_ATALK2; + break; +#endif + default: + m_freem(m); + return (EAFNOSUPPORT); + } + netisr_dispatch(isr, m); + return (0); } /* diff --git a/sys/netproto/atm/atm_subr.c b/sys/netproto/atm/atm_subr.c index c8dca5f02a..6d2e8a8b97 100644 --- a/sys/netproto/atm/atm_subr.c +++ b/sys/netproto/atm/atm_subr.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/atm_subr.c,v 1.7 2000/02/13 03:31:59 peter Exp $ - * @(#) $DragonFly: src/sys/netproto/atm/atm_subr.c,v 1.6 2003/09/16 05:03:13 hsu Exp $ + * @(#) $DragonFly: src/sys/netproto/atm/atm_subr.c,v 1.7 2003/09/16 06:25:35 hsu Exp $ */ /* @@ -36,7 +36,6 @@ */ #include "kern_include.h" -#include /* * Global variables @@ -56,7 +55,7 @@ int atm_dev_print = 0; int atm_print_data = 0; int atm_version = ATM_VERSION; struct timeval atm_debugtime = {0, 0}; -const int atmintrq_present = 1; +struct ifqueue atm_intrq; struct sp_info atm_attributes_pool = { "atm attributes pool", /* si_name */ -- 2.41.0