summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-01-12 06:40:46 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2000-01-12 06:40:46 +0000
commite79c6b0ad8b3d1992513533ce6d0c1208410afb1 (patch)
tree51a8532c903a8b9416e30c82d1391eac3ac07832 /sys/net
parent84b13fc81a6b393ee0597039b8f6dd829829c162 (diff)
Remove gif_input() -- not needed anymore.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_gif.c89
-rw-r--r--sys/net/if_gif.h3
2 files changed, 2 insertions, 90 deletions
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index e754df55db6..dcb9465aa69 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gif.c,v 1.4 2000/01/10 22:40:16 angelos Exp $ */
+/* $OpenBSD: if_gif.c,v 1.5 2000/01/12 06:40:45 angelos Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -194,93 +194,6 @@ gif_output(ifp, m, dst, rt)
return error;
}
-void
-gif_input(m, af, gifp)
- struct mbuf *m;
- int af;
- struct ifnet *gifp;
-{
- int s, isr;
- register struct ifqueue *ifq = 0;
-
- if (gifp == NULL) {
- /* just in case */
- m_freem(m);
- return;
- }
-
- if (m->m_pkthdr.rcvif)
- m->m_pkthdr.rcvif = gifp;
-
-#if NBPFILTER > 0
- if (gifp->if_bpf) {
- /*
- * We need to prepend the address family as
- * a four byte field. Cons up a dummy header
- * to pacify bpf. This is safe because bpf
- * will only read from the mbuf (i.e., it won't
- * try to free it or keep a pointer a to it).
- */
- struct mbuf m0;
- u_int af = AF_INET6;
-
- m0.m_next = m;
- m0.m_len = 4;
- m0.m_data = (char *) &af;
-
- bpf_mtap(gifp->if_bpf, &m0);
- }
-#endif /*NBPFILTER > 0*/
-
- /*
- * Put the packet to the network layer input queue according to the
- * specified address family.
- * Note: older versions of gif_input directly called network layer
- * input functions, e.g. ip6_input, here. We changed the policy to
- * prevent too many recursive calls of such input functions, which
- * might cause kernel panic. But the change may introduce another
- * problem; if the input queue is full, packets are discarded.
- * We believed it rarely occurs and changed the policy. If we find
- * it occurs more times than we thought, we may change the policy
- * again.
- */
- switch (af) {
-#ifdef INET
- case AF_INET:
- ifq = &ipintrq;
- isr = NETISR_IP;
- break;
-#endif
-#ifdef INET6
- case AF_INET6:
- ifq = &ip6intrq;
- isr = NETISR_IPV6;
- break;
-#endif
- default:
- m_freem(m);
- return;
- }
-
- s = splimp();
- if (IF_QFULL(ifq)) {
- IF_DROP(ifq); /* update statistics */
- m_freem(m);
- splx(s);
- return;
- }
- IF_ENQUEUE(ifq, m);
-
- /* We need schednetisr since the address family may change */
- schednetisr(isr);
- gifp->if_ipackets++;
- gifp->if_ibytes += m->m_pkthdr.len;
- splx(s);
-
- return;
-}
-
-
int
gif_ioctl(ifp, cmd, data)
struct ifnet *ifp;
diff --git a/sys/net/if_gif.h b/sys/net/if_gif.h
index c379d1d1f3f..51e30bda306 100644
--- a/sys/net/if_gif.h
+++ b/sys/net/if_gif.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gif.h,v 1.2 2000/01/07 19:28:49 angelos Exp $ */
+/* $OpenBSD: if_gif.h,v 1.3 2000/01/12 06:40:45 angelos Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -68,7 +68,6 @@ extern int ngif;
extern struct gif_softc *gif;
/* Prototypes */
-void gif_input __P((struct mbuf *, int, struct ifnet *));
int gif_output __P((struct ifnet *, struct mbuf *,
struct sockaddr *, struct rtentry *));
int gif_ioctl __P((struct ifnet *, u_long, caddr_t));