From 42239faa4747820b5263ce6a3de8ff7bd2106fe9 Mon Sep 17 00:00:00 2001 From: sobomax Date: Wed, 2 Oct 2002 09:38:17 +0000 Subject: [PATCH] Since bpf is no longer an optional component, remove associated ifdef's. Submitted by: don't quite remember - the name of the sender disappeared with the rest of my inbox. :( --- sys/modules/if_gre/Makefile | 7 +------ sys/net/if_gre.c | 9 --------- sys/netinet/ip_gre.c | 9 ++------- 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/sys/modules/if_gre/Makefile b/sys/modules/if_gre/Makefile index 5ef40ca18c8f..9079ef9fc2a6 100644 --- a/sys/modules/if_gre/Makefile +++ b/sys/modules/if_gre/Makefile @@ -3,9 +3,7 @@ .PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netinet KMOD= if_gre -SRCS= if_gre.c ip_gre.c opt_inet.h opt_ns.h opt_atalk.h bpf.h - -CLEANFILES+=bpf.h +SRCS= if_gre.c ip_gre.c opt_inet.h opt_ns.h opt_atalk.h opt_inet.h: echo "#define INET 1" > ${.TARGET} @@ -16,7 +14,4 @@ opt_ns.h: opt_atalk.h: echo "#define NETATALK 1" > ${.TARGET} -bpf.h: - echo "#define NBPF 1" > ${.TARGET} - .include diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index cdce71692e8d..dfa9ddbcc14f 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -49,7 +49,6 @@ #include "opt_atalk.h" #include "opt_inet.h" #include "opt_ns.h" -#include "bpf.h" #include #include @@ -78,9 +77,7 @@ #error "Huh? if_gre without inet?" #endif -#if NBPF > 0 #include -#endif #include #include @@ -183,9 +180,7 @@ gre_clone_create(ifc, unit) sc->encap = NULL; sc->called = 0; if_attach(&sc->sc_if); -#if NBPF bpfattach(&sc->sc_if, DLT_NULL, sizeof(u_int32_t)); -#endif LIST_INSERT_HEAD(&gre_softc_list, sc, sc_list); return (0); } @@ -201,9 +196,7 @@ gre_clone_destroy(ifp) encap_detach(sc->encap); #endif LIST_REMOVE(sc, sc_list); -#if NBPF bpfdetach(ifp); -#endif if_detach(ifp); free(sc, M_GRE); } @@ -247,7 +240,6 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, ip = NULL; osrc = 0; -#if NBPF if (ifp->if_bpf) { /* see comment of other if_foo.c files */ struct mbuf m0; @@ -259,7 +251,6 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, bpf_mtap(ifp, &m0); } -#endif m->m_flags &= ~(M_BCAST|M_MCAST); diff --git a/sys/netinet/ip_gre.c b/sys/netinet/ip_gre.c index 93afaa38f1d8..ac28b6e4c18f 100644 --- a/sys/netinet/ip_gre.c +++ b/sys/netinet/ip_gre.c @@ -46,7 +46,6 @@ #include "opt_inet.h" #include "opt_ns.h" #include "opt_atalk.h" -#include "bpf.h" #include #include @@ -209,7 +208,6 @@ gre_input2(struct mbuf *m ,int hlen, u_char proto) m->m_len -= hlen; m->m_pkthdr.len -= hlen; -#if NBPF > 0 if (sc->sc_if.if_bpf) { struct mbuf m0; u_int32_t af = AF_INET; @@ -219,8 +217,7 @@ gre_input2(struct mbuf *m ,int hlen, u_char proto) m0.m_data = (char *)⁡ bpf_mtap(&(sc->sc_if), &m0); - } -#endif /*NBPF > 0*/ + } m->m_pkthdr.rcvif = &sc->sc_if; @@ -306,7 +303,6 @@ gre_mobile_input(m, va_alist) ip->ip_sum = 0; ip->ip_sum = in_cksum(m, (ip->ip_hl << 2)); -#if NBPF > 0 if (sc->sc_if.if_bpf) { struct mbuf m0; u_int af = AF_INET; @@ -316,8 +312,7 @@ gre_mobile_input(m, va_alist) m0.m_data = (char *)⁡ bpf_mtap(&(sc->sc_if), &m0); - } -#endif /*NBPFILTER > 0*/ + } m->m_pkthdr.rcvif = &sc->sc_if;