Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Apr 1998 13:06:59 +0200
From:      Andreas Klemm <andreas@klemm.gtn.com>
To:        FreeBSD-ISDN@FreeBSD.ORG
Subject:   bisdn patches for -current via new mkbisdnktree script
Message-ID:  <19980412130659.38280@klemm.gtn.com>

next in thread | raw e-mail | index | archive | help

--YZ5djTAD1cGYuMQK
Content-Type: text/plain; charset=us-ascii

Just for the case, that there is still demand to run bisdn
on -current ... here the latest mkbisdnktree script that
contains diffs for the time->getmicrotime changes.

Happy easter weekend

	Andreas ///

-- 
Andreas Klemm                             http://www.FreeBSD.ORG/~andreas
What gives you 90% more speed, for example in kernel compilation ?
               http://www.FreeBSD.ORG/~fsmp/SMP/akgraph-a/graph1.html
                          powered by ,,symmetric multiprocessor FreeBSD''

--YZ5djTAD1cGYuMQK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=mkbisdnktree

#! /bin/sh

prefix=/usr

kerneldir=${prefix}/src/sys
bisdnkerneldir=/home/data/sys.bisdn
bisdndir=/home/data/bisdn-097

# remove everything and start over
rm -rf ${bisdnkerneldir}
mkdir -p ${bisdnkerneldir}
rm -f /bisdn
ln -s ${bisdnkerneldir} /bisdn

# make basic symlinks
cd ${bisdnkerneldir}
ln -s ${kerneldir}/* ${bisdnkerneldir}

# 3.1 patch "files" in sys/conf
rm ${bisdnkerneldir}/conf
mkdir ${bisdnkerneldir}/conf
ln -s ${kerneldir}/conf/* ${bisdnkerneldir}/conf
rm ${bisdnkerneldir}/conf/files
cp ${kerneldir}/conf/files ${bisdnkerneldir}/conf
cat << !EOT >> ${bisdnkerneldir}/conf/files
bisdn/b_isdntel.c	optional ispy device-driver
bisdn/b_isdntel.c	optional itel device-driver
bisdn/b_isdntty.c	optional ity device-driver
bisdn/b_isdnipi.c	optional ipi device-driver
net/slcompress.c	optional ipi
bisdn/b_isdn.c		optional isdn device-driver
bisdn/b_isdnlap.c	optional disdn device-driver
bisdn/b_disdn.c		optional disdn device-driver
!EOT

#
# 3.2 patch "files.i386" in sys/i386/conf
#
rm ${bisdnkerneldir}/i386
mkdir ${bisdnkerneldir}/i386
ln -s ${kerneldir}/i386/* ${bisdnkerneldir}/i386
rm ${bisdnkerneldir}/i386/conf
mkdir ${bisdnkerneldir}/i386/conf
ln -s ${kerneldir}/i386/conf/* ${bisdnkerneldir}/i386/conf
rm ${bisdnkerneldir}/i386/conf/files.i386
cp ${kerneldir}/i386/conf/files.i386 ${bisdnkerneldir}/i386/conf
# DO PATCH in bisdnkerneldir
cd ${bisdnkerneldir}/i386/conf
patch --quiet --fuzz=50 \
	< ${bisdndir}/diffs/usr-src-sys-i386-conf-files.i386.diff

#
# 3.2 copy kernel config example BISDN 
#
cp ${bisdndir}/BISDN ${bisdnkerneldir}/i386/conf/BISDN.koptions

#
# 3.3b patch "options.i386" in sys/i386/conf
#
rm ${bisdnkerneldir}/i386/conf/options.i386
cp ${kerneldir}/i386/conf/options.i386 ${bisdnkerneldir}/i386/conf
# DO PATCH in bisdnkerneldir
cd ${bisdnkerneldir}/i386/conf
patch --quiet --fuzz=50 \
	< ${bisdndir}/diffs/usr-src-sys-i386-conf-options.i386.diff

#
# copy teles.c file to i386/isa
#
rm ${bisdnkerneldir}/i386/isa	
mkdir ${bisdnkerneldir}/i386/isa	
ln -s ${kerneldir}/i386/isa/* ${bisdnkerneldir}/i386/isa
cp ${bisdndir}/sys-i386-isa/teles.c ${bisdnkerneldir}/i386/isa

# NOT needed usr-src-sys-i386-i386-support.s.diff

#
# 3.4 copy the needed header files into /usr/include/machine
#
cp ${bisdndir}/machine/*.h /usr/include/machine
# new -current
cp ${bisdndir}/machine/*.h /bisdn/i386/include

#
# 3.5 copy the bisdn kernel sources to the right place
#
mkdir ${bisdnkerneldir}/bisdn
cp ${bisdndir}/sys-bisdn/* ${bisdnkerneldir}/bisdn

#
# create a separate compile directory for bisdn in sys.bisdn
#
rm ${bisdnkerneldir}/compile
mkdir ${bisdnkerneldir}/compile

# remove not needed CVS dirs
cd ${bisdnkerneldir}
find . -type l -name CVS -print | xargs rm

case `uname -n` in
	*klemm.gtn.com|"")
		cp /root/bin/BISDN* ${bisdnkerneldir}/i386/conf
		;;
esac

#
# PATCHES in ${bisdnkerneldir}/i386/isa
#
cd ${bisdnkerneldir}/i386/isa
patch --quiet <<!EOT
--- teles.c.orig	Fri Sep 26 19:41:52 1997
+++ teles.c	Fri Sep 26 19:49:20 1997
@@ -131,7 +131,11 @@
 #define WANT_OUT	8
 
 #ifdef __FreeBSD__
-#define TIMEOUT_FUNC_T	timeout_func_t
+#if __FreeBSD__ >=3
+#define TIMEOUT_FUNC_T timeout_t *
+#else
+#define TIMEOUT_FUNC_T  timeout_func_t
+#endif /* __FreeBSD__ >=3 */
 #endif /* __FreeBSD__ */
 #ifdef __NetBSD__
 #define TIMEOUT_FUNC_T	void *
