Remove support for FreeBSD 4.x and below.
This commit is contained in:
parent
3d57f75785
commit
d695e38057
@ -33,12 +33,10 @@
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include "opt_altq.h"
|
||||
#if (__FreeBSD__ != 2)
|
||||
#include "opt_inet.h"
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_inet6.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif /* __FreeBSD__ || __NetBSD__ */
|
||||
#ifdef ALTQ_CBQ /* cbq is enabled by ALTQ_CBQ option in opt_altq.h */
|
||||
|
||||
@ -508,14 +506,8 @@ cbq_enqueue(struct ifaltq *ifq, struct mbuf *m, struct altq_pktattr *pktattr)
|
||||
/* grab class set by classifier */
|
||||
if ((m->m_flags & M_PKTHDR) == 0) {
|
||||
/* should not happen */
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)\
|
||||
|| (defined(__FreeBSD__) && __FreeBSD_version >= 501113)
|
||||
printf("altq: packet for %s does not have pkthdr\n",
|
||||
ifq->altq_ifp->if_xname);
|
||||
#else
|
||||
printf("altq: packet for %s%d does not have pkthdr\n",
|
||||
ifq->altq_ifp->if_name, ifq->altq_ifp->if_unit);
|
||||
#endif
|
||||
m_freem(m);
|
||||
return (ENOBUFS);
|
||||
}
|
||||
@ -1027,13 +1019,7 @@ cbqclose(dev, flag, fmt, p)
|
||||
|
||||
while (cbq_list) {
|
||||
ifp = cbq_list->ifnp.ifq_->altq_ifp;
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)\
|
||||
|| (defined(__FreeBSD__) && __FreeBSD_version >= 501113)
|
||||
sprintf(iface.cbq_ifacename, "%s", ifp->if_xname);
|
||||
#else
|
||||
sprintf(iface.cbq_ifacename,
|
||||
"%s%d", ifp->if_name, ifp->if_unit);
|
||||
#endif
|
||||
err = cbq_ifdetach(&iface);
|
||||
if (err != 0 && error == 0)
|
||||
error = err;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* $FreeBSD$ */
|
||||
/* $KAME: altq_cdnr.c,v 1.14 2003/09/05 22:40:36 itojun Exp $ */
|
||||
/* $KAME: altq_cdnr.c,v 1.15 2005/04/13 03:44:24 suz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1999-2002
|
||||
@ -29,12 +29,10 @@
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include "opt_altq.h"
|
||||
#if (__FreeBSD__ != 2)
|
||||
#include "opt_inet.h"
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_inet6.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif /* __FreeBSD__ || __NetBSD__ */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -44,12 +44,10 @@
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include "opt_altq.h"
|
||||
#if (__FreeBSD__ != 2)
|
||||
#include "opt_inet.h"
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_inet6.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif /* __FreeBSD__ || __NetBSD__ */
|
||||
|
||||
#ifdef ALTQ_HFSC /* hfsc is enabled by ALTQ_HFSC option in opt_altq.h */
|
||||
@ -698,14 +696,8 @@ hfsc_enqueue(struct ifaltq *ifq, struct mbuf *m, struct altq_pktattr *pktattr)
|
||||
/* grab class set by classifier */
|
||||
if ((m->m_flags & M_PKTHDR) == 0) {
|
||||
/* should not happen */
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)\
|
||||
|| (defined(__FreeBSD__) && __FreeBSD_version >= 501113)
|
||||
printf("altq: packet for %s does not have pkthdr\n",
|
||||
ifq->altq_ifp->if_xname);
|
||||
#else
|
||||
printf("altq: packet for %s%d does not have pkthdr\n",
|
||||
ifq->altq_ifp->if_name, ifq->altq_ifp->if_unit);
|
||||
#endif
|
||||
m_freem(m);
|
||||
return (ENOBUFS);
|
||||
}
|
||||
|
@ -31,12 +31,10 @@
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include "opt_altq.h"
|
||||
#if (__FreeBSD__ != 2)
|
||||
#include "opt_inet.h"
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_inet6.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif /* __FreeBSD__ || __NetBSD__ */
|
||||
|
||||
#ifdef ALTQ_PRIQ /* priq is enabled by ALTQ_PRIQ option in opt_altq.h */
|
||||
@ -469,14 +467,8 @@ priq_enqueue(struct ifaltq *ifq, struct mbuf *m, struct altq_pktattr *pktattr)
|
||||
/* grab class set by classifier */
|
||||
if ((m->m_flags & M_PKTHDR) == 0) {
|
||||
/* should not happen */
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)\
|
||||
|| (defined(__FreeBSD__) && __FreeBSD_version >= 501113)
|
||||
printf("altq: packet for %s does not have pkthdr\n",
|
||||
ifq->altq_ifp->if_xname);
|
||||
#else
|
||||
printf("altq: packet for %s%d does not have pkthdr\n",
|
||||
ifq->altq_ifp->if_name, ifq->altq_ifp->if_unit);
|
||||
#endif
|
||||
m_freem(m);
|
||||
return (ENOBUFS);
|
||||
}
|
||||
|
@ -62,12 +62,10 @@
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include "opt_altq.h"
|
||||
#if (__FreeBSD__ != 2)
|
||||
#include "opt_inet.h"
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_inet6.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif /* __FreeBSD__ || __NetBSD__ */
|
||||
#ifdef ALTQ_RED /* red is enabled by ALTQ_RED option in opt_altq.h */
|
||||
|
||||
|
@ -61,12 +61,10 @@
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include "opt_altq.h"
|
||||
#if (__FreeBSD__ != 2)
|
||||
#include "opt_inet.h"
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_inet6.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif /* __FreeBSD__ || __NetBSD__ */
|
||||
#ifdef ALTQ_RIO /* rio is enabled by ALTQ_RIO option in opt_altq.h */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* $FreeBSD$ */
|
||||
/* $KAME: altq_rmclass.c,v 1.18 2003/11/06 06:32:53 kjc Exp $ */
|
||||
/* $KAME: altq_rmclass.c,v 1.19 2005/04/13 03:44:25 suz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991-1997 Regents of the University of California.
|
||||
@ -41,12 +41,10 @@
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include "opt_altq.h"
|
||||
#if (__FreeBSD__ != 2)
|
||||
#include "opt_inet.h"
|
||||
#ifdef __FreeBSD__
|
||||
#include "opt_inet6.h"
|
||||
#endif
|
||||
#endif
|
||||
#endif /* __FreeBSD__ || __NetBSD__ */
|
||||
#ifdef ALTQ_CBQ /* cbq is enabled by ALTQ_CBQ option in opt_altq.h */
|
||||
|
||||
|
@ -72,9 +72,6 @@
|
||||
|
||||
/* machine dependent clock related includes */
|
||||
#ifdef __FreeBSD__
|
||||
#if __FreeBSD__ < 3
|
||||
#include "opt_cpu.h" /* for FreeBSD-2.2.8 to get i586_ctr_freq */
|
||||
#endif
|
||||
#include <sys/bus.h>
|
||||
#include <sys/cpu.h>
|
||||
#include <sys/eventhandler.h>
|
||||
@ -449,7 +446,7 @@ static void
|
||||
tbr_timeout(arg)
|
||||
void *arg;
|
||||
{
|
||||
#if defined(__FreeBSD__)
|
||||
#ifdef __FreeBSD__
|
||||
VNET_ITERATOR_DECL(vnet_iter);
|
||||
#endif
|
||||
struct ifnet *ifp;
|
||||
@ -461,7 +458,7 @@ tbr_timeout(arg)
|
||||
#else
|
||||
s = splimp();
|
||||
#endif
|
||||
#if defined(__FreeBSD__) && (__FreeBSD_version >= 500000)
|
||||
#ifdef __FreeBSD__
|
||||
IFNET_RLOCK_NOSLEEP();
|
||||
VNET_LIST_RLOCK_NOSLEEP();
|
||||
VNET_FOREACH(vnet_iter) {
|
||||
@ -477,7 +474,7 @@ tbr_timeout(arg)
|
||||
ifp->if_start != NULL)
|
||||
(*ifp->if_start)(ifp);
|
||||
}
|
||||
#if defined(__FreeBSD__) && (__FreeBSD_version >= 500000)
|
||||
#ifdef __FreeBSD__
|
||||
CURVNET_RESTORE();
|
||||
}
|
||||
VNET_LIST_RUNLOCK_NOSLEEP();
|
||||
@ -985,11 +982,7 @@ init_machclk(void)
|
||||
*/
|
||||
#ifdef __i386__
|
||||
#ifdef __FreeBSD__
|
||||
#if (__FreeBSD_version > 300000)
|
||||
machclk_freq = tsc_freq;
|
||||
#else
|
||||
machclk_freq = i586_ctr_freq;
|
||||
#endif
|
||||
#elif defined(__NetBSD__)
|
||||
machclk_freq = (u_int32_t)cpu_tsc_freq;
|
||||
#elif defined(__OpenBSD__) && (defined(I586_CPU) || defined(I686_CPU))
|
||||
|
@ -141,11 +141,7 @@ extern u_int64_t read_machclk(void);
|
||||
* misc stuff for compatibility
|
||||
*/
|
||||
/* ioctl cmd type */
|
||||
#if defined(__FreeBSD__) && (__FreeBSD__ < 3)
|
||||
typedef int ioctlcmd_t;
|
||||
#else
|
||||
typedef u_long ioctlcmd_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* queue macros:
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* $FreeBSD$ */
|
||||
/* $KAME: if_altq.h,v 1.11 2003/07/10 12:07:50 kjc Exp $ */
|
||||
/* $KAME: if_altq.h,v 1.12 2005/04/13 03:44:25 suz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1997-2003
|
||||
@ -29,7 +29,7 @@
|
||||
#ifndef _ALTQ_IF_ALTQ_H_
|
||||
#define _ALTQ_IF_ALTQ_H_
|
||||
|
||||
#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/lock.h> /* XXX */
|
||||
#include <sys/mutex.h> /* XXX */
|
||||
#include <sys/event.h> /* XXX */
|
||||
@ -51,7 +51,7 @@ struct ifaltq {
|
||||
int ifq_len;
|
||||
int ifq_maxlen;
|
||||
int ifq_drops;
|
||||
#if (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
|
||||
#ifdef __FreeBSD__
|
||||
struct mtx ifq_mtx;
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user