@@ -468,9 +472,14 @@
 			/* since 32 bytes should be xmitted in ~ 4 ms, wait */
 			/* for 1 tick */
 #ifdef __FreeBSD__
+#if __FreeBSD__ >=3
+			untimeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit, bisdn_timeout_handle);
+			bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit, 1);
+#else
 			untimeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit);
 			timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit, 1);
 #endif
+#endif
 #ifdef __NetBSD__
 			untimeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) sc);
 			timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) sc, 1);
@@ -549,8 +558,12 @@
 	/* since 32 bytes should be xmitted in ~ 4 ms, wait for 1 tick */
 
 #ifdef __FreeBSD__
+#if __FreeBSD__ >=3
+	bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit, 1);
+#else
 	timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit, 1);
 #endif
+#endif
 #ifdef __NetBSD__
 	timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) sc, 1);
 #endif
@@ -1617,7 +1630,11 @@
 				sc->sc_vmem_addr[0x80] = 0;
 			}
 #ifdef __FreeBSD__
+#if __FreeBSD__ >=3
+			bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T) telinit, (caddr_t) unit, hz / 10);
+#else
 			timeout((TIMEOUT_FUNC_T) telinit, (caddr_t) unit, hz / 10);
+#endif
 #endif /* __FreeBSD__ */
 #ifdef __NetBSD__
 			timeout((TIMEOUT_FUNC_T) telinit, (caddr_t) sc, hz / 10);
@@ -1636,8 +1653,12 @@
 
 		/* clear the timeout */
 #ifdef __FreeBSD__
+#if __FreeBSD__ >=3
+		untimeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit, bisdn_timeout_handle);
+#else
 		untimeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit);
 #endif
+#endif
 #ifdef __NetBSD__
 		untimeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) sc);
 #endif
@@ -1669,8 +1690,12 @@
 			/* since 32 bytes should be xmitted in ~ 4 ms, wait */
 			/* for 1 tick */
 #ifdef __FreeBSD__
+#if __FreeBSD__ >=3
+			bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit, 1);
+#else
 			timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit, 1);
 #endif
+#endif
 #ifdef __NetBSD__
 			timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) sc, 1);
 #endif
@@ -1847,7 +1872,11 @@
 		/* since 32 bytes should be xmitted in ~ 4 ms, wait */
 		/* for 1 tick */
 #ifdef __FreeBSD__
+#if __FreeBSD__ >=3
+	bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit, 1);
+#else
 	timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) unit, 1);
+#endif
 #endif
 #ifdef __NetBSD__
 	timeout((TIMEOUT_FUNC_T) tel_d_wd, (caddr_t) sc, 1);
!EOT
#
# PATCHES in ${bisdnkerneldir}/bisdn
#
cd ${bisdnkerneldir}/bisdn
patch --quiet <<!EOT
--- b_disdn.c.orig	Sun Apr 12 06:42:08 1998
+++ b_disdn.c	Sun Apr 12 07:40:16 1998
@@ -123,7 +123,11 @@
 #include <bisdn/b_disdn.h> 
 
 #ifdef __FreeBSD__
+#if __FreeBSD__ >=3
+#define TIMEOUT_FUNC_T timeout_t *
+#else
 #define TIMEOUT_FUNC_T  timeout_func_t
+#endif /* __FreeBSD__ >=3 */
 #endif /* __FreeBSD__ */
 #ifdef __NetBSD__
 #define TIMEOUT_FUNC_T  void *
@@ -706,7 +710,11 @@
 			splx(x);
 		}
 		msg->isalert = alert;
+#if __FreeBSD__ >=3
+		bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T)disdn_resend, (caddr_t)cn, 2*hz);
+#else
 		timeout((TIMEOUT_FUNC_T)disdn_resend, (caddr_t)cn, 2*hz);
+#endif
 		return(0);
 	}
 	msg->isalert = 0;
@@ -717,7 +725,11 @@
 	ctrl->appl = an;
 
 	cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&ltime);
+#else
 	ltime = time;
+#endif
 	splx(cs);
 
 	ctrl->lastact = ltime.tv_sec;
@@ -827,7 +839,11 @@
 		int cs;
 
 		cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+		getmicrotime(&ltime);
+#else
 		ltime = time;
+#endif
 		splx(cs);
 
 		ctrl->lastact = ltime.tv_sec;
@@ -918,7 +934,11 @@
 		int cs;
 
 		cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+		getmicrotime(&ltime);
+#else
 		ltime = time;
+#endif
 		splx(cs);
 
 		ctrl->lastact = ltime.tv_sec;
@@ -1353,7 +1373,11 @@
 	ctrl = &isdn_ctrl[msg->ctrl];
 
 	cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&ltime);
+#else
 	ltime = time;
+#endif
 	splx(cs);
 
 	ctrl->lastact = ltime.tv_sec;
@@ -1450,7 +1474,11 @@
 				{
 					chan->state = ACTIVE;
 					ctrl->state = IS_FIRST;
+#if __FreeBSD__ >=3
+					bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T)disdn_firstout,(caddr_t)(int)chan->ctrl,hz/5);
+#else
 					timeout((TIMEOUT_FUNC_T)disdn_firstout,(caddr_t)(int)chan->ctrl,hz/5);
+#endif
 				} 
 			}
 			return;
@@ -1487,7 +1515,11 @@
 			ctrl = &isdn_ctrl[msg->ctrl];
 
 			cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+			getmicrotime(&ltime);
+#else
 			ltime = time;
+#endif
 			splx(cs);
 
 			ctrl->lastact = ltime.tv_sec;
@@ -1507,7 +1539,11 @@
 				{
 					chan->state = ACTIVE;
 					ctrl->state = IS_FIRST;
+#if __FreeBSD__ >=3
+					bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T)disdn_firstout,(caddr_t)(int)chan->ctrl,hz/5);
+#else
 					timeout((TIMEOUT_FUNC_T)disdn_firstout,(caddr_t)(int)chan->ctrl,hz/5);
+#endif
 				} 
 			}
 			return;
@@ -1657,7 +1693,11 @@
 		if(sc->sc_flags & TEITIMEOUT)
 		{
 			sc->sc_flags &= ~(TEITIMEOUT);
+#if __FreeBSD__ >=3
+			untimeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, bisdn_timeout_handle);
+#else
 			untimeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit);
+#endif
 		}
 		
 		ri = *(u_short *) & b[4];
@@ -1689,7 +1729,11 @@
 				sc->sc_state = DISCON;
 				sc->hdlc.state = LAP_DISCONNECTED;
 				sc->sc_flags |= TEITIMEOUT;
+#if __FreeBSD__ >=3
+				bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, 2*hz);
+#else
 				timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, 2*hz);
+#endif
 			}
 			break;
 
@@ -1727,7 +1771,11 @@
 				sc->sc_state = DISCON;
 				sc->hdlc.state = LAP_DISCONNECTED;
 				sc->sc_flags |= TEITIMEOUT;
-				timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, 10);
+#if __FreeBSD__ >=3
+				bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, 10*hz);
+#else
+				timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, 10*hz);
+#endif
 			}
 			break;
 
@@ -1864,7 +1912,11 @@
 		return(0);
 
 	cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&ltime);
+#else
 	ltime = time;
+#endif
 	splx(cs);
 
 	ctrl->lastact = ltime.tv_sec;
@@ -2155,7 +2207,11 @@
 			printf("tei_get stat\n");
 #endif
 		sc->sc_flags |= TEITIMEOUT;
+#if __FreeBSD__ >=3
+		bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, hz);
+#else
 		timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, hz);
+#endif
 		splx(x);
 		return(-1);
 	}
@@ -2163,7 +2219,11 @@
 	if((m = isdn_getbuf(8)) == NULL)
 	{
 		sc->sc_flags |= TEITIMEOUT;
-		timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, 10);
+#if __FreeBSD__ >=3
+		bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, 10*hz);
+#else
+		timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, 10*hz);
+#endif
 		splx(x);
 		return(-1);
 	}
@@ -2177,7 +2237,11 @@
 	if(sc->sc_tei == 0xff)
 	{
 		cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+		getmicrotime(&ltime);
+#else
 		ltime = time;
+#endif
 		splx(cs);
 
 		for(i=0; i < 16 ; i++, sc->sc_ri++)
@@ -2209,7 +2273,11 @@
 	disdn_d_startout(sc->sc_unit);
 
 	sc->sc_flags |= TEITIMEOUT;
+#if __FreeBSD__ >=3
+	bisdn_timeout_handle = timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, 2 * hz);
+#else
 	timeout((TIMEOUT_FUNC_T) tei_get, (caddr_t) unit, 2 * hz);
+#endif
 
 	splx(x);
 	return(-1);
@@ -2237,7 +2305,11 @@
 		return;
 
 	cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&ltime);
+#else
 	ltime = time;
+#endif
 	splx(cs);
 
 	m->m_len = 8;
--- b_isdn.c.orig	Sun Apr 12 06:42:08 1998
+++ b_isdn.c	Sun Apr 12 07:32:38 1998
@@ -104,7 +104,11 @@
 #include <bisdn/b_isdn.h>
 
 #ifdef __FreeBSD__
+#if __FreeBSD__ >=3
+#define TIMEOUT_FUNC_T timeout_t *
+#else
 #define TIMEOUT_FUNC_T  timeout_func_t
+#endif /* __FreeBSD__ >=3 */
 #endif /* __FreeBSD__ */
 #ifdef __NetBSD__
 #define TIMEOUT_FUNC_T  void *
@@ -694,7 +698,11 @@
 			{
 				isdn_timeout = 1;
 				cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+				getmicrotime(&ltime);
+#else
 				ltime = time;
+#endif
 				splx(cs);
 #ifdef TO_DEBUG
 /* if (to_debug) */
@@ -726,6 +734,9 @@
 {
 	isdn_appl_t    *appl = &isdn_appl[an];
 	struct mbuf *m;
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	struct timeval tv;
+#endif
 	int cs;
 
 	if((m = isdn_getbuf(sizeof(message_connect_t))) != NULL)
@@ -746,7 +757,12 @@
 		(*appl->Connect) (appl->drivno);
 
 	cs = splclock();
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&tv);
+	isdn_ctrl[cn].call_start = tv.tv_sec;
+#else
 	isdn_ctrl[cn].call_start = time.tv_sec;
+#endif
 	splx (cs);
 	
 	if((isdn_timeout == 0) && appl->idle_time)
--- b_isdn.h.orig	Sun Apr 12 06:42:08 1998
+++ b_isdn.h	Sun Apr 12 06:42:09 1998
@@ -78,6 +78,10 @@
 	void	(*DisConn) (int no);
 } isdn_appl_t;
 
+#if __FreeBSD__ >=3
+static struct callout_handle bisdn_timeout_handle;
+#endif
+
 /* The following code is taken from the if.h IF_Q* stuff */
 /* We do not need drop control */
 
--- b_isdnipi.c.orig	Sun Apr 12 06:42:08 1998
+++ b_isdnipi.c	Sun Apr 12 07:23:47 1998
@@ -101,6 +101,8 @@
  *
  *---------------------------------------------------------------------------*/
 
+#include "opt_inet.h"
+ 
 #ifdef INET
 
 #include "ipi.h"
@@ -111,7 +113,15 @@
 #include <sys/mbuf.h>
 #include <sys/socket.h>
 #include <sys/errno.h>
-#include <sys/ioctl.h>
+
+#if BSD > 199306 && defined (__FreeBSD__)
+#include <sys/ioccom.h>
+#include <sys/sockio.h>
+#include <sys/malloc.h>
+#else
+#include <sys/ioctl.h> 
+#endif
+
 #include <sys/kernel.h>
 #include <sys/protosw.h>
 
@@ -534,7 +544,11 @@
 
 #endif /* IPI_VJ */
 
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&sc->sc_if.if_lastchange);
+#else
 	sc->sc_if.if_lastchange = time;
+#endif
 	
 	x = splimp();
 
@@ -673,7 +687,11 @@
 	m->m_pkthdr.rcvif = &sc->sc_if;
 	m->m_pkthdr.len = m->m_len;
 
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	getmicrotime(&sc->sc_if.if_lastchange);
+#else
 	sc->sc_if.if_lastchange = time;
+#endif
 	
 #ifdef IPI_VJ
 	sc->sc_cinb += m->m_pkthdr.len;
--- b_isdnlap.c.orig	Sun Apr 12 06:42:08 1998
+++ b_isdnlap.c	Sun Apr 12 07:35:16 1998
@@ -16,20 +16,14 @@
  *
  *---------------------------------------------------------------------------*/
 
-#ifdef __FreeBSD__
-#include <param.h>
-#include <ioctl.h>
-#include <kernel.h>
-#include <systm.h>
-#include <mbuf.h>
-#endif /* __FreeBSD__ */
-#ifdef __NetBSD__
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/kernel.h>
 #include <sys/systm.h>
-#include <sys/device.h>
 #include <sys/mbuf.h>
+
+#ifdef __NetBSD__
+#include <sys/device.h>
 #endif /* __NetBSD__ */
 
 #include <machine/stdarg.h>
@@ -45,7 +39,11 @@
 #include <bisdn/b_disdn.h>
 
 #ifdef __FreeBSD__
+#if __FreeBSD__ >=3
+#define TIMEOUT_FUNC_T timeout_t * 
+#else
 #define TIMEOUT_FUNC_T  timeout_func_t
+#endif /* __FreeBSD__ >=3 */
 #endif /* __FreeBSD__ */
 #ifdef __NetBSD__
 #define TIMEOUT_FUNC_T  void *
@@ -509,7 +507,11 @@
 	{
 		/* Start round trip timer */
 		hd->rtt_seq = (hd->vs-1) & hd->mmask;
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+		getmicrotime(&hd->rtt_time);
+#else
 		hd->rtt_time = time;
+#endif
 		hd->flags.rtt_run = 1;
 	}
 	return 1;
@@ -628,11 +630,19 @@
 {
 	if(hd->timeout)
 	{
+#if __FreeBSD__ >=3
+		untimeout((TIMEOUT_FUNC_T)laprecover,hd, hd->ch);
+#else
 		untimeout((TIMEOUT_FUNC_T)laprecover,hd);
+#endif
 	}
 	hd->timeout= tp;
 	if(tp)
+#if __FreeBSD__ >=3
+		hd->ch = timeout((TIMEOUT_FUNC_T)laprecover,hd,hd->toutval[tp]);
+#else
 		timeout((TIMEOUT_FUNC_T)laprecover,hd,hd->toutval[tp]);
+#endif
 }
 
 static void
@@ -646,6 +656,13 @@
 timediff(struct timeval *t1)
 {
 	long t;
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+	struct timeval tv;
+	getmicrotime(&tv);
+	t= (tv.tv_usec - t1->tv_usec) / 1000;
+	return(t + (tv.tv_sec - t1->tv_sec)*1000);
+#else
 	t= (time.tv_usec - t1->tv_usec) / 1000;
 	return(t + (time.tv_sec - t1->tv_sec)*1000);
+#endif
 }
--- b_isdnlap.h.orig	Sun Apr 12 06:42:08 1998
+++ b_isdnlap.h	Sun Apr 12 06:42:09 1998
@@ -88,5 +88,7 @@
 	u_short rtt_seq;		/* Sequence number being timed */
 	u_long srt;			/* Smoothed round-trip time, ms */
 	u_long mdev;			/* Mean rtt deviation, ms */
+#if defined (__FreeBSD__) && __FreeBSD__ >=3
+	struct callout_handle ch;
+#endif
 };
-
--- b_isdntel.c.orig	Sun Apr 12 07:55:22 1998
+++ b_isdntel.c	Sun Apr 12 07:57:02 1998
@@ -168,7 +168,11 @@
 	{
 		m->m_data[0]= out;
 		*(u_long *) &m->m_data[1]= ispyabscnt++;
+#if defined(__FreeBSD__) && __FreeBSD__ >= 3
+		getmicrotime(&m->m_data[5]);
+#else
 		*(struct timeval *) &m->m_data[5]= time;
+#endif
 	}
 	IS_ENQUEUE(&i_q[no],m);
 
!EOT
#
# Do some of the work automatically
#
# cd /bisdn/i386/conf
# config BISDNSMP
# cd /bisdn/compile/BISDNSMP
# time make depend all
exit 0

--YZ5djTAD1cGYuMQK--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980412130659.38280